Initial merge-commit of the OIC code. Should successfully do discovery for single...
[platform/upstream/iotivity.git] / include / InProcServerWrapper.h
1 //******************************************************************
2 //
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
5
6 #ifndef _IN_PROC_SERVER_WRAPPER_H_
7 #define _IN_PROC_SERVER_WRAPPER_H_
8
9 #include <thread>
10 #include <mutex>
11 #include <ocstack.h>
12 #include <OCApi.h>
13 #include <IServerWrapper.h>
14 #include <OCReflect.h>
15
16 using namespace OC::OCReflect;
17
18 namespace OC
19 {
20     class InProcServerWrapper : public IServerWrapper
21     {
22     public:
23         InProcServerWrapper(PlatformConfig cfg);
24         virtual ~InProcServerWrapper();
25
26         void registerResource(  const std::string& resourceURI, 
27                                 const std::string& resourceTypeName,
28                                 named_property_binding_vector properties); 
29                                                                 
30         private:
31                 void processFunc();
32                 std::thread m_processThread;
33         bool m_threadRun;
34                 std::mutex m_csdkLock;
35     };
36 }
37
38 #endif