automotive-message-broker  0.14.803
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
libamb-client.h
1 /*
2  * Automotive Message Broker Client Library
3  *
4  * Copyright (C) 2016 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the License);
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef __LIBAMB_CLIENT_H__
20 #define __LIBAMB_CLIENT_H__
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #include <glib.h>
27 
31 enum Zone {
32  None = 0,
33  Front = 1,
34  Middle = 1 << 1,
35  Right = 1 << 2,
36  Left = 1 << 3,
37  Rear = 1 << 4,
38  Center = 1 << 5,
39  LeftSide = 1 << 6,
40  RightSide = 1 << 7,
41  FrontSide = 1 << 8,
42  BackSide = 1 << 9
43 };
44 typedef int ZoneType;
45 
56 typedef void (*AMB_PROPERTY_CHANGED_CALLBACK)(const gchar *objname, gpointer data, void *user_data);
57 
71 int amb_get_property_all(GList **proplist, const char *obj_name);
72 
83 int amb_get_property_all_with_zone(GVariant **proplist, const char *obj_name, ZoneType zone);
84 
94 int amb_set_property(const char *obj_name, const char *prop_name, ZoneType zone, GVariant *value);
95 
103 void amb_release_property_all(GList *proplist);
104 
110 void amb_release_property_all_with_zone(GVariant *proplist);
111 
124 int amb_register_property_changed_handler(gchar *objname,
125  ZoneType zone,
126  AMB_PROPERTY_CHANGED_CALLBACK callback,
127  void *user_data,
128  guint32 *id);
129 
140 int amb_unregister_property_changed_handler(gchar *objname, ZoneType zone, guint32 id);
141 
154 int amb_get_object_list(GList **objlist);
155 
163 void amb_release_object_list(GList *objlist);
164 
173 void amb_release_data(void *retdata);
174 
175 #ifdef __cplusplus
176 }
177 #endif
178 #endif /* __LIBAMB_CLIENT_H__
179  */