tizen beta release
[platform/framework/web/wrt-plugins-common.git] / src / modules / API / Contact / ContactFilter.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  * @file        ContactFilter.h
18  * @author      Lukasz Marek (l.marek@samsung.com)
19  * @version     0.1
20  */
21
22 #ifndef WRTDEVICEAPIS_CONTACT_CONTACT_FILTER_H_
23 #define WRTDEVICEAPIS_CONTACT_CONTACT_FILTER_H_
24
25 #include <string>
26 #include <dpl/shared_ptr.h>
27 #include <Contact/Contact.h>
28
29 namespace WrtDeviceApis {
30 namespace Contact {
31 namespace Api {
32
33 /* This class is used as filter while searching contacts */
34 class ContactFilter
35 {
36   public:
37
38     ContactFilter();
39     virtual ~ContactFilter();
40
41     int getIdFilter() const;
42     void setIdFilter(int value);
43
44     std::string getFullNameFilter() const;
45     void setFullNameFilter(const std::string &value);
46
47     std::string getFirstNameFilter() const;
48     void setFirstNameFilter(const std::string &value);
49
50     std::string getLastNameFilter() const;
51     void setLastNameFilter(const std::string &value);
52
53     std::string getPhoneticNameFilter() const;
54     void setPhoneticNameFilter(const std::string &value);
55
56     std::string getCompanyFilter() const;
57     void setCompanyFilter(const std::string &value);
58
59     std::string getTitleFilter() const;
60     void setTitleFilter(const std::string &value);
61
62     const std::vector<ContactPhoneNumberPtr> &getPhoneNumberFilter() const;
63     void setPhoneNumberFilter(const std::vector<ContactPhoneNumberPtr> &value);
64
65     const std::vector<ContactEmailPtr> &getEmailFilter() const;
66     void setEmailFilter(const std::vector<ContactEmailPtr> &value);
67
68     const std::vector<std::string> &getNickNameFilter();
69     void setNickNameFilter(const std::vector<std::string> &value);
70
71     const std::vector<ContactAddressPtr> &getAddressFilter();
72     void setAddressFilter(const std::vector<ContactAddressPtr> &value);
73
74     std::string getGroupFilter() const;
75     void setGroupFilter(const std::string &value);
76
77     bool getIdIsSet() const;
78     bool getFullNameIsSet() const;
79     bool getFirstNameIsSet() const;
80     bool getLastNameIsSet() const;
81     bool getPhoneticNameIsSet() const;
82
83     bool getCompanyIsSet() const;
84     bool getTitleIsSet() const;
85     bool getPhoneNumberIsSet() const;
86     bool getEmailIsSet() const;
87     bool getNickNameIsSet() const;
88
89     bool getAddressIsSet() const;
90     bool getGroupIsSet() const;
91
92   protected:
93     int m_id;
94     std::string m_fullName; //display name e.g. m_firstName + m_lastName
95     std::string m_firstName;
96     std::string m_lastName;
97     std::string m_phoneticName;
98
99     std::string m_company;
100     std::string m_title;
101     std::vector<ContactPhoneNumberPtr> m_phoneNumber;
102     std::vector<ContactEmailPtr> m_email;
103     std::vector<std::string> m_nickname;
104
105     std::vector<ContactAddressPtr> m_address;
106     std::string m_group;
107
108     bool m_fullNameIsSet;
109     bool m_firstNameIsSet;
110     bool m_lastNameIsSet;
111     bool m_phoneticNameIsSet;
112     bool m_companyIsSet;
113     bool m_titleIsSet;
114     bool m_groupIsSet;
115 };
116
117 typedef DPL::SharedPtr<ContactFilter> ContactFilterPtr;
118
119 }
120 }
121 }
122
123 #endif // WRTDEVICEAPIS_CONTACT_CONTACT_FILTER_H_