diff options
Diffstat (limited to 'lib-contact/ct-setting/src/CtSettingData.h')
-rw-r--r-- | lib-contact/ct-setting/src/CtSettingData.h | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/lib-contact/ct-setting/src/CtSettingData.h b/lib-contact/ct-setting/src/CtSettingData.h new file mode 100644 index 0000000..5e1a4a5 --- /dev/null +++ b/lib-contact/ct-setting/src/CtSettingData.h @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved + * + * 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. + * + */ + +#ifndef _CT_SETTING_DATA_H_ +#define _CT_SETTING_DATA_H_ +#include <string> +#include <vector> +#include <list> + +class CtSettingDataListener; + +class CtSettingData +{ +public: + CtSettingData(); + ~CtSettingData(); + void init(); + + void addListener(CtSettingDataListener* listener); + + enum SortMode + { + SORT_MODE_FIRST_NAME, + SORT_MODE_LAST_NAME, + }; + + enum NameOrder + { + NAME_ORDER_FIRST_NAME_FIRST, + NAME_ORDER_LAST_NAME_FIRST, + }; + + enum ShowMode + { + SHOW_MODE_CONTACTS_WITH_PHONES, + SHOW_MODE_ALL_CONTACTS, + }; + + enum SendMode + { + SEND_MODE_TOGETHER, + SEND_MODE_INDIVIDUALLY, + }; + + struct AbInfo + { + AbInfo(); + int abId; + int accountId; + bool display; + int mode; + std::string abName; + std::string name; + std::string user; + }; + + struct SdnInfo + { + SdnInfo(); + int simNum; + std::string name; + std::string number; + }; + + SortMode getSortMode() const; + void setSortMode(SortMode sortMode); + + NameOrder getNameOrder() const; + void setNameOrder(NameOrder order); + + ShowMode getShowMode() const; + void setShowMode(ShowMode mode); + + SendMode getSendMode() const; + void setSendMode(SendMode mode); + + const std::list<AbInfo>& getAbInfo() const; + void setAbInfo(const std::list<AbInfo>& abInfo); + + int getAbCount() const; + + bool isDisplayAll() const; + + const std::list<SdnInfo>& getSdnInfoList(); + +private: + void __initAddressbookInfo(); + void __notify(); + +private: + SortMode __sortMode; + NameOrder __nameOrder; + ShowMode __showMode; + SendMode __sendMode; + std::list<AbInfo> __abInfo; + std::list<SdnInfo> __sdnInfo; + std::list<CtSettingDataListener*> __listeners; + bool __displayAll; +}; + +#endif //_CT_SETTING_DATA_H_ |