Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Mediacontent / IEventFindFolder.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 #ifndef _ABSTRACT_LAYER_IEVENT_FIND_FOLDER_H_
20 #define _ABSTRACT_LAYER_IEVENT_FIND_FOLDER_H_
21
22 #include <vector>
23 #include <Commons/IEvent.h>
24 #include <dpl/shared_ptr.h>
25 #include <API/Filter/IFilter.h>
26 #include <API/Filter/SortMode.h>
27 #include "MediacontentFolder.h"
28
29
30 using namespace std;
31
32 namespace TizenApis {
33 namespace Api {
34 namespace Mediacontent {
35
36 class IEventFindFolder : public WrtDeviceApis::Commons::IEvent<IEventFindFolder>
37 {
38         public:
39         IEventFindFolder()
40         {       
41                 m_result = false;
42                 m_filterIsSet = false;
43                 m_sortModesIsSet = false;
44                 m_limitIsSet = false;
45                 m_offsetIsSet = false;
46                 
47         }
48         ~IEventFindFolder(){}           
49         
50         void addFolder(MediacontentFolderPtr value)
51         { 
52                 m_folder.push_back(value);
53         }
54         
55         void setResult(bool value)
56         {
57                 m_result = value;
58         }
59
60         vector<MediacontentFolderPtr> getFolder()
61         {
62                 return m_folder; 
63         }
64
65         void setLimit(const unsigned long value)
66         {
67                 m_limitIsSet = true;
68                 m_limit = value;
69         }
70         void setOffset(const unsigned long value)
71         {
72                 m_offsetIsSet = true;
73                 m_offset = value;
74         }
75
76         void setFilter(const Tizen::FilterPtr &value)
77         {
78                 m_filter = value;
79                 m_filterIsSet = true;
80         }
81
82         void setSortModes(const Tizen::SortModeArrayPtr &value)
83         {
84                 m_sortModes = value;
85                 m_sortModesIsSet = true;
86         }
87
88         bool getLimitIsSet() const
89         {
90                 return m_limitIsSet;
91         }
92         
93         bool getOffsetIsSet() const
94         {
95                 return m_offsetIsSet;
96         }
97
98         bool getResult()const
99         {
100                 return m_result; 
101         }
102
103         bool getFilterIsSet()const
104         {
105                 return m_filterIsSet; 
106         }
107         
108         bool getSortModesIsSet()const
109         {
110                 return m_sortModesIsSet; 
111         }
112
113         unsigned long getLimit() const
114         {
115                 return m_limit;
116         }
117         
118         unsigned long getOffset() const
119         {
120                 return m_offset;
121         }       
122
123         FilterPtr getFilter() const
124         {
125                 return m_filter;
126         }
127         
128         SortModeArrayPtr getSortModes() const
129         {
130                 return m_sortModes;
131         }
132
133
134
135         virtual void clearOnCancel(){;}
136
137
138         private:
139         bool m_filterIsSet;
140         bool m_sortModesIsSet;
141
142         bool m_result;                                  //OUTPUT: operation result
143         bool m_limitIsSet;
144         bool m_offsetIsSet;
145
146
147         unsigned long m_limit;
148         unsigned long m_offset;
149         FilterPtr m_filter;
150         SortModeArrayPtr m_sortModes;
151         vector<MediacontentFolderPtr> m_folder;           //OUTPUT: result list
152
153
154         
155 };
156
157 typedef DPL::SharedPtr<IEventFindFolder> IEventFindFolderPtr;
158
159 }
160 }
161 }
162 #endif /* _ABSTRACT_LAYER_IEVENT_FIND_FOLDER_H_ */