Webcom C SDK
webcom-on.h
Go to the documentation of this file.
1 /*
2  * webcom-sdk-c
3  *
4  * Copyright 2018 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_ON_H_
24 #define INCLUDE_WEBCOM_C_WEBCOM_ON_H_
25 
26 #include "webcom-base.h"
27 
46 typedef void *on_handle_t;
47 
62 typedef int (*on_callback_f)(wc_context_t *ctx, on_handle_t handle, char * data, char *current_key, char *previous_key);
63 
69  /* update the ON_EVENT_TYPE_COUNT macro if you add new events */
70 };
71 
83 
96 
108 
120 
127 
134 
143 
151 void wc_datasync_off_path(wc_context_t *ctx, char *path);
152 
161 void wc_datasync_off_path_type(wc_context_t *ctx, char *path, enum on_event_type type);
162 
167 #endif /* INCLUDE_WEBCOM_C_WEBCOM_ON_H_ */
struct wc_context wc_context_t
Definition: webcom-base.h:27
on_handle_t wc_datasync_on_value(wc_context_t *ctx, char *path, on_callback_f callback)
Definition: webcom-on.h:66
Definition: webcom-on.h:65
Definition: webcom-on.h:67
on_handle_t wc_datasync_on_child_added(wc_context_t *ctx, char *path, on_callback_f callback)
void wc_datasync_off(on_handle_t h)
void * on_handle_t
Definition: webcom-on.h:46
int(* on_callback_f)(wc_context_t *ctx, on_handle_t handle, char *data, char *current_key, char *previous_key)
Definition: webcom-on.h:62
on_handle_t wc_datasync_on_child_removed(wc_context_t *ctx, char *path, on_callback_f callback)
on_event_type
Definition: webcom-on.h:64
void wc_datasync_off_path(wc_context_t *ctx, char *path)
wc_context_t * wc_datasync_on_handle_get_ctx(on_handle_t h)
Definition: webcom-on.h:68
on_handle_t wc_datasync_on_child_changed(wc_context_t *ctx, char *path, on_callback_f callback)
void wc_datasync_off_path_type(wc_context_t *ctx, char *path, enum on_event_type type)
char * wc_datasync_on_handle_get_path(on_handle_t h)