sync with tizen_2.0
[platform/framework/native/appfw.git] / inc / FIoIMmcStorageMountListener.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 /**
19 * @file         FIoIMmcStorageMountListener.h
20 * @brief        This is the header file for the %IMmcStorageMountListener interface.
21 *
22 * This header file contains the declarations of the %IMmcStorageMountListener interface.
23 */
24
25 #ifndef _FIO_IMMC_STORAGE_MOUNT_LISTENER_H_
26 #define _FIO_IMMC_STORAGE_MOUNT_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29
30 namespace Tizen { namespace Io
31 {
32
33 /**
34 * @interface    IMmcStorageMountListener
35 * @brief                This interface is the listener to receive the result of external MMC mount or unmount operations.
36 * @since                2.0
37 *
38 * The %IMmcStorageMountListener interface must be registered and implemented by an application to receive the result of
39 * external MMC mount or unmount operations.
40 *
41 * @see MmcStorageManager
42 */
43 class _OSP_EXPORT_ IMmcStorageMountListener
44            : public virtual Tizen::Base::Runtime::IEventListener
45 {
46 public:
47         /**
48         * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface called.
49         *
50         * @since        2.0
51         */
52         virtual ~IMmcStorageMountListener(void) {}
53
54         /**
55         * Called when external MMC mount operation is done.
56         *
57         * @since                2.0
58         *
59         * @param[in]    r                               The result of external MMC mount operation
60         * @exception    E_SUCCESS               The mount operation is successful.
61         * @exception    E_IO                    Either of the following conditions has occurred: @n
62         *                                                                       - The file system to be mounted has an invalid superblock.
63         *                                                                       - An unexpected device failure has occurred as the media ejected suddenly.
64         * @exception     E_SYSTEM               The method cannot proceed due to a severe system error.
65         */
66         virtual void OnMmcStorageMounted(result r) = 0;
67
68         /**
69         * Called when external MMC unmount operation is done.
70         *
71         * @since                2.0
72         *
73         * @param[in]    r                               The result of external MMC unmount operation
74         * @exception    E_SUCCESS               The unmount operation is successful.
75         * @exception    E_IO                    An unexpected device failure has occurred as the media ejected suddenly.
76         * @exception    E_SYSTEM                The method cannot proceed due to a severe system error.
77         */
78         virtual void OnMmcStorageUnmounted(result r) = 0;
79
80 protected:
81         //
82         // This method is for internal use only.
83         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
84         //
85         // @since 2.0
86         virtual void IMmcStorageMountListener_Reserved1(void) {}
87
88         //
89         // This method is for internal use only.
90         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
91         //
92         // @since 2.0
93         virtual void IMmcStorageMountListener_Reserved2(void) {}
94
95         //
96         // This method is for internal use only.
97         // Using this method can cause behavioral, security-related, and consistency-related issues in the application.
98         //
99         // @since 2.0
100         virtual void IMmcStorageMountListener_Reserved3(void) {}
101
102 }; // IMmcStorageMountListener
103
104 } } // Tizen::Io
105
106 #endif // _FIO_IMMC_STORAGE_MOUNT_LISTENER_H