1 //******************************************************************
3 // Copyright 2015 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 _RESOURCE_DIRECTORY_SERVER_H_
22 #define _RESOURCE_DIRECTORY_SERVER_H_
32 * This function creates resource /oic/rd.
34 * @return ::OC_STACK_OK upon success, ::OC_STACK_ERROR in case of error.
36 OCStackResult OCRDStart();
39 * Stops resource directory.
40 * This function will stop the resource directory and removes all published
41 * resources information.
43 * @return ::OC_STACK_OK upon success, ::OC_STACK_ERROR is returned except
44 * the case that OC_STACK_SUCCESS is returned.
46 OCStackResult OCRDStop();
49 * Checks based on the resource type if the entity exists in the resource directory.
51 * @param interfaceType a interface type that is being queried.
52 * @param resourceType a resource type that is being queried.
53 * @param payload A payload of the matching resource type or interface type or NULL.
54 * @param addr A device address.
56 * @return ::OC_STACK_OK upon success, ::OC_STACK_ERROR is returned except
57 * the case that OC_STACK_SUCCESS is returned.
59 OCStackResult OCRDCheckPublishedResource(const char *interfaceType, const char *resourceType,
60 OCResourceCollectionPayload **payload, OCDevAddr *addr);
66 #endif //_RESOURCE_DIRECTORY_H_