Webcom C SDK
webcom-req.h
Go to the documentation of this file.
1 /*
2  * Webcom C SDK
3  *
4  * Copyright 2017 Orange
5  * <camille.oudot@orange.com>
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or (at your
10  * option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  */
22 
23 #ifndef INCLUDE_WEBCOM_C_WEBCOM_REQ_H_
24 #define INCLUDE_WEBCOM_C_WEBCOM_REQ_H_
25 
26 #include "webcom-datasync.h"
27 #include "webcom-msg.h"
28 
30 
47 typedef void (*wc_on_req_result_t) (wc_context_t *cnx, int64_t id, wc_action_type_t type, wc_req_pending_result_t status, char *reason, char *data, void *user);
48 
63 int64_t wc_datasync_put(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user);
64 
80 int64_t wc_datasync_merge(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user);
81 
99 int64_t wc_datasync_push(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user);
100 
114 int64_t wc_datasync_listen(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user);
115 
130 int64_t wc_datasync_unlisten(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user);
131 
146 int64_t wc_datasync_auth(wc_context_t *cnx, char *cred, wc_on_req_result_t callback, void *user);
147 
159 int64_t wc_datasync_unauth(wc_context_t *cnx, wc_on_req_result_t callback, void *user);
160 
174 int64_t wc_datasync_on_disc_put(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user);
175 
189 int64_t wc_datasync_on_disc_merge(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user);
190 
202 int64_t wc_datasync_on_disc_cancel(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user);
203 
208 #endif /* INCLUDE_WEBCOM_C_WEBCOM_REQ_H_ */
struct wc_context wc_context_t
Definition: webcom-base.h:27
int64_t wc_datasync_unlisten(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user)
int64_t wc_datasync_on_disc_merge(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user)
Definition: webcom-req.h:29
Definition: webcom-req.h:29
int64_t wc_datasync_push(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user)
void(* wc_on_req_result_t)(wc_context_t *cnx, int64_t id, wc_action_type_t type, wc_req_pending_result_t status, char *reason, char *data, void *user)
Definition: webcom-req.h:47
int64_t wc_datasync_on_disc_put(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user)
int64_t wc_datasync_merge(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user)
wc_action_type_t
Definition: webcom-msg.h:39
int64_t wc_datasync_on_disc_cancel(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user)
int64_t wc_datasync_listen(wc_context_t *cnx, char *path, wc_on_req_result_t callback, void *user)
int64_t wc_datasync_auth(wc_context_t *cnx, char *cred, wc_on_req_result_t callback, void *user)
wc_req_pending_result_t
Definition: webcom-req.h:29
int64_t wc_datasync_put(wc_context_t *cnx, char *path, char *json, wc_on_req_result_t callback, void *user)
int64_t wc_datasync_unauth(wc_context_t *cnx, wc_on_req_result_t callback, void *user)