DCM-1707
[framework/osp/social.git] / src / FScl_PhoneNumberImpl.cpp
index fade7ea..76c2ca0 100644 (file)
@@ -34,6 +34,7 @@ namespace Tizen { namespace Social
 _PhoneNumberImpl::_PhoneNumberImpl(void)
 : __recordId(-1)
 , __type(PHONENUMBER_TYPE_HOME)
+, __isPhoneTypeChanged(false)
 {
 
 }
@@ -42,6 +43,7 @@ _PhoneNumberImpl::_PhoneNumberImpl(PhoneNumberType type, const String& number)
 : __recordId(-1)
 , __type(type)
 , __number(number)
+, __isPhoneTypeChanged(false)
 {
 
 }
@@ -52,11 +54,11 @@ _PhoneNumberImpl::_PhoneNumberImpl(const _PhoneNumberImpl& rhs)
        __type = rhs.__type;
        __label = rhs.__label;
        __number = rhs.__number;
+       __isPhoneTypeChanged = rhs.__isPhoneTypeChanged;
 }      
 
 _PhoneNumberImpl::~_PhoneNumberImpl(void)
 {
-
 }
 
 _PhoneNumberImpl&
@@ -71,6 +73,7 @@ _PhoneNumberImpl::operator =(const _PhoneNumberImpl& rhs)
        __type = rhs.__type;
        __label = rhs.__label;
        __number = rhs.__number;
+       __isPhoneTypeChanged = rhs.__isPhoneTypeChanged;
 
        return *this;
 }
@@ -132,6 +135,7 @@ void
 _PhoneNumberImpl::SetType(PhoneNumberType type)
 {
        __type = type;
+       __isPhoneTypeChanged = true;
 }
 
 result
@@ -174,6 +178,12 @@ _PhoneNumberImpl::IsEmpty(void) const
        return __number.IsEmpty();
 }
 
+bool
+_PhoneNumberImpl::IsPhoneNumberTypeChanged(void) const
+{
+       return __isPhoneTypeChanged;
+}
+
 _PhoneNumberImpl*
 _PhoneNumberImpl::GetInstance(PhoneNumber& phoneNumber)
 {