Change event sync to async
[platform/framework/native/appfw.git] / src / io / inc / FIo_MmcStorageManagerImpl.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 /**
18  * @file        FIo_MmcStorageManagerImpl.h
19  * @brief       This is the header file for the %_MmcStorageManagerImpl class.
20  *
21  * This header file contains the declarations of the %_MmcStorageManagerImpl class.
22  */
23
24 #ifndef _FIO_MMC_STORAGE_MANAGER_IMPL_H_
25 #define _FIO_MMC_STORAGE_MANAGER_IMPL_H_
26
27 #include <FBaseObject.h>
28 #include <FBaseInternalTypes.h>
29 #include <FBaseColLinkedListT.h>
30 #include <FBaseRtEvent.h>
31
32 #include <FIoMmcStorageManager.h>
33
34 #include "FIo_IMmcStorageServiceEventListener.h"
35
36 namespace Tizen { namespace Io
37 {
38
39 class MmcStorageManager;
40 class _MmcStorageManagerProxy;
41 class IMmcStorageMountListener;
42 class IMmcStorageFormatListener;
43
44 class _OSP_EXPORT_ _MmcStorageManagerImpl
45         : public _IMmcStorageServiceEventListener
46 {
47
48 public:
49         ~_MmcStorageManagerImpl(void);
50
51         static _MmcStorageManagerImpl* GetInstance(void);
52
53         result Mount(void);
54
55         result Unmount(void);
56
57         result Format(void);
58
59         result AddMmcStorageMountListener(IMmcStorageMountListener& listener);
60
61         result RemoveMmcStorageMountListener(IMmcStorageMountListener& listener);
62
63         result AddMmcStorageFormatListener(IMmcStorageFormatListener& listener);
64
65         result RemoveMmcStorageFormatListener(IMmcStorageFormatListener& listener);
66
67         virtual void OnMmcMountResponseReceived(result r);
68
69         virtual void OnMmcUnmountResponseReceived(result r);
70
71         virtual void OnMmcFormatResponseReceived(result r);
72
73 private:
74         _MmcStorageManagerImpl(void);
75         result Construct(void);
76
77         _MmcStorageManagerImpl(const _MmcStorageManagerImpl& source);
78         _MmcStorageManagerImpl& operator =(const _MmcStorageManagerImpl& source);
79
80 private:
81         _MmcStorageManagerProxy* __pMmcStorageManagerProxy;
82         Tizen::Base::Runtime::Event* __pMountEvent;
83         Tizen::Base::Runtime::Event* __pFormatEvent;
84
85 }; // _MmcStorageManagerImpl
86
87 }} // Tizen::Io
88
89 #endif // _FIO_MMC_STORAGE_MANAGER_IMPL_H_
90