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
35 #include "oic_time.h"
\r
36 #include "NSProviderSystem.h"
\r
38 OCEntityHandlerRequest *NSCopyOCEntityHandlerRequest(OCEntityHandlerRequest *);
\r
39 NSResult NSFreeOCEntityHandlerRequest(OCEntityHandlerRequest *);
\r
41 NSMessage * NSInitializeMessage();
\r
42 NSResult NSFreeMessage(NSMessage *);
\r
43 NSMessage * NSDuplicateMessage(NSMessage *);
\r
45 NSResult NSFreeSync(NSSyncInfo *);
\r
46 NSSyncInfo * NSDuplicateSync(NSSyncInfo *);
\r
47 NSSyncInfo * NSGetSyncInfo(OCPayload * payload);
\r
49 NSResult NSFreeConsumer(NSConsumer *);
\r
50 NSConsumer * NSDuplicateConsumer(NSConsumer *);
\r
52 void NSDuplicateSetPropertyString(OCRepPayload **, const char *, const char *);
\r
53 void NSDuplicateSetPropertyInt(OCRepPayload ** msgPayload, const char * name, int64_t value);
\r
54 NSResult NSGenerateUUIDStr(char uuidStr[UUID_STRING_SIZE]);
\r
56 char * NSGetValueFromQuery(char *query, char * compareKey);
\r
57 NSResult NSFreeMalloc(char ** obj);
\r
59 NSResult NSFreeMediaContents(NSMediaContents * obj);
\r
60 NSMediaContents * NSDuplicateMediaContents(NSMediaContents * copyObj);
\r
62 #endif /* _NS_UTIL__H_ */
\r