resolved the code rule warnings
[platform/core/connectivity/bluetooth-frwk.git] / bt-oal / bluez_hal / src / bt-hal-agent.h
1 /*
2  * BLUETOOTH HAL
3  *
4  * Copyright (c) 2015 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Anupam Roy <anupam.r@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *              http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #ifndef __BT_HAL_AGENT_H__
23 #define __BT_HAL_AGENT_H__
24
25 #include <stdint.h>
26 #include <glib.h>
27 #include <unistd.h>
28 #include <dlog.h>
29 #include <stdio.h>
30
31 typedef enum {
32         BT_HAL_AGENT_EVENT_PIN_REQUEST,
33         BT_HAL_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
34         BT_HAL_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
35         BT_HAL_AGENT_EVENT_PASSKEY_REQUEST,
36         BT_HAL_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
37         BT_HAL_AGENT_EVENT_AUTHORIZE_REQUEST,
38         BT_HAL_AGENT_EVENT_CONFIRM_MODE_REQUEST,
39         BT_HAL_AGENT_EVENT_APP_CONFIRM_REQUEST,
40         BT_HAL_AGENT_EVENT_FILE_RECEIVED,
41         BT_HAL_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
42         BT_HAL_AGENT_EVENT_SECURITY,
43         BT_HAL_AGENT_EVENT_TERMINATE,
44         BT_HAL_AGENT_EVENT_EXCHANGE_REQUEST,
45         BT_HAL_AGENT_EVENT_PBAP_REQUEST,
46         BT_HAL_AGENT_EVENT_MAP_REQUEST,
47         BT_HAL_AGENT_EVENT_SYSTEM_RESET_REQUEST,
48         BT_HAL_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
49 } bt_hal_agent_event_type_t;
50
51 void* _bt_hal_create_agent(const char *path, gboolean adapter);
52
53 void _bt_hal_destroy_agent(void *agent);
54
55 gboolean _bt_hal_agent_is_canceled(void);
56
57 void _bt_hal_agent_set_canceled(gboolean value);
58
59 int _bt_hal_agent_reply_cancellation(void);
60
61 void* _bt_hal_get_adapter_agent(void);
62
63 void _bt_hal_initialize_adapter_agent(void);
64
65 void _bt_hal_destroy_adapter_agent(void);
66
67 void _bt_hal_enable_gap_auth_notifications(unsigned int type, gboolean enable);
68
69 #endif //__BT_HAL_AGENT__