Git Init
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Contact / EventAddressBookFind.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  * @file        EventAddressBookFind.h
19  * @author      Kisub Song (kisubs.song@samsung.com)
20  * @version     0.1
21  * @brief
22  */
23
24 #ifndef _API_CONTACT_EVENT_ADDRESS_BOOK_FIND_H_
25 #define _API_CONTACT_EVENT_ADDRESS_BOOK_FIND_H_
26
27 #include <dpl/shared_ptr.h>
28 #include <Commons/IEvent.h>
29 #include <API/Filter/IFilter.h>
30 #include <API/Filter/SortMode.h>
31 #include "ContactTypes.h"
32 #include "Contact.h"
33
34 namespace TizenApis {
35 namespace Api {
36 namespace Contact {
37
38 /* Event sent while searching contacts */
39 class EventAddressBookFind : public WrtDeviceApis::Commons::IEvent<EventAddressBookFind>
40 {
41 private:
42         bool    m_result;
43
44         /* parameters */
45         Tizen::FilterPtr            m_filter;
46         Tizen::SortModeArrayPtr     m_sortModes;
47 //      StringArrayPtr              m_attributesOfInterest;
48
49         bool    m_filterIsSet;
50         bool    m_sortModesIsSet;
51 //      bool    m_attributesOfInterestIsSet;
52
53         /* results */
54         ContactArrayPtr         m_contacts;
55
56         bool    m_contactsIsSet;
57
58 public:
59         EventAddressBookFind() :
60                 m_result(false),
61                 m_filterIsSet(false),
62                 m_sortModesIsSet(false),
63 //              m_attributesOfInterestIsSet(false),
64                 m_contactsIsSet(false)
65         {
66         }
67
68         virtual ~EventAddressBookFind()
69         {
70         }
71
72         virtual void clearOnCancel()
73         {
74         }
75
76         void setResult(bool value)
77         {
78                 m_result = value;
79         }
80
81         bool getResult() const
82         {
83                 return m_result;
84         }
85
86         Tizen::FilterPtr getFilter() const
87         {
88                 return m_filter;
89         }
90
91         void setFilter(const Tizen::FilterPtr &value)
92         {
93                 m_filter = value;
94                 m_filterIsSet = true;
95         }
96
97         bool getFilterIsSet() const
98         {
99                 return m_filterIsSet;
100         }
101
102         Tizen::SortModeArrayPtr getSortModes() const
103         {
104                 return m_sortModes;
105         }
106
107         void setSortModes(const Tizen::SortModeArrayPtr &value)
108         {
109                 m_sortModes = value;
110                 m_sortModesIsSet = true;
111         }
112
113         bool getSortModesIsSet() const
114         {
115                 return m_sortModesIsSet;
116         }
117
118 //      StringArrayPtr getAttributesOfInterest() const
119 //      {
120 //              return m_attributesOfInterest;
121 //      }
122 //
123 //      void setAttributesOfInterest(const StringArrayPtr &value)
124 //      {
125 //              m_attributesOfInterest = value;
126 //              m_attributesOfInterestIsSet = true;
127 //      }
128 //
129 //      bool getAttributesOfInterestIsSet() const
130 //      {
131 //              return m_attributesOfInterestIsSet;
132 //      }
133
134         ContactArrayPtr getContacts() const
135         {
136                 return m_contacts;
137         }
138
139         void setContacts(const ContactArrayPtr &value)
140         {
141                 m_contacts = value;
142                 m_contactsIsSet = true;
143         }
144
145         bool getContactsIsSet() const
146         {
147                 return m_contactsIsSet;
148         }
149 };
150
151 typedef DPL::SharedPtr<EventAddressBookFind> EventAddressBookFindPtr;
152
153 } // Contact
154 } // Api
155 } // TizenApis
156
157 #endif // _API_CONTACT_EVENT_ADDRESS_BOOK_FIND_H_