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 TIZENAPIS_TIZEN_BLUETOOTH_CLASS_H_
19 #define TIZENAPIS_TIZEN_BLUETOOTH_CLASS_H_
21 #include <dpl/shared_ptr.h>
30 typedef DPL::SharedPtr<BluetoothClass> BluetoothClassPtr;
34 #define SERVICE_SHIFT 12
36 #define MAJOR_MASK_SHIFT(A) ((A & 0x00000F80) >> MAJOR_SHIFT)
37 #define MINOR_MASK_SHIFT(A) ((A & 0x0000007E) >> MINOR_SHIFT)
38 #define SERVICE_MASK_SHIFT(A) ((A & 0x007FF000) >> SERVICE_SHIFT)
44 bool find(const std::string key, int &value);
47 std::vector<int> getServices();
48 void setServices(int device);
49 void setMajor(int major);
50 void setMinor(int minor);
51 void fromInt(unsigned long value);
54 unsigned long toInt();
59 static std::map<std::string,int> m_serviceConstants;
60 std::vector<int> m_services;