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 ContactPhoneNumber.h
18 * @author Lukasz Marek (l.marek@samsung.com)
22 #ifndef WRTDEVICEAPIS_CONTACT_CONTACT_PHONE_NUMBER_H_
23 #define WRTDEVICEAPIS_CONTACT_CONTACT_PHONE_NUMBER_H_
28 #include <dpl/shared_ptr.h>
30 namespace WrtDeviceApis {
34 class ContactPhoneNumber;
36 typedef DPL::SharedPtr<ContactPhoneNumber> ContactPhoneNumberPtr;
37 typedef std::vector<ContactPhoneNumberPtr> ContactPhoneNumberPtrList;
38 typedef DPL::SharedPtr<ContactPhoneNumberPtrList> ContactPhoneNumberPtrListPtr;
40 /* This object represents a phone number data of a contact */
41 class ContactPhoneNumber
47 CONTACT_PHONE_NUMBER_TYPE_WORK,
48 CONTACT_PHONE_NUMBER_TYPE_PREF,
49 CONTACT_PHONE_NUMBER_TYPE_HOME,
50 CONTACT_PHONE_NUMBER_TYPE_VOICE,
51 CONTACT_PHONE_NUMBER_TYPE_FAX,
52 CONTACT_PHONE_NUMBER_TYPE_MSG,
53 CONTACT_PHONE_NUMBER_TYPE_CELL,
54 CONTACT_PHONE_NUMBER_TYPE_PAGER,
55 CONTACT_PHONE_NUMBER_TYPE_BBS,
56 CONTACT_PHONE_NUMBER_TYPE_MODEM,
57 CONTACT_PHONE_NUMBER_TYPE_CAR,
58 CONTACT_PHONE_NUMBER_TYPE_ISDN,
59 CONTACT_PHONE_NUMBER_TYPE_VIDEO,
60 CONTACT_PHONE_NUMBER_TYPE_PCS
61 } ContactPhoneNumberType;
64 ~ContactPhoneNumber();
65 std::string getNumber() const;
66 void setNumber(const std::string &value);
67 std::vector<ContactPhoneNumberType> getTypes() const;
68 void addType(const ContactPhoneNumberType value);
69 void setTypes(const std::vector<ContactPhoneNumberType> value);
70 bool isTypeOf(ContactPhoneNumberType value) const;
71 //methods to use when object is used as filter, not email data container
72 ContactPhoneNumberType getTypeFilter() const;
73 void setTypeFilter(ContactPhoneNumberType value);
74 ContactPhoneNumberPtr clone() const;
78 std::vector<ContactPhoneNumberType> m_types;