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. This way, the destructors of the derived classes @n
51 * are called when the destructor of this interface is called.
55 virtual ~IAddressbookEventListener(void) {}
58 * Called to notify when contacts are changed. @n
59 * A list of ContactChangeInfo instances is passed.
61 * @brief <i> [Deprecated] </i>
62 * @deprecated This method is deprecated because the %IAddressbookEventListener interface is deprecated.
66 * @param[in] contactChangeInfoList The list of contact change information (@ref ContactChangeInfo list)
67 * @remarks This listener method is called when the following changes have occurred: @n
68 * - Contacts are added, updated, or removed
69 * - Contacts are added/removed to/from categories
71 * The following example demonstrates how to use the %OnContactsChanged() method.
74 * MyApplication::OnContactsChangedN(const IList& contactChangeInfoList)
76 * IEnumerator* pEnum = contactChangeInfoList.GetEnumeratorN();
77 * while (pEnum->MoveNext() == E_SUCCESS)
79 * ContactChangeInfo* pInfo = (ContactChangeInfo*) pEnum->GetCurrent();
81 * AppLog("Contact changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetContctId(), pInfo->GetVersion());
88 virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList) = 0;
91 * Called to notify when categories are changed. @n
92 * A list of CategoryChangeInfo instances is passed.
94 * @brief <i> [Deprecated] </i>
95 * @deprecated This method is deprecated because the %IAddressbookEventListener interface is deprecated.
99 * @param[in] categoryChangeInfoList The list of category change information (@ref CategoryChangeInfo list)
100 * @remarks This listener method is called when the following changes have occurred: @n
101 * - Categories are added, updated, or removed
102 * - Contacts are added/removed to/from categories
104 * The following example demonstrates how to use the %OnCategoriesChanged() method.
107 * MyApplication::OnCategoriesChangedN(const IList& categoryChangeInfoList)
109 * IEnumerator* pEnum = categoryChangeInfoList.GetEnumeratorN();
110 * while (pEnum->MoveNext() == E_SUCCESS)
112 * CategoryChangeInfo* pInfo = (CategoryChangeInfo*) pEnum->GetCurrent();
114 * AppLog("Category changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetCategoryId(), pInfo->GetVersion());
121 virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) = 0;
125 // This method is for internal use only. Using this method can cause behavioral, security-related,
126 // and consistency-related issues in the application.
127 // This method is reserved and may change its name at any time without prior notice.
131 virtual void IAddressbookEventListener_Reserved1(void){ }
134 // This method is for internal use only. Using this method can cause behavioral, security-related,
135 // and consistency-related issues in the application.
136 // This method is reserved and may change its name at any time without prior notice.
140 virtual void IAddressbookEventListener_Reserved2(void){ }
143 // This method is for internal use only. Using this method can cause behavioral, security-related,
144 // and consistency-related issues in the application.
145 // This method is reserved and may change its name at any time without prior notice.
149 virtual void IAddressbookEventListener_Reserved3(void){ }
151 }; // IAddressbookEventListener
155 #endif // _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_