libidav/jmap_mail.h

branch
dav-2
changeset 928
57167625bfdd
parent 927
0bcf3d69b37a
equal deleted inserted replaced
927:0bcf3d69b37a 928:57167625bfdd
34 #ifdef __cplusplus 34 #ifdef __cplusplus
35 extern "C" { 35 extern "C" {
36 #endif 36 #endif
37 37
38 typedef struct JMAPMailBox JMAPMailBox; 38 typedef struct JMAPMailBox JMAPMailBox;
39 typedef struct JMAPMail JMAPMail;
39 40
40 struct JMAPMailBox { 41 struct JMAPMailBox {
41 JMAPSession *session; 42 JMAPSession *session;
42 char *id; 43 char *id;
43 char *parent_id; 44 char *parent_id;
48 uint32_t unread_emails; 49 uint32_t unread_emails;
49 uint32_t total_threads; 50 uint32_t total_threads;
50 uint32_t unread_threads; 51 uint32_t unread_threads;
51 }; 52 };
52 53
54 struct JMAPMail {
55 JMAPSession *session;
56 char *id;
57 char *subject;
58 char *from;
59 time_t received_at;
60 };
61
53 void jmap_mailbox_free(JMAPMailBox *mailbox); 62 void jmap_mailbox_free(JMAPMailBox *mailbox);
54 63
55 CxList* jmap_mailbox_get_list(JMAPSession *sn); 64 CxList* jmap_mailbox_get_list(JMAPSession *sn);
65 CxList* jmap_mailbox_get_mails(JMAPMailBox *mailbox);
56 66
57 67
58 #ifdef __cplusplus 68 #ifdef __cplusplus
59 } 69 }
60 #endif 70 #endif

mercurial