63b94c88dd261aa65902876573a37626f5e1de96
[platform/upstream/iotivity.git] / service / soft-sensor-manager / SampleApp / linux / SSMTesterApp / include / SSMTestApp.h
1 /******************************************************************
2  *
3  * Copyright 2014 Samsung Electronics All Rights Reserved.
4  *
5  *
6  *
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
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
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.
18  *
19  ******************************************************************/
20
21 /*
22  * SSMTestApp.h
23  */
24
25 #ifndef SSMTESTAPP_H_
26 #define SSMTESTAPP_H_
27
28 #include <string>
29
30 #include "OCResource.h"
31 #include "OCPlatform.h"
32 #include "SSMInterface.h"
33 #include "SSMClient.h"
34 #include "ISSMClientListener.h"
35
36 namespace APPMenu
37 {
38     typedef enum
39     {
40         NONE = 0, REGISTER, UNREGISTER, DISCOMFORT_SAMPLE, EXIT = 9
41     } APPMenu;
42 }
43 ;
44
45 typedef enum
46 {
47     ALL_DISCOMPORT = 2, HALF_DISCOMPORT, LITTLE_DISCOMPORT, ALL_COMPORT
48 } DIResult;
49
50 class SSMTestApp: public ISSMClientListener
51     , public IQueryEngineEvent
52 {
53     private:
54         //SSMClient m_SSMClient;
55         SSMInterface m_SSMClient;
56
57     public:
58
59         SSMTestApp();
60
61         void displayMenu();
62         void registerQuery(std::string queryString);
63         void unregisterQuery();
64
65         /* operations from listener interface */
66         void onRegisterQuery(const AttributeMap &attributeMap, SSMReturn &eCode);
67         SSMRESULT onQueryEngineEvent(int cqid, IDataReader *pResult);
68 };
69
70 #endif /* SSMTESTAPP_H_ */