Imported Upstream version 1.1.1
[platform/upstream/iotivity.git] / resource / include / OCDirectPairing.h
1 //******************************************************************
2 //
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #ifndef OC_DIRECT_PAIRING_H_
22 #define OC_DIRECT_PAIRING_H_
23 #include <OCApi.h>
24
25 namespace OC
26 {
27     class OCDirectPairing
28     {
29         public:
30             OCDirectPairing(OCDPDev_t *ptr);
31             /**
32              * Function to get the host address of direct pairing device.
33              *
34              * @return Returns host address in the format
35              *           <coaps>:IP:securePort
36              */
37             std::string getHost();
38
39             /**
40              * Function to get the device ID of the direct pairing device.
41              *
42              * @return Returns device ID (UUID)
43              */
44             std::string getDeviceID();
45
46             /**
47              * Function to get the pairing methods supported by direct pairing device.
48              *
49              * @return Returns vector of pairing methods supported.
50              *   DP_NOT_ALLOWED
51              *   DP_PRE_CONFIGURED
52              *   DP_RANDOM_PIN
53              */
54             std::vector<OCPrm_t> getPairingMethods();
55
56             /**
57              * Function to get the connectivity Type.
58              *
59              * @return Returns connectivity Type
60              */
61             OCConnectivityType getConnType();
62
63             OCDPDev_t* getDev();
64
65         private:
66             OCDPDev_t *m_devPtr;
67     };
68 }
69 #endif //OC_DIRECT_PAIRING_H_