1 /* ****************************************************************
3 * Copyright 2017 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 ******************************************************************/
21 #ifndef CA_MANAGER_LE_UTILS_H_
22 #define CA_MANAGER_LE_UTILS_H_
24 #import <Foundation/Foundation.h>
25 #import <CoreBluetooth/CoreBluetooth.h>
39 * check whether the device is already put or not.
40 * @param[in] address LE address.
41 * @return true or false
43 bool CAManagerIsConnectedDeviceAddress(const char* address);
46 * add connected device into SharedPreference.
47 * @param[in] address ble address.
48 * @return CBPeripheral object or nil
50 CBPeripheral* CAManagerGetValueConnectedDeviceAddress(const char* address);
53 * add connected device into SharedPreference.
54 * @param[in] peripheral peripheral object.
55 * @param[in] address ble address.
56 * @return true or false
58 bool CAManagerSetValueConnectedDeviceAddress(CBPeripheral *peripheral, const char* address);
61 * add connected device into SharedPreference.
62 * @param[in] address ble address.
63 * @return true or false
65 bool CAManagerAddConnectedDeviceAddress(const char* address);
68 * get connected device from SharedPreference.
69 * @return true or false
71 bool CAManagerGetConnectedDeviceAddress();
74 * remove connected device to SharedPreference.
75 * @param[in] address LE address.
76 * @return true or false
78 bool CAManagerRemoveConnectedDeviceAddress(const char* address);
81 * Vaildate a String bluetooth address.
82 * @param[in] address LE address.
83 * @return true or false
85 bool CAManagerCheckBTAddress(const char *address);
88 * create new set<String> object.
89 * @return true or false
91 bool CAManagerCreateSetString();
94 * terminate new set<String> object.
95 * @return CA_STATUS_OK or CA_STATUS_FAILED
97 CAResult_t CAManagerTerminateSetString();
103 #endif /* CA_MANAGER_LE_UTILS_H_ */