libidav/jmap.h

branch
dav-2
changeset 927
0bcf3d69b37a
parent 925
61a231a8d8f5
equal deleted inserted replaced
926:8470d5aac30e 927:0bcf3d69b37a
32 #ifdef __cplusplus 32 #ifdef __cplusplus
33 extern "C" { 33 extern "C" {
34 #endif 34 #endif
35 35
36 #include <cx/map.h> 36 #include <cx/map.h>
37 #include <cx/list.h>
37 #include <cx/json.h> 38 #include <cx/json.h>
38 #include <cx/mempool.h> 39 #include <cx/mempool.h>
39 #include <curl/curl.h> 40 #include <curl/curl.h>
40 41
42 #include <inttypes.h>
43
41 typedef struct JMAPSession JMAPSession; 44 typedef struct JMAPSession JMAPSession;
45 typedef struct JMAPPrimaryAccounts JMAPPrimaryAccounts;
46
47 struct JMAPPrimaryAccounts {
48 char *mail;
49 char *vacationresponse;
50 char *contacts;
51 char *calendars;
52 };
42 53
43 struct JMAPSession { 54 struct JMAPSession {
44 CURL *handle; 55 CURL *handle;
45 CxMempool *mp; 56 CxMempool *mp;
46 57
49 char *username; 60 char *username;
50 char *apiUrl; 61 char *apiUrl;
51 char *downloadUrl; 62 char *downloadUrl;
52 char *uploadUrl; 63 char *uploadUrl;
53 char *eventSourceUrl; 64 char *eventSourceUrl;
65
66 JMAPPrimaryAccounts primary_accounts;
54 }; 67 };
68
69
55 70
56 JMAPSession* jmap_session_new_with_user(const char *session_url, const char *user, const char *password); 71 JMAPSession* jmap_session_new_with_user(const char *session_url, const char *user, const char *password);
57 72
58 #ifdef __cplusplus 73 #ifdef __cplusplus
59 } 74 }

mercurial