Mesh: added message response on Node Role
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / include / bt-event-handler.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *              http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 #ifndef _BT_EVENT_HANDLER_H_
19 #define _BT_EVENT_HANDLER_H_
20
21 #include <sys/types.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define EVENT_MATCH_RULE \
28         "type='signal'," \
29         "interface='%s'," \
30         "path='%s'"
31
32 typedef struct {
33         int event_type;
34         guint id;
35         GDBusConnection *conn;
36         void *cb;
37         void *user_data;
38 } bt_event_info_t;
39
40 int _bt_init_event_handler(void);
41
42 int _bt_deinit_event_handler(void);
43
44 int _bt_register_event(int event_type, void *event_cb, void *user_data);
45
46 int _bt_unregister_event(int event_type);
47
48 bt_event_info_t *_bt_event_get_cb_data(int event_type);
49
50 void _bt_add_server(int server_fd);
51
52 void _bt_remove_server(int server_fd);
53
54 void _bt_add_push_request_id(int request_id);
55
56 void _bt_set_obex_server_id(int server_type);
57
58 int _bt_get_obex_server_id(void);
59
60 void _bt_register_name_owner_changed(void);
61
62 void _bt_unregister_name_owner_changed(void);
63
64 int _bt_register_manager_subscribe_signal(gboolean subscribe);
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif /* _BT_EVENT_HANDLER_H_ */