replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / service / notification / src / common / NSUtil.h
1 //******************************************************************\r
2 //\r
3 // Copyright 2016 Samsung Electronics All Rights Reserved.\r
4 //\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
6 //\r
7 // Licensed under the Apache License, Version 2.0 (the "License");\r
8 // you may not use this file except in compliance with the License.\r
9 // You may obtain a copy of the License at\r
10 //\r
11 //      http://www.apache.org/licenses/LICENSE-2.0\r
12 //\r
13 // Unless required by applicable law or agreed to in writing, software\r
14 // distributed under the License is distributed on an "AS IS" BASIS,\r
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16 // See the License for the specific language governing permissions and\r
17 // limitations under the License.\r
18 //\r
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\r
20 \r
21 #ifndef _NS_UTIL__H_\r
22 #define _NS_UTIL__H_\r
23 \r
24 #include "logger.h"\r
25 #include <octypes.h>\r
26 #include <stdbool.h>\r
27 #include "ocstack.h"\r
28 #include "ocpayload.h"\r
29 #include "octypes.h"\r
30 #include "NSStructs.h"\r
31 #include "NSConstants.h"\r
32 #include "oic_malloc.h"\r
33 #include "oic_string.h"\r
34 #include "ocrandom.h"\r
35 #include "oic_time.h"\r
36 #include "NSProviderSystem.h"\r
37 \r
38 OCEntityHandlerRequest *NSCopyOCEntityHandlerRequest(OCEntityHandlerRequest *);\r
39 NSResult NSFreeOCEntityHandlerRequest(OCEntityHandlerRequest *);\r
40 \r
41 NSMessage * NSInitializeMessage();\r
42 NSResult NSFreeMessage(NSMessage *);\r
43 NSMessage * NSDuplicateMessage(NSMessage *);\r
44 \r
45 NSResult NSFreeSync(NSSyncInfo *);\r
46 NSSyncInfo * NSDuplicateSync(NSSyncInfo *);\r
47 NSSyncInfo * NSGetSyncInfo(OCPayload * payload);\r
48 \r
49 NSResult NSFreeConsumer(NSConsumer *);\r
50 NSConsumer * NSDuplicateConsumer(NSConsumer *);\r
51 \r
52 NSTopicList * NSInitializeTopicList();\r
53 \r
54 void NSDuplicateSetPropertyString(OCRepPayload **, const char *, const char *);\r
55 void NSDuplicateSetPropertyInt(OCRepPayload ** msgPayload, const char * name, int64_t value);\r
56 NSResult NSGenerateUUIDStr(char uuidStr[UUID_STRING_SIZE]);\r
57 \r
58 char * NSGetValueFromQuery(char *query, char * compareKey);\r
59 NSResult NSFreeMalloc(char ** obj);\r
60 \r
61 NSResult NSFreeMediaContents(NSMediaContents * obj);\r
62 NSMediaContents * NSDuplicateMediaContents(NSMediaContents * copyObj);\r
63 \r
64 OCRepPayloadValue* NSPayloadFindValue(const OCRepPayload* payload, const char* name);\r
65 \r
66 OCDevAddr * NSChangeAddress(const char * address);\r
67 bool NSOCResultToSuccess(OCStackResult ret);\r
68 \r
69 #endif /* _NS_UTIL__H_ */\r