Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Contact / ContactProperties.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        ContactProperties.h
19  * @author      Kisub Song (kisubs.song@samsung.com)
20  * @version     0.1
21  * @brief
22  */
23
24 #ifndef _API_CONTACT_CONTACT_PROPERTIES_H_
25 #define _API_CONTACT_CONTACT_PROPERTIES_H_
26
27 #include <ctime>
28 #include <string>
29 #include <vector>
30 #include <dpl/log/log.h>
31 #include <dpl/shared_ptr.h>
32 #include "ContactTypes.h"
33 #include "ContactName.h"
34 #include "ContactAccount.h"
35 #include "ContactAddress.h"
36 #include "ContactPhoneNumber.h"
37 #include "ContactEmailAddress.h"
38 #include "ContactAnniversary.h"
39 #include "ContactOrganization.h"
40 #include "ContactWebSite.h"
41
42 namespace TizenApis {
43 namespace Api {
44 namespace Contact {
45
46 class ContactProperties;
47 typedef DPL::SharedPtr<ContactProperties> ContactPropertiesPtr;
48
49 typedef std::vector<ContactPropertiesPtr> ContactPropertiesArray;
50 typedef DPL::SharedPtr<ContactPropertiesArray> ContactPropertiesArrayPtr;
51
52 class ContactProperties
53 {
54 public:
55         ContactProperties();
56         virtual ~ContactProperties();
57
58         ContactNamePtr getName() const;
59         void setName(const ContactNamePtr &value);
60         bool getNameIsSet() const;
61
62         ContactAccountPtr getAccount() const;
63         void setAccount(const ContactAccountPtr &value);
64         bool getAccountIsSet() const;
65
66         ContactAddressArrayPtr getAddresses() const;
67         void setAddresses(const ContactAddressArrayPtr &value);
68         void addAddress(const ContactAddressPtr &value);
69         int  getAddressesNum() const;
70
71         std::string getPhotoURI() const;
72         void setPhotoURI(const std::string &value);
73         bool getPhotoURIIsSet() const;
74
75         ContactPhoneNumberArrayPtr getPhoneNumbers() const;
76         void setPhoneNumbers(const ContactPhoneNumberArrayPtr &value);
77         void addPhoneNumber(const ContactPhoneNumberPtr &value);
78         int  getPhoneNumbersNum() const;
79
80         ContactEmailAddressArrayPtr getEmails() const;
81         void setEmails(const ContactEmailAddressArrayPtr &value);
82         void addEmail(const ContactEmailAddressPtr& value);
83         int  getEmailsNum() const;
84
85         std::tm getBirthday() const;
86         void setBirthday(const std::tm &value);
87         bool getBirthdayIsSet() const;
88
89         ContactAnniversaryArrayPtr getAnniversaries() const;
90         void setAnniversaries(const ContactAnniversaryArrayPtr &value);
91         void addAnniversary(const ContactAnniversaryPtr &value);
92         int  getAnniversariesNum() const;
93
94         ContactOrganizationPtr getOrganization() const;
95         void setOrganization(const ContactOrganizationPtr &value);
96         bool getOrganizationIsSet() const;
97
98         StringArrayPtr getNotes() const;
99         void setNotes(const StringArrayPtr &value);
100         void addNote(const std::string &value);
101         int  getNotesNum() const;
102
103         ContactWebSiteArrayPtr getUrls() const;
104         void setUrls(const ContactWebSiteArrayPtr &value);
105         void addUrl(const ContactWebSitePtr &value);
106         int  getUrlsNum() const;
107
108         bool getIsFavorite() const;
109         void setIsFavorite(const bool &value);
110
111         std::string getRingtoneURI() const;
112         void setRingtoneURI(const std::string &value);
113         bool getRingtoneURIIsSet() const;
114
115         StringArrayPtr getCategories() const;
116         void setCategories(const StringArrayPtr &value);
117         void addCategory(const std::string &value);
118         int  getCategoriesNum() const;
119
120         void clear();
121         ContactPropertiesPtr clone();
122
123 private:
124         ContactNamePtr                          m_name;
125         ContactAccountPtr                       m_account;
126         ContactAddressArrayPtr      m_addresses;
127         std::string                 m_photoURI;
128         ContactPhoneNumberArrayPtr  m_phoneNumbers;
129         ContactEmailAddressArrayPtr m_emails;
130         std::tm                     m_birthday;
131         ContactAnniversaryArrayPtr  m_anniversaries;
132         ContactOrganizationPtr      m_organization;
133         StringArrayPtr              m_notes;
134         ContactWebSiteArrayPtr      m_urls;
135         bool                        m_isFavorite;
136         std::string                 m_ringtoneURI;
137         StringArrayPtr              m_categories;
138
139         bool m_nameIsSet;
140         bool m_accountIsSet;
141         bool m_photoURIIsSet;
142         bool m_birthdayIsSet;
143         bool m_organizationIsSet;
144         bool m_ringtoneURIIsSet;
145 };
146
147 } // Contact
148 } // Api
149 } // TizenApis
150
151 #endif // _API_CONTACT_CONTACT_PROPERTIES_H_