c50e09e5af6ffca9ca4855b5cdcc0d039151826f
[framework/web/wrt-plugins-tizen.git] / src / DataControl / EventSelect.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18
19 #ifndef TIZENAPIS_API_EVENT_SELECT_H_
20 #define TIZENAPIS_API_EVENT_SELECT_H_
21
22 #include <Commons/IEvent.h>
23 #include <dpl/shared_ptr.h>
24 #include "RowData.h"
25 #include <Logger.h>
26
27 namespace DeviceAPI {
28 namespace DataControl {
29
30 class EventSelect : public WrtDeviceApis::Commons::IEvent<EventSelect>
31 {
32 private :
33         std::vector<std::string> m_columns;
34
35         unsigned int m_reqId;
36         std::string m_where;
37         std::string m_order;
38         std::string m_page;
39         std::string m_numberPerPage;
40         std::string m_resultSetPath;
41         std::string m_errorMsg;
42 public:
43         EventSelect() {
44                 LoggerD("entered"); 
45                 m_reqId = 0;
46                 m_where = "";
47                 m_order = "";
48                 m_page = "";
49                 m_numberPerPage = "";
50                 m_resultSetPath = "";
51                 m_errorMsg = "";                
52         }
53         ~EventSelect() { }
54
55         unsigned int getReqId() { return m_reqId; }
56         std::string getWhere() { return m_where; }
57         std::string getPage() { return m_page; }
58         std::string getOrder() { return m_order; }
59         std::string getNumerPerPage() { return m_numberPerPage; }
60         std::vector<std::string> getColumns() { return m_columns;}
61         std::string getResultSetPath() { return m_resultSetPath;}
62         std::string getErrorMsg() { return m_errorMsg;}
63
64         void setReqId(const unsigned int & reqId) { m_reqId = reqId;}
65         void setWhere(const std::string& where) { m_where = where; }
66         void setOrder(const std::string& order) { m_order = order; }
67         void setPage(const std::string& page) { m_page = page;}
68         void setNumberPerPage(const std::string &number) { m_numberPerPage = number;}
69         void setColumns(const std::vector<std::string>& columns) { m_columns = columns;}
70         void setResultSetPath(const std::string& path) { m_resultSetPath = path;}
71         void setErrorMsg(const std::string& msg) { m_errorMsg = msg;}
72 };
73
74 typedef DPL::SharedPtr<EventSelect> EventSelectPtr;
75
76 }
77
78 #endif