Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Call / EventFindCallHistory.cpp
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 #include "EventFindCallHistory.h"
19
20 using namespace TizenApis::Api::Tizen;
21
22 namespace TizenApis {
23 namespace Api {
24 namespace Call {
25 EventFindCallHistory::EventFindCallHistory() : m_filterIsSet(false),
26                                 m_sortModesIsSet(false),
27                                 m_limitIsSet(false),
28                                 m_offsetIsSet(false)
29 {
30 }
31
32 void EventFindCallHistory::setFilter(const FilterPtr &filter)
33 {
34         m_filter = filter;
35         m_filterIsSet = true;
36 }
37
38 void EventFindCallHistory::setSortMode(const SortModePtr &sortMode)
39 {
40         m_sortModes = sortMode;
41         m_sortModesIsSet = true;
42 }
43
44 void EventFindCallHistory::setLimit(const unsigned long limit)
45 {
46         if (limit > 0) {
47                 m_limit = limit;
48                 m_limitIsSet = true;
49         }
50 }
51
52 void EventFindCallHistory::setOffset(const unsigned long offset)
53 {
54         if (offset > 0) {
55                 m_offset = offset;
56                 m_offsetIsSet = true;
57         }
58 }
59
60 void EventFindCallHistory::setResult(const CallHistoryEntryListPtr &callEntries)
61 {
62         m_callEntries = callEntries; 
63 }
64
65 FilterPtr EventFindCallHistory::getFilter() const
66 {
67         return m_filter;
68 }
69
70 SortModePtr EventFindCallHistory::getSortMode() const
71 {
72         return m_sortModes;
73 }
74
75 unsigned long EventFindCallHistory::getLimit() const
76 {
77         return m_limit;
78 }
79
80 unsigned long EventFindCallHistory::getOffset() const
81 {
82         return m_offset;
83 }
84
85 bool EventFindCallHistory::getFilterIsSet() const
86 {
87         return m_filterIsSet;
88 }
89
90 bool EventFindCallHistory::getSortModesIsSet() const
91 {
92         return m_sortModesIsSet;
93 }
94
95 bool EventFindCallHistory::getLimitIsSet() const
96 {
97         return m_limitIsSet;
98 }
99
100 bool EventFindCallHistory::getOffsetIsSet() const
101 {
102         return m_offsetIsSet;
103 }
104
105 CallHistoryEntryListPtr EventFindCallHistory::getResult() const
106 {
107         return m_callEntries;
108 }
109
110 }
111 }
112 }