1 //******************************************************************
3 // Copyright 2014 Intel Corporation All Rights Reserved.
4 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 #ifndef _IN_PROC_CLIENT_WRAPPER_H_
7 #define _IN_PROC_CLIENT_WRAPPER_H_
14 #include <boost/property_tree/ptree.hpp>
15 #include <boost/property_tree/json_parser.hpp>
19 #include <IClientWrapper.h>
20 #include <InitializeException.h>
21 #include <ResourceInitException.h>
25 class InProcClientWrapper : public IClientWrapper
28 InProcClientWrapper(PlatformConfig cfg);
29 virtual ~InProcClientWrapper();
31 virtual int ListenForResource(const std::string& serviceUrl, const std::string& resourceType, std::function<void(OCResource::Ptr)>& callback);
35 std::thread m_listeningThread;
37 std::mutex m_resourceListenerLock;
38 std::mutex m_csdkLock;
39 std::vector<std::function<void(OCClientResponse*)>> callbackList;