diff options
Diffstat (limited to 'mobile_src/Contact/ContactGroup.cpp')
-rw-r--r-- | mobile_src/Contact/ContactGroup.cpp | 244 |
1 files changed, 244 insertions, 0 deletions
diff --git a/mobile_src/Contact/ContactGroup.cpp b/mobile_src/Contact/ContactGroup.cpp new file mode 100644 index 0000000..f97034e --- /dev/null +++ b/mobile_src/Contact/ContactGroup.cpp @@ -0,0 +1,244 @@ +// +// Tizen Web Device API +// Copyright (c) 2012 Samsung Electronics Co., Ltd. +// +// Licensed under the Apache License, Version 2.0 (the License); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +/** + * @file ContactGroup.cpp + * @version 0.1 + * @brief + */ + +#include "ContactGroup.h" + +namespace DeviceAPI { +namespace Contact { + +ContactGroup::ContactGroup() : + m_idIsSet(false), + m_addressBookIdIsSet(false), + m_nameIsSet(false), + m_ringtoneURIIsSet(false), + m_photoURIIsSet(false), + m_readOnly(false) +{ +} + +ContactGroup::~ContactGroup() +{ +} + +std::string ContactGroup::getId() const +{ + return m_id; +} + +void ContactGroup::setId(const std::string &value) +{ + m_id = value; + m_idIsSet = true; +} + +void ContactGroup::setId(const int value) +{ + std::stringstream oss; + oss << value; + m_id = oss.str(); + m_idIsSet = true; +} + +void ContactGroup::unsetId() +{ + m_id = ""; + m_idIsSet = false; +} + +bool ContactGroup::getIdIsSet() const +{ + return m_idIsSet; +} + +std::string ContactGroup::getAddressBookId() const +{ + return m_addressBookId; +} + +void ContactGroup::setAddressBookId(const std::string &value) +{ + m_addressBookId = value; + m_addressBookIdIsSet = true; +} + +void ContactGroup::setAddressBookId(const int value) +{ + std::stringstream oss; + oss << value; + m_addressBookId = oss.str(); + m_addressBookIdIsSet = true; +} + +void ContactGroup::unsetAddressBookId() +{ + m_addressBookId = ""; + m_addressBookIdIsSet = false; +} + +bool ContactGroup::getAddressBookIdIsSet() const +{ + return m_addressBookIdIsSet; +} + +std::string ContactGroup::getName() const +{ + return m_name; +} + +void ContactGroup::setName(const std::string &value) +{ + m_name = value; + m_nameIsSet = true; +} + +void ContactGroup::unsetName() +{ + m_name = ""; + m_nameIsSet = false; +} + +bool ContactGroup::getNameIsSet() const +{ + return m_nameIsSet; +} + +std::string ContactGroup::getRingtoneURI() const +{ + return m_ringtoneURI; +} + +void ContactGroup::setRingtoneURI(const std::string &value) +{ + m_ringtoneURI = value; + m_ringtoneURIIsSet = true; +} + +void ContactGroup::unsetRingtoneURI() +{ + m_ringtoneURI = ""; + m_ringtoneURIIsSet = false; +} + +bool ContactGroup::getRingtoneURIIsSet() const +{ + return m_ringtoneURIIsSet; +} + +std::string ContactGroup::getRingtoneURIRealPath() const +{ + return m_ringtoneURIRealPath; +} + +void ContactGroup::setRingtoneURIRealPath(const std::string &value) +{ + m_ringtoneURIRealPath = value; +} + +std::string ContactGroup::getPhotoURI() const +{ + return m_photoURI; +} + +void ContactGroup::setPhotoURI(const std::string &value) +{ + m_photoURI = value; + m_photoURIIsSet = true; +} + +void ContactGroup::unsetPhotoURI() +{ + m_photoURI = ""; + m_photoURIIsSet = false; +} + +bool ContactGroup::getPhotoURIIsSet() const +{ + return m_photoURIIsSet; +} + +std::string ContactGroup::getPhotoURIRealPath() const +{ + return m_photoURIRealPath; +} + +void ContactGroup::setPhotoURIRealPath(const std::string &value) +{ + m_photoURIRealPath = value; +} + +bool ContactGroup::getReadOnly() const +{ + return m_readOnly; +} + +void ContactGroup::setReadOnly(const bool &value) +{ + m_readOnly = value; +} + +void ContactGroup::clear() +{ + m_id = ""; + m_idIsSet = false; + + m_addressBookId = ""; + m_addressBookIdIsSet = false; + + m_name = ""; + m_nameIsSet = false; + + m_ringtoneURI = ""; + m_ringtoneURIIsSet = false; + + m_photoURI = ""; + m_photoURIIsSet = false; + + m_readOnly = false; +} + +ContactGroupPtr ContactGroup::clone() const +{ + ContactGroupPtr result(new ContactGroup()); + + result->m_id = m_id; + result->m_idIsSet = m_idIsSet; + + result->m_addressBookId = m_addressBookId; + result->m_addressBookIdIsSet = m_addressBookIdIsSet; + + result->m_name = m_name; + result->m_nameIsSet = m_nameIsSet; + + result->m_ringtoneURI = m_ringtoneURI; + result->m_ringtoneURIIsSet = m_ringtoneURIIsSet; + + result->m_photoURI = m_photoURI; + result->m_photoURIIsSet = m_photoURIIsSet; + + result->m_readOnly = m_readOnly; + + return result; +} + +} // Contact +} // DeviceAPI |