Apply addressbook API doxygen review
[platform/framework/native/social.git] / inc / FSclIAddressbookEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file                FSclIAddressbookEventListener.h
19  * @brief               This is the header file for the %IAddressbookEventListener interface.
20  *
21  * This header file contains the declarations of the %IAddressbookEventListener interface.
22  */
23 #ifndef _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
24 #define _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
25
26 #include <FBaseRtIEventListener.h>
27
28 namespace Tizen { namespace Base { namespace Collection {
29 class IList;
30 } } }
31
32 namespace Tizen { namespace Social
33 {
34
35 /**
36  * @interface   IAddressbookEventListener
37  * @brief       This interface provides a listener that receives the events associated with contact and category changes.
38  *
39  * @brief <i> [Deprecated] </i>
40  * @deprecated This interface is deprecated. Instead of using this listener, use IAddressbookChangeEventListener.
41  * @since       2.0
42  *
43  * The %IAddressbookEventListener interface provides a listener that receives the events associated with contact and category changes.
44  *
45  */
46 class _OSP_EXPORT_ IAddressbookEventListener
47         : virtual public Tizen::Base::Runtime::IEventListener
48 {
49 public:
50
51         /**
52          * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes @n
53          * are called when the destructor of this interface is called.
54          *
55          * @since       2.0
56          */
57         virtual ~IAddressbookEventListener(void) {}
58
59         /**
60          * Called to notify when contacts are changed. @n
61          * A list of ContactChangeInfo instances is passed.
62          *
63          * @since       2.0
64          *
65          * @param[in]   contactChangeInfoList   The list of contact change information (@ref ContactChangeInfo list)
66          * @remarks This listener method is called when the following changes have occurred: @n
67          *      - Contacts are added, updated, or removed
68          *      - Contacts are added/removed to/from categories
69          *
70          * The following example demonstrates how to use the %OnContactsChanged() method.
71          * @code
72          * void
73          * MyApplication::OnContactsChangedN(const IList& contactChangeInfoList)
74          * {
75          *    IEnumerator* pEnum = contactChangeInfoList.GetEnumeratorN();
76          *    while (pEnum->MoveNext() == E_SUCCESS)
77          *    {
78          *      ContactChangeInfo* pInfo = (ContactChangeInfo*) pEnum->GetCurrent();
79          *
80          *      AppLog("Contact changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetContctId(), pInfo->GetVersion());
81          *    }
82          *    delete pEnum;
83          * }
84          * @endcode
85          *
86          */
87         virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList) = 0;
88
89         /**
90          * Called to notify when categories are changed. @n
91      * A list of CategoryChangeInfo instances is passed.
92          *
93          * @since       2.0
94          *
95          * @param[in]   categoryChangeInfoList  The list of category change information (@ref CategoryChangeInfo list)
96          * @remarks This listener method is called when the following changes have occurred: @n
97          *      - Categories are added, updated, or removed
98          *      - Contacts are added/removed to/from categories
99          *
100          * The following example demonstrates how to use the %OnCategoriesChanged() method.
101          * @code
102          * void
103          * MyApplication::OnCategoriesChangedN(const IList& categoryChangeInfoList)
104          * {
105          *    IEnumerator* pEnum = categoryChangeInfoList.GetEnumeratorN();
106          *    while (pEnum->MoveNext() == E_SUCCESS)
107          *    {
108          *      CategoryChangeInfo* pInfo = (CategoryChangeInfo*) pEnum->GetCurrent();
109          *
110          *      AppLog("Category changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetCategoryId(), pInfo->GetVersion());
111          *    }
112          *    delete pEnum;
113          * }
114          * @endcode
115          *
116          */
117         virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) = 0;
118
119 protected:
120         //
121         // This method is for internal use only. Using this method can cause behavioral, security-related,
122         // and consistency-related issues in the application.
123         // This method is reserved and may change its name at any time without prior notice.
124         //
125         // @since       2.0
126         //
127         virtual void IAddressbookEventListener_Reserved1(void){ }
128
129         //
130         // This method is for internal use only. Using this method can cause behavioral, security-related,
131         // and consistency-related issues in the application.
132         // This method is reserved and may change its name at any time without prior notice.
133         //
134         // @since       2.0
135         //
136         virtual void IAddressbookEventListener_Reserved2(void){ }
137
138         //
139         // This method is for internal use only. Using this method can cause behavioral, security-related,
140         // and consistency-related issues in the application.
141         // This method is reserved and may change its name at any time without prior notice.
142         //
143         // @since       2.0
144         //
145         virtual void IAddressbookEventListener_Reserved3(void){ }
146
147 };      // IAddressbookEventListener
148
149 }}      // Tizen::Social
150
151 #endif // _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_