PXP: Modify APIs and Signal handle implementation
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / include / bt-service-proximity.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
19 #ifndef _BT_SERVICE_PROXIMITY_H_
20 #define _BT_SERVICE_PROXIMITY_H_
21
22 #include <glib.h>
23 #include <sys/types.h>
24 #include "bluetooth-api.h"
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30
31 typedef enum {
32         BT_PXP_ALERT_NONE = 0,
33         BT_PXP_ALERT_MILD,
34         BT_PXP_ALERT_HIGH
35 } bt_proximity_alert_value_t;
36
37 typedef enum {
38         BT_PXP_SIGNAL_NONE = 0,
39         BT_PXP_SIGNAL_GOOD,
40         BT_PXP_SIGNAL_REGULAR,
41         BT_PXP_SIGNAL_WEAK
42 } bt_proximity_signal_level_t;
43
44 typedef enum {
45         BT_PXP_PROPERTY_LLS = 0x01,
46         BT_PXP_PROPERTY_IAS = 0x02,
47         BT_PXP_PROPERTY_TX_POWER = 0x04
48 } bt_proximity_alert_property_t;
49
50 typedef enum {
51         BT_PXP_REPORTER_ROLE = 0x00,
52         BT_PXP_MONITOR_ROLE = 0x01,
53 } bt_proximity_role_t;
54
55 int _bt_proximity_monitor_set_property(bluetooth_device_address_t *device_address,
56                 unsigned int property, int alert_level);
57
58 int _bt_proximity_monitor_get_property(bluetooth_device_address_t *device_address,
59                 unsigned int property, int *level);
60
61 int _bt_proximity_monitor_get_supported_services(bluetooth_device_address_t *device_address,
62                 unsigned int *supported_services);
63
64 int _bt_proximity_reporter_get_property(bluetooth_device_address_t *device_address,
65                 unsigned int property, int *level);
66
67 int _bt_proximity_reporter_register(const char *sender);
68
69 int _bt_proximity_reporter_unregister(const char *sender);
70
71 void _bt_proximity_reporter_stop_by_terminated_process(const char *terminated_name);
72
73 #ifdef __cplusplus
74 }
75 #endif /* __cplusplus */
76 #endif /*_BT_SERVICE_PROXIMITY_H_*/
77