1 //******************************************************************
3 // Copyright 2014 Intel Mobile Communications GmbH 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 _IN_PROC_SERVER_WRAPPER_H_
22 #define _IN_PROC_SERVER_WRAPPER_H_
28 #include <IServerWrapper.h>
30 using namespace OC::OCReflect;
34 class InProcServerWrapper : public IServerWrapper
37 InProcServerWrapper(std::weak_ptr<std::mutex> csdkLock, PlatformConfig cfg);
38 virtual ~InProcServerWrapper();
40 virtual OCStackResult registerResource(
41 OCResourceHandle& resourceHandle,
42 std::string& resourceURI,
43 const std::string& resourceTypeName,
44 const std::string& resourceInterface,
45 RegisterCallback& entityHandler,
46 uint8_t resourceProperty);
48 virtual OCStackResult unregisterResource(
49 const OCResourceHandle& resourceHandle);
51 virtual OCStackResult bindTypeToResource(
52 const OCResourceHandle& resourceHandle,
53 const std::string& resourceTypeName);
55 virtual OCStackResult bindInterfaceToResource(
56 const OCResourceHandle& resourceHandle,
57 const std::string& resourceInterface);
59 virtual OCStackResult startPresence(const unsigned int seconds);
61 virtual OCStackResult stopPresence();
64 std::thread m_processThread;
66 std::weak_ptr<std::mutex> m_csdkLock;