1 //******************************************************************
\r
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\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
11 // http://www.apache.org/licenses/LICENSE-2.0
\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
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
21 #ifndef _NS_UTIL__H_
\r
22 #define _NS_UTIL__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
36 OCEntityHandlerRequest *NSCopyOCEntityHandlerRequest(OCEntityHandlerRequest *);
\r
37 NSResult NSFreeOCEntityHandlerRequest(OCEntityHandlerRequest *);
\r
39 NSResult NSFreeMessage(NSMessage *);
\r
40 NSMessage * NSDuplicateMessage(NSMessage *);
\r
42 NSResult NSFreeSync(NSSyncInfo *);
\r
43 NSSyncInfo * NSDuplicateSync(NSSyncInfo *);
\r
44 NSSyncInfo * NSGetSyncInfo(OCPayload * payload);
\r
46 NSResult NSFreeConsumer(NSConsumer *);
\r
47 NSConsumer * NSDuplicateConsumer(NSConsumer *);
\r
49 void NSDuplicateSetPropertyString(OCRepPayload **, const char *, const char *);
\r
50 NSResult NSGenerateUUIDStr(char uuidStr[UUID_STRING_SIZE]);
\r
52 char * NSGetValueFromQuery(char *query, char * compareKey);
\r
55 #endif /* _NS_UTIL__H_ */
\r