1 /******************************************************************
3 * Copyright 2014 Samsung Electronics All Rights Reserved.
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 ******************************************************************/
20 #ifndef _SoftSensorManager_H_
21 #define _SoftSensorManager_H_
23 #include "SSMInterface/SSMCore.h"
24 #include "Common/PlatformLayer.h"
25 #include "Common/InternalInterface.h"
28 * @class CSoftSensorManager
29 * @brief CSoftSensorManager Interface
30 * This class represents main class of SSM.
33 * static ISoftSensorManager *g_pSoftSensorManager = NULL;
34 * CreateInstance(OID_ISoftSensorManager, (IBase**)&g_pSoftSensorManager);
35 * g_pSoftSensorManager->TerminateCore();
36 * g_pSoftSensorManager->Release();
39 class CSoftSensorManager :
40 public CObjectRoot<CObjectMultiThreadModel>
41 , public ISoftSensorManager
44 CObjectPtr<IContextRepository> m_pContextRepository;
45 CObjectPtr<IPropagationEngine> m_pPropagationEngine;
46 CObjectPtr<ISensingEngine> m_pSensingEngine;
49 SSMRESULT finalConstruct();
53 SSMRESULT queryInterface(const OID &objectID, IBase **ppObject)
58 if (IsEqualOID(objectID, OID_ISoftSensorManager))
66 return SSM_E_NOINTERFACE;
71 * @brief Initialize core using given configuration information.
74 * <UDN>windows7-31f8-11b4-a222-08002b34c003</UDN>
80 * @param [in] std::string xmlDescription - specification described in XML
81 * @param [out] IBase** ppvObject - reference pointer to get instance pointer
87 SSMRESULT initializeCore(std::string xmlDescription);
92 * This enables network capability that can discover and discovered.
100 SSMRESULT startCore();
105 * This disables network capability that can discover and discovered.
113 SSMRESULT stopCore();
117 * @brief Terminates Core.
118 * Free all allocated resources
126 SSMRESULT terminateCore(bool factoryResetFlag);
129 * @fn createQueryEngine
130 * @brief Create new Query Engine instance.
131 * Each engine instance has it's own event thread
132 * we recommend each application should creates only one instance.
134 * @param [out] IQueryEngine **ppQueryEngine - instance pointer of new Query Engine
140 SSMRESULT createQueryEngine(IQueryEngine **ppQueryEngine);
143 * @fn releaseQueryEngine
144 * @brief Release exists Query Engine instance.
146 * @param [in] IQueryEngine *pQueryEngine - instance pointer of exists Query Engine
152 unsigned long releaseQueryEngine(IQueryEngine *pQueryEngine);
155 * @fn getInstalledModelList
156 * @brief Gets all installed models from local and remote
158 * @param [out] std::vector<ISSMResource*> *pList - List of installed context model
165 SSMRESULT getInstalledModelList(std::vector<ISSMResource *> *pList);