2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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 FScl_PhoneNumberImpl.h
18 * @brief This is the header file for the %_PhoneNumberImpl class.
20 * This header file contains the declarations of the %_PhoneNumberImpl class.
22 #ifndef _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_
23 #define _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_
26 #include <FBaseResult.h>
27 #include <FBaseObject.h>
28 #include <FSclTypes.h>
30 namespace Tizen { namespace Base
35 namespace Tizen { namespace Social
40 * @class _PhoneNumberImpl
41 * @brief This class stores the information of a phone number.
45 * The %_PhoneNumberImpl class consists of the phone number and phone number type.
48 class _PhoneNumberImpl
49 : public Tizen::Base::Object
52 _PhoneNumberImpl(void);
54 _PhoneNumberImpl(PhoneNumberType type, const Tizen::Base::String& number);
56 _PhoneNumberImpl(const _PhoneNumberImpl& rhs);
58 virtual ~_PhoneNumberImpl(void);
60 virtual bool Equals(const Tizen::Base::Object& rhs) const;
62 virtual int GetHashCode(void) const;
65 void SetRecordId(int recordId);
67 void SetType(PhoneNumberType type);
69 void SetLabel(const Tizen::Base::String& label);
71 result SetPhoneNumber(const Tizen::Base::String& number);
74 int GetRecordId(void) const;
76 PhoneNumberType GetType(void) const;
78 Tizen::Base::String GetLabel(void) const;
80 Base::String GetPhoneNumber(void) const;
82 bool IsEmpty(void) const;
84 bool IsPhoneNumberTypeChanged(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 bool __isPhoneTypeChanged;
103 }; // _PhoneNumberImpl
107 #endif // _FSCL_INTERNAL_PHONE_NUMBER_IMPL_H_