Update the doxygen about removing and updating an account
[platform/framework/native/social.git] / inc / FSclIAddressbookEventListener.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
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.
15 //
16 /**
17  * @file                FSclIAddressbookEventListener.h
18  * @brief               This is the header file for the %IAddressbookEventListener interface.
19  *
20  * This header file contains the declarations of the %IAddressbookEventListener interface.
21  */
22 #ifndef _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
23 #define _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_
24
25 #include <FBaseRtIEventListener.h>
26
27 namespace Tizen { namespace Base { namespace Collection {
28 class IList;
29 } } }
30
31 namespace Tizen { namespace Social
32 {
33
34 /**
35  * @interface   IAddressbookEventListener
36  * @brief       <i> [Deprecated] </i> This interface provides a listener that receives the events associated with contact and category changes.
37  *
38  * @deprecated This interface is deprecated. Instead of using this listener, use IAddressbookChangeEventListener.
39  * @since       2.0
40  *
41  * The %IAddressbookEventListener interface provides a listener that receives the events associated with contact and category changes.
42  *
43  */
44 class _OSP_EXPORT_ IAddressbookEventListener
45         : virtual public Tizen::Base::Runtime::IEventListener
46 {
47 public:
48
49         /**
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.
52          *
53          * @brief               <i> [Deprecated] </i>
54          * @deprecated          This method is deprecated because the %IAddressbookEventListener interface is deprecated.
55          *
56          * @since       2.0
57          */
58         virtual ~IAddressbookEventListener(void) {}
59
60         /**
61          * Called to notify when contacts are changed. @n
62          * A list of ContactChangeInfo instances is passed.
63      *
64          * @brief               <i> [Deprecated] </i>
65          * @deprecated          This method is deprecated because the %IAddressbookEventListener interface is deprecated.
66          *
67          * @since       2.0
68          *
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
73          *
74          * The following example demonstrates how to use the %OnContactsChanged() method.
75          * @code
76          * void
77          * MyApplication::OnContactsChangedN(const IList& contactChangeInfoList)
78          * {
79          *    IEnumerator* pEnum = contactChangeInfoList.GetEnumeratorN();
80          *    while (pEnum->MoveNext() == E_SUCCESS)
81          *    {
82          *      ContactChangeInfo* pInfo = (ContactChangeInfo*) pEnum->GetCurrent();
83          *
84          *      AppLog("Contact changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetContctId(), pInfo->GetVersion());
85          *    }
86          *    delete pEnum;
87          * }
88          * @endcode
89          *
90          */
91         virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList) = 0;
92
93         /**
94          * Called to notify when categories are changed. @n
95          * A list of CategoryChangeInfo instances is passed.
96      *
97          * @brief               <i> [Deprecated] </i>
98          * @deprecated          This method is deprecated because the %IAddressbookEventListener interface is deprecated.
99          *
100          * @since       2.0
101          *
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
106          *
107          * The following example demonstrates how to use the %OnCategoriesChanged() method.
108          * @code
109          * void
110          * MyApplication::OnCategoriesChangedN(const IList& categoryChangeInfoList)
111          * {
112          *    IEnumerator* pEnum = categoryChangeInfoList.GetEnumeratorN();
113          *    while (pEnum->MoveNext() == E_SUCCESS)
114          *    {
115          *      CategoryChangeInfo* pInfo = (CategoryChangeInfo*) pEnum->GetCurrent();
116          *
117          *      AppLog("Category changed: type(%d), id(%d), version(%d)", pInfo->GetChangeType(), pInfo->GetCategoryId(), pInfo->GetVersion());
118          *    }
119          *    delete pEnum;
120          * }
121          * @endcode
122          *
123          */
124         virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList) = 0;
125
126 protected:
127         //
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.
131         //
132         // @since       2.0
133         //
134         virtual void IAddressbookEventListener_Reserved1(void){ }
135
136         //
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.
140         //
141         // @since       2.0
142         //
143         virtual void IAddressbookEventListener_Reserved2(void){ }
144
145         //
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.
149         //
150         // @since       2.0
151         //
152         virtual void IAddressbookEventListener_Reserved3(void){ }
153
154 };      // IAddressbookEventListener
155
156 }}      // Tizen::Social
157
158 #endif // _FSCL_IADDRESSBOOK_EVENT_LISTENER_H_