diff options
Diffstat (limited to 'mobile_src/Contact/IAddressBook.h')
-rw-r--r-- | mobile_src/Contact/IAddressBook.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/mobile_src/Contact/IAddressBook.h b/mobile_src/Contact/IAddressBook.h new file mode 100644 index 0000000..120c81a --- /dev/null +++ b/mobile_src/Contact/IAddressBook.h @@ -0,0 +1,125 @@ +// +// 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 IAddressBook.h + * @version 0.1 + * @brief + */ + +#ifndef _API_CONTACT_IADDRESS_BOOK_H_ +#define _API_CONTACT_IADDRESS_BOOK_H_ + +#include <vector> +#include <string> +#include <dpl/shared_ptr.h> +#include <Commons/EventReceiver.h> +#include "EventAddressBookGet.h" +#include "EventAddressBookAdd.h" +#include "EventAddressBookAddBatch.h" +#include "EventAddressBookUpdate.h" +#include "EventAddressBookUpdateBatch.h" +#include "EventAddressBookRemove.h" +#include "EventAddressBookRemoveBatch.h" +#include "EventAddressBookFind.h" +#include "EventAddressBookAddChangeListener.h" +#include "EventAddressBookRemoveChangeListener.h" +#include "EventAddressBookGetGroup.h" +#include "EventAddressBookAddGroup.h" +#include "EventAddressBookUpdateGroup.h" +#include "EventAddressBookRemoveGroup.h" +#include "EventAddressBookGetGroups.h" +#include "IContactEventPrivateData.h" + +namespace DeviceAPI { +namespace Contact { + +class IAddressBook; +typedef DPL::SharedPtr<IAddressBook> AddressBookPtr; + +typedef std::vector<AddressBookPtr> AddressBookArray; +typedef DPL::SharedPtr<AddressBookArray> AddressBookArrayPtr; + +class IAddressBook : + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookGet >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookAdd >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookAddBatch >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookUpdate >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookUpdateBatch >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookRemove >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookRemoveBatch >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookFind >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookAddChangeListener >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookRemoveChangeListener >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookGetGroup >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookAddGroup >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookUpdateGroup >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookRemoveGroup >, + public WrtDeviceApis::Commons::EventRequestReceiver< EventAddressBookGetGroups >, + public IContactEventPrivateData +{ +public: + explicit IAddressBook(); + virtual ~IAddressBook(); + + virtual void get(const EventAddressBookGetPtr &event); + virtual void add(const EventAddressBookAddPtr &event); + virtual void addBatch(const EventAddressBookAddBatchPtr &event); + virtual void update(const EventAddressBookUpdatePtr &event); + virtual void updateBatch(const EventAddressBookUpdateBatchPtr &event); + virtual void remove(const EventAddressBookRemovePtr &event); + virtual void removeBatch(const EventAddressBookRemoveBatchPtr &event); + virtual void find(const EventAddressBookFindPtr &event); + virtual void addChangeListener(const EventAddressBookAddChangeListenerPtr &event); + virtual void removeChangeListener(const EventAddressBookRemoveChangeListenerPtr &event); + virtual void getGroup(const EventAddressBookGetGroupPtr &event); + virtual void addGroup(const EventAddressBookAddGroupPtr &event); + virtual void updateGroup(const EventAddressBookUpdateGroupPtr &event); + virtual void removeGroup(const EventAddressBookRemoveGroupPtr &event); + virtual void getGroups(const EventAddressBookGetGroupsPtr &event); + + virtual std::string getId() const = 0; + virtual void setId(const std::string &value) = 0; + virtual std::string getName() const = 0; + virtual void setName(const std::string &value) = 0; + virtual std::string getAccountId() const = 0; + virtual void setAccountId(const std::string &value) = 0; + virtual bool getReadOnly() const = 0; + virtual void setReadOnly(const bool &value) = 0; + +protected: + virtual void OnRequestReceived(const EventAddressBookGetPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookAddPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookAddBatchPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookUpdatePtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookUpdateBatchPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookRemovePtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookRemoveBatchPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookFindPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookAddChangeListenerPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookRemoveChangeListenerPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookGetGroupPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookAddGroupPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookUpdateGroupPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookRemoveGroupPtr &event) = 0; + virtual void OnRequestReceived(const EventAddressBookGetGroupsPtr &event) = 0; +}; + +} // Contact +} // DeviceAPI + +#endif // _API_CONTACT_IADDRESS_BOOK_H_ |