1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 OC_RESOURCE_DIRECTORY_H_
22 #define OC_RESOURCE_DIRECTORY_H_
33 * Publish RD resource to Resource Directory.
35 * @param host The address of the RD.
36 * @param connectivityType Type of connectivity indicating the interface.
37 * @param resourceHandles This is the resource handle which we need to register to RD.
38 * @param nHandles The counts of resource handle.
39 * @param cbData Asynchronous callback function that is invoked by the stack when
40 * response is received. The callback is generated for each response
42 * @param qos Quality of service.
44 * @return ::OC_STACK_OK on success, some other value upon failure.
46 OC_EXPORT OCStackResult OCRDPublish(const char *host, OCConnectivityType connectivityType,
47 OCResourceHandle resourceHandles[], uint8_t nHandles,
48 OCCallbackData *cbData, OCQualityOfService qos);
51 * Delete RD resource from Resource Directory.
53 * @param host The address of the RD.
54 * @param connectivityType Type of connectivity indicating the interface.
55 * @param resourceHandles This is the resource handle which we need to delete to RD.
56 * @param nHandles The counts of resource handle.
57 * @param cbData Asynchronous callback function that is invoked by the stack when
58 * response is received. The callback is generated for each response
60 * @param qos Quality of service.
62 * @return ::OC_STACK_OK on success, some other value upon failure.
64 OC_EXPORT OCStackResult OCRDDelete(const char *host, OCConnectivityType connectivityType,
65 OCResourceHandle resourceHandles[], uint8_t nHandles,
66 OCCallbackData *cbData, OCQualityOfService qos);
72 #endif /* OC_RESOURCE_DIRECTORY_H_ */