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