upload tizen1.0 source
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Messaging / EventQueryMessages.h
1 /*
2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License. 
15 */
16
17
18 /**
19  *
20  *
21  * @file       EventQueryMessage.h
22  * @author     Pawel Misiak (p.misiak@samsung.com)
23  * @version    0.1
24  * @brief
25  */
26 #ifndef EVENTQUERYMESSAGES_H
27 #define EVENTQUERYMESSAGES_H
28
29 #include <vector>
30 #include <dpl/shared_ptr.h>
31 #include <Commons/IEvent.h>
32 #include <API/Filter/SortMode.h>
33
34 #include "IMessage.h"
35
36 namespace TizenApis {
37 namespace Api {
38 namespace Messaging {
39
40 class EventQueryMessages;
41
42 typedef DPL::SharedPtr<EventQueryMessages> EventQueryMessagesPtr;
43
44 class EventQueryMessages :
45     public WrtDeviceApis::Commons::IEvent<EventQueryMessages>
46 {
47         private:
48         Api::Tizen::FilterPtr m_filter;
49         Api::Tizen::SortModePtr m_sortMode;
50         long m_limit;
51         long m_offset;
52         long m_index;
53         int m_type;
54
55   public:
56         EventQueryMessages() : m_limit(0), m_offset(0), m_index(-1), m_type(-1){
57         }
58     // input parameters
59     std::vector<MessageType> messageTypes;
60     std::vector<FolderType> folderTypes;
61
62     //output parameter
63     std::vector<Api::Messaging::IMessagePtr> msgs;
64
65         public:
66                 void setFilter(const Api::Tizen::FilterPtr& filter) {
67                         m_filter = filter;
68                 }
69
70                 Api::Tizen::FilterPtr getFilter() {
71                         return m_filter;
72                 }
73
74                 void setSortMode(const Api::Tizen::SortModePtr& sortMode) {
75                         m_sortMode = sortMode;
76                 }
77
78                 Api::Tizen::SortModePtr getSortMode() {
79                         return m_sortMode;
80                 }
81
82                 void setLimit(long limit){
83                         m_limit = limit;
84                 }
85
86                 long getLimit(){
87                         return m_limit;
88                 }
89
90                 void setOffset(long offset){
91                         m_offset = offset;
92                 }
93
94                 long getOffset(){
95                         return m_offset;
96                 }
97
98                 void setIndex(long index){
99                         m_index = index;
100                 }
101
102                 long getIndex(){
103                         return m_index;
104                 }
105
106                 void setType(int type){
107                         m_type = type;
108                 }
109
110                 int getType(){
111                         return m_type;
112                 }       
113
114     virtual void clearOnCancel()
115     {
116     }
117 };
118 }
119 }
120 }
121 #endif