2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #ifndef _BT_EVENT_HANDLER_H_
19 #define _BT_EVENT_HANDLER_H_
21 #include <sys/types.h>
27 #define EVENT_MATCH_RULE \
35 GDBusConnection *conn;
40 int _bt_init_event_handler(void);
42 int _bt_deinit_event_handler(void);
44 int _bt_register_event(int event_type, void *event_cb, void *user_data);
46 int _bt_unregister_event(int event_type);
48 bt_event_info_t *_bt_event_get_cb_data(int event_type);
50 void _bt_add_server(int server_fd);
52 void _bt_remove_server(int server_fd);
54 void _bt_add_push_request_id(int request_id);
56 void _bt_set_obex_server_id(int server_type);
58 int _bt_get_obex_server_id(void);
60 void _bt_register_name_owner_changed(void);
62 void _bt_unregister_name_owner_changed(void);
64 int _bt_register_manager_subscribe_signal(gboolean subscribe);
66 int _bt_hid_device_get_fd(const char *address, int *ctrl, int *intr);
68 int new_hid_connection(const char *path, int fd, bluetooth_device_address_t *addr);
74 #endif /* _BT_EVENT_HANDLER_H_ */