forked from guyzmo/avr_nrf_ancs_library
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathancs_notification.h
51 lines (41 loc) · 974 Bytes
/
ancs_notification.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/** (c)2013, Bernard Pratz, bernard at pratz dot net
* under the WTFPL License
*/
#ifndef _ANCS_NOTIFICATION_H_
#define _ANCS_NOTIFICATION_H_
#include <stdlib.h>
#include <inttypes.h>
#include "ancs_base.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct date_t {
uint8_t Y;
uint8_t M;
uint8_t D;
uint8_t h;
uint8_t m;
} date_t;
typedef struct ancs_notification_t {
uint32_t uid;
uint8_t action;
uint8_t flags;
uint8_t category;
uint16_t msg_len;
date_t time;
char title[LINE_SIZE+1];
#ifdef ANCS_USE_SUBTITLE
char subtitle[LINE_SIZE+1];
#endif
#ifdef ANCS_USE_APP
char app[LINE_SIZE+1];
#endif
char message[MESSAGE_SIZE+1];
} ancs_notification_t;
void ancs_notification_init(ancs_notification_t* n);
void ancs_notification_copy(ancs_notification_t* dst, ancs_notification_t* src);
ancs_notification_t* ancs_notification_cached();
#ifdef __cplusplus
}
#endif
#endif