2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file ContactEmail.h
18 * @author Lukasz Marek (l.marek@samsung.com)
22 #ifndef WRTDEVICEAPIS_CONTACT_CONTACT_ADDRESS_H_
23 #define WRTDEVICEAPIS_CONTACT_CONTACT_ADDRESS_H_
27 #include <dpl/shared_ptr.h>
29 namespace WrtDeviceApis {
35 typedef DPL::SharedPtr<ContactAddress> ContactAddressPtr;
36 typedef std::vector<ContactAddressPtr> ContactAddressPtrList;
38 /* This object represents an address data of a contact */
45 CONTACT_ADDRESS_TYPE_WORK,
46 CONTACT_ADDRESS_TYPE_PREF,
47 CONTACT_ADDRESS_TYPE_HOME
54 void setId(int value);
56 std::string getCountry() const;
57 void setCountry(const std::string &value);
59 std::string getRegion() const;
60 void setRegion(const std::string &value);
62 std::string getCounty() const;
63 void setCounty(const std::string &value);
65 std::string getCity() const;
66 void setCity(const std::string &value);
68 std::string getStreet() const;
69 void setStreet(const std::string &value);
71 std::string getStreetNumber() const;
72 void setStreetNumber(const std::string &value);
74 std::string getPremises() const;
75 void setPremises(const std::string &value);
77 std::string getAdditionalInformation() const;
78 void setAdditionalInformation(const std::string &value);
80 std::string getPostalCode() const;
81 void setPostalCode(const std::string &value);
83 std::vector<ContactAddressType> getTypes() const;
84 void addType(const ContactAddressType value);
85 void setTypes(const std::vector<ContactAddressType> &value);
86 bool isTypeOf(const ContactAddressType value) const;
87 void setTypeFilter(const ContactAddressType value);
88 ContactAddressType getTypeFilter() const;
90 //returns m_country, ..., m_postalCode
91 //fields concatenated into single string
92 std::string getAsSingleString() const;
93 std::string getAddress() const;
94 void setAddress(const std::string &value);
96 bool compareTo(const ContactAddressPtr &address,
97 bool includeId = false,
98 bool includeTypes = false) const;
99 ContactAddressPtr clone() const;
101 bool getCountryIsSet() const;
102 bool getRegionIsSet() const;
103 bool getCountyIsSet() const;
104 bool getCityIsSet() const;
105 bool getStreetIsSet() const;
106 bool getStreetNumberIsSet() const;
107 bool getPremisesIsSet() const;
108 bool getAdditionalInformationIsSet() const;
109 bool getPostalCodeIsSet() const;
113 std::string m_country;
114 std::string m_region;
115 std::string m_county;
117 std::string m_street;
118 std::string m_streetNumber;
119 std::string m_premises;
120 std::string m_additionalInformation;
121 std::string m_postalCode;
122 std::vector<ContactAddressType> m_types;
124 //this field is free form fieldand should not be used.
125 //it holds data used by Jil standard, but fields
126 //m_country, ..., m_postalCode should be used instead
127 std::string m_address;
134 bool m_streetNumberIsSet;
135 bool m_premisesIsSet;
136 bool m_additionalInformationIsSet;
137 bool m_postalCodeIsSet;
144 #endif // WRTDEVICEAPIS_CONTACT_CONTACT_ADDRESS_H_