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 FSclIAddressbookEventListener.h
18 * @brief This is the header file for the %IAddressbookEventListener interface.
20 * This header file contains the declarations of the %IAddressbookEventListener interface.
22 #ifndef _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
23 #define _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
25 #include <FBaseRtIEventListener.h>
27 namespace Tizen { namespace Base { namespace Collection {
31 namespace Tizen { namespace Social
35 * @interface IAddressbookEventListener
36 * @brief <i> [Deprecated] </i> This interface provides a listener that receives the events associated with contact and category changes.
38 * @deprecated This interface is deprecated. Instead of using this listener, use IAddressbookChangeEventListener.
41 * The %IAddressbookEventListener interface provides a listener that receives the events associated with contact and category changes.
44 class _OSP_EXPORT_ IAddressbookEventListener
45 : virtual public Tizen::Base::Runtime::IEventListener
50 * This polymorphic destructor should be overridden if required. @n
51 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
53 * @brief <i> [Deprecated] </i>
54 * @deprecated This method is deprecated because the %IAddressbookEventListener interface is deprecated.
58 virtual ~IAddressbookEventListener(void) {}
61 * Called to notify when contacts are changed. @n
62 * A list of ContactChangeInfo instances is passed.
64 * @brief <i> [Deprecated] </i>
65 * @deprecated This method is deprecated because the %IAddressbookEventListener interface is deprecated.
69 * @param[in] contactChangeInfoList The list of contact change information (@ref ContactChangeInfo list)
70 * @remarks This listener method is called when the following changes have occurred:
71 * - Contacts are added, updated, or removed
72 * - Contacts are added/removed to/from categories
74 * The following example demonstrates how to use the %OnContactsChanged() method.
77 * MyApplication::OnContactsChangedN(const IList& contactChangeInfoList)
79 * IEnumerator* pEnum = contactChangeInfoList.GetEnumeratorN();
80 * while (pEnum->MoveNext() == E_SUCCESS)
82 * ContactChangeInfo* pInfo = (ContactChangeInfo*) pEnum->GetCurrent();
84 * AppLog("Contact changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetContctId(), pInfo->GetVersion());
91 virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList) = 0;
94 * Called to notify when categories are changed. @n
95 * A list of CategoryChangeInfo instances is passed.
97 * @brief <i> [Deprecated] </i>
98 * @deprecated This method is deprecated because the %IAddressbookEventListener interface is deprecated.
102 * @param[in] categoryChangeInfoList The list of category change information (@ref CategoryChangeInfo list)
103 * @remarks This listener method is called when the following changes have occurred:
104 * - Categories are added, updated, or removed
105 * - Contacts are added/removed to/from categories
107 * The following example demonstrates how to use the %OnCategoriesChanged() method.
110 * MyApplication::OnCategoriesChangedN(const IList& categoryChangeInfoList)
112 * IEnumerator* pEnum = categoryChangeInfoList.GetEnumeratorN();
113 * while (pEnum->MoveNext() == E_SUCCESS)
115 * CategoryChangeInfo* pInfo = (CategoryChangeInfo*) pEnum->GetCurrent();
117 * AppLog("Category changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetCategoryId(), pInfo->GetVersion());
124 virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) = 0;
128 // This method is for internal use only. Using this method can cause behavioral, security-related,
129 // and consistency-related issues in the application.
130 // This method is reserved and may change its name at any time without prior notice.
134 virtual void IAddressbookEventListener_Reserved1(void){ }
137 // This method is for internal use only. Using this method can cause behavioral, security-related,
138 // and consistency-related issues in the application.
139 // This method is reserved and may change its name at any time without prior notice.
143 virtual void IAddressbookEventListener_Reserved2(void){ }
146 // This method is for internal use only. Using this method can cause behavioral, security-related,
147 // and consistency-related issues in the application.
148 // This method is reserved and may change its name at any time without prior notice.
152 virtual void IAddressbookEventListener_Reserved3(void){ }
154 }; // IAddressbookEventListener
158 #endif // _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_