2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FScl_PhoneNumberImpl.h
19 * @brief This is the header file for the %_PhoneNumberImpl class.
21 * This header file contains the declarations of the %_PhoneNumberImpl class.
23 #ifndef _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_
24 #define _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_
27 #include <FBaseResult.h>
28 #include <FBaseObject.h>
29 #include <FSclTypes.h>
31 namespace Tizen { namespace Base
36 namespace Tizen { namespace Social
41 * @class _PhoneNumberImpl
42 * @brief This class stores the information of a phone number.
46 * The %_PhoneNumberImpl class consists of the phone number and phone number type.
49 class _PhoneNumberImpl
50 : public Tizen::Base::Object
53 _PhoneNumberImpl(void);
55 _PhoneNumberImpl(PhoneNumberType type, const Tizen::Base::String& number);
57 _PhoneNumberImpl(const _PhoneNumberImpl& rhs);
59 virtual ~_PhoneNumberImpl(void);
61 virtual bool Equals(const Tizen::Base::Object& rhs) const;
63 virtual int GetHashCode(void) const;
66 void SetRecordId(int recordId);
68 void SetType(PhoneNumberType type);
70 void SetLabel(const Tizen::Base::String& label);
72 result SetPhoneNumber(const Tizen::Base::String& number);
76 int GetRecordId(void) const;
78 PhoneNumberType GetType(void) const;
80 Tizen::Base::String GetLabel(void) const;
82 Base::String GetPhoneNumber(void) const;
84 bool IsEmpty(void) const;
86 static _PhoneNumberImpl* GetInstance(PhoneNumber& phoneNUmber);
88 static const _PhoneNumberImpl* GetInstance(const PhoneNumber& phoneNUmber);
90 _PhoneNumberImpl& operator =(const _PhoneNumberImpl& rhs);
92 bool operator ==(const _PhoneNumberImpl& rhs) const;
94 bool operator !=(const _PhoneNumberImpl& rhs) const;
97 contacts_record_h __recordHandle;
99 PhoneNumberType __type;
100 Tizen::Base::String __label;
101 Tizen::Base::String __number;
102 }; // _PhoneNumberImpl
106 #endif // _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_