SSM: Remove IN/OUT macros
[platform/upstream/iotivity.git] / service / soft-sensor-manager / SSMCore / src / QueryProcessor / ConditionedQueryResult.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 #ifndef _ConditionedQueryResult_H_
21 #define _ConditionedQueryResult_H_
22
23 #include "SSMInterface/SSMCore.h"
24 #include "Common/PlatformLayer.h"
25 #include "Common/InternalInterface.h"
26
27 /**
28 * @class    CConditionedQueryResult
29 * @brief    CConditionedQueryResult Interface
30 *            This class represents executed CQL's result data
31 *
32 * @see
33 */
34 class CConditionedQueryResult :
35     public CObjectRoot<CObjectMultiThreadModel>
36     , public IConditionedQueryResult
37 {
38     private:
39         std::vector<IConditionedModel *>         m_conditionedModels;
40
41     public:
42         SSMRESULT finalConstruct();
43
44         void finalRelease();
45
46         /**
47         * @fn     addConditionedModel
48         * @brief Add conditioned model interface for tracking trigger
49         *
50         * @param [in] IConditionedModel *pConditionedModel - Conditioned Model interface that contains results
51         *
52         * @return SSMRESULT
53         * @warning
54         * @exception
55         * @see
56         */
57         SSMRESULT addConditionedModel(IConditionedModel *pConditionedModel);
58
59         SSMRESULT queryInterface(const OID &objectID, IBase **ppObject)
60         {
61             if (ppObject == NULL)
62                 return SSM_E_POINTER;
63
64             if (IsEqualOID(objectID, OID_IConditionedQueryResult))
65             {
66                 IBase *pBase = this;
67                 pBase->addRef();
68                 *ppObject = pBase;
69                 return SSM_S_OK;
70             }
71
72             return SSM_E_NOINTERFACE;
73         }
74
75         /**
76         * @fn     getConditionedModelCount
77         * @brief Get conditioned model count
78         *
79         * @param NONE
80         *
81         * @return unsigned int
82         * @warning
83         * @exception
84         * @see
85         */
86         unsigned int getConditionedModelCount();
87
88         /**
89         * @fn     getConditionedContextModel
90         * @brief Get conditioned model by index
91         *
92         * @param [in] unsigned int conditionedModelIndex - Index of Conditioned Model interface for retrieving
93         * @param [out] IConditionedModel *pConditionedModel - Conditioned Model interface that contains results
94         *
95         * @return SSMRESULT
96         * @warning
97         * @exception
98         * @see
99         */
100         SSMRESULT getConditionedContextModel(unsigned int conditionedModelIndex,
101                                              IConditionedModel **ppConditionedModel);
102 };
103
104 #endif