Fix : Remove exception handling codes at the sample code
[platform/framework/native/content.git] / inc / FCntIContentUpdateEventListener.h
1 //
2 // Copyright (c) 2013 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 /**
18  * @file                FCntIContentUpdateEventListener.h
19  * @brief               This is the header file for the %IContentUpdateEventListener interface.
20  *
21  * This header file contains the declarations of the %IContentUpdateEventListener interface.
22  */
23
24 #ifndef _FCNT_ICONTENT_UPDATE_EVENT_LISTENER_H_
25 #define _FCNT_ICONTENT_UPDATE_EVENT_LISTENER_H_
26
27 #include <FBaseRtIEventListener.h>
28
29 namespace Tizen { namespace Content
30 {
31 /**
32  * @interface   IContentUpdateEventListener
33  * @brief               This interface is used for receiving the database change notification.
34  *
35  * @since 2.1
36  *
37  * The %IContentUpdateEventListener interface is used for receiving the database change notification.
38  */
39 class _OSP_EXPORT_ IContentUpdateEventListener
40         : virtual public Tizen::Base::Runtime::IEventListener
41 {
42 public:
43         /**
44          * This polymorphic destructor should be overridden if required. @n
45          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
46          *
47          * @since       2.1
48          */
49         virtual ~IContentUpdateEventListener(void) {}
50
51         /**
52          * Called when the content is created.
53          *
54          * @since                               2.1
55          *
56          * @param[in]                   contentId                       The content ID
57          * @param[in]                   contentType                     The content type
58          * @param[in]                   r                                       An error code @n
59          *                                                                                      The following exceptions are given through this parameter.
60          * @exception                   E_SUCCESS                       The method is successful.
61          * @exception                   E_SYSTEM                        The method cannot proceed due to a severe system error.
62          * @remarks                     This listener method is not called when the scan for a directory is completed.
63          */
64         virtual void OnContentFileCreated(ContentId contentId, ContentType contentType, result r) = 0;
65
66         /**
67          * Called when the content is updated.
68          *
69          * @since                               2.1
70          *
71          * @param[in]                   contentId                       The content ID
72          * @param[in]                   contentType                     The content type
73          * @param[in]                   r                                       An error code @n
74          *                                                                                      The following exceptions are given through this parameter.
75          * @exception                   E_SUCCESS                       The method is successful.
76          * @exception                   E_SYSTEM                        The method cannot proceed due to a severe system error.
77          * @remarks                     This listener method is not called when the scan for a directory is completed.
78          */
79         virtual void OnContentFileUpdated(ContentId contentId, ContentType contentType, result r) = 0;
80
81         /**
82          * Called when the content is deleted.
83          *
84          * @since                               2.1
85          *
86          * @param[in]                   contentId                       The content ID
87          * @param[in]                   contentType                     The content type
88          * @param[in]                   r                                       An error code @n
89          *                                                                                      The following exceptions are given through this parameter.
90          * @exception                   E_SUCCESS                       The method is successful.
91          * @exception                   E_SYSTEM                        The method cannot proceed due to a severe system error.
92          * @remarks                     This listener method is not called when the scan for a directory is completed.
93          */
94         virtual void OnContentFileDeleted(ContentId contentId, ContentType contentType, result r) = 0;
95
96         /**
97          * Called when the scan for a directory is completed.
98          *
99          * @since                               2.1
100          *
101          * @param[in]                   directoryPath           The directory path
102          * @param[in]                   r                                       An error code @n
103          *                                                                                      The following exceptions are given through this parameter.
104          * @exception                   E_SUCCESS                       The method is successful.
105          * @exception                   E_SYSTEM                        The method cannot proceed due to a severe system error.
106          */
107         virtual void OnContentDirectoryScanCompleted(const Tizen::Base::String& directoryPath, result r) = 0;
108
109 protected:
110         //
111         // This method is for internal use only.
112         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
113         //
114         // This method is reserved and may change its name at any time without prior notice.
115         //
116         // @since          2.1
117         //
118         virtual void IContentUpdateEventListener_Reserved1(void) {}
119
120         //
121         // This method is for internal use only.
122         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
123         //
124         // This method is reserved and may change its name at any time without prior notice.
125         //
126         // @since          2.1
127         //
128         virtual void IContentUpdateEventListener_Reserved2(void) {}
129
130         //
131         // This method is for internal use only.
132         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
133         //
134         // This method is reserved and may change its name at any time without prior notice.
135         //
136         // @since          2.1
137         //
138         virtual void IContentUpdateEventListener_Reserved3(void) {}
139
140         //
141         // This method is for internal use only.
142         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
143         //
144         // This method is reserved and may change its name at any time without prior notice.
145         //
146         // @since          2.1
147         //
148         virtual void IContentUpdateEventListener_Reserved4(void) {}
149
150         //
151         // This method is for internal use only.
152         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
153         //
154         // This method is reserved and may change its name at any time without prior notice.
155         //
156         // @since          2.1
157         //
158         virtual void IContentUpdateEventListener_Reserved5(void) {}
159
160 };  // IContentUpdateEventListener
161
162 }} // Tizen::Content
163
164 #endif // _FCNT_ICONTENT_UPDATE_EVENT_LISTENER_H_