Merge "Revert "Fix N_SE-46938 for tz list."" into devel_3.0_main
[platform/framework/native/appfw.git] / src / io / inc / FIo_MmcStorageManagerProxy.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_MmcStorageManagerProxy.h
19  * @brief       This is the header file of the _MmcStorageManagerProxy class.
20  */
21
22 #ifndef _FIO_INTERNAL_MMC_STORAGE_MANAGER_PROXY_H_
23 #define _FIO_INTERNAL_MMC_STORAGE_MANAGER_PROXY_H_
24
25 #include <FBaseObject.h>
26 #include <FBaseString.h>
27
28 #include <FIo_IIpcClientEventListener.h>
29 #include <FIo_IMmcStorageManagerListener.h>
30
31 namespace Tizen { namespace Io
32 {
33
34 class _IpcClient;
35
36 class _MmcStorageManagerProxy
37         : public Tizen::Io::_IIpcClientEventListener
38         , public Tizen::Base::Object
39 {
40 public:
41         _MmcStorageManagerProxy(void);
42
43         virtual ~_MmcStorageManagerProxy(void);
44
45         result Construct(void);
46
47         result Mount(void);
48
49         result Unmount(void);
50
51         result Format(void);
52
53         virtual void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
54
55         void MountResponseReceived(result r);
56
57         void UnmountResponseReceived(result r);
58
59         void FormatResponseReceived(result r);
60
61         void SetMmcStorageManagerListener(_IMmcStorageManagerListener* pListener);
62
63         static _MmcStorageManagerProxy* GetInstance(void);
64
65 private:
66         _MmcStorageManagerProxy(const _MmcStorageManagerProxy& rhs);
67
68         _MmcStorageManagerProxy& operator =(const _MmcStorageManagerProxy& rhs);
69
70         static void InitSingleton(void);
71
72         static void DestroySingleton(void);
73
74 private:
75         static _MmcStorageManagerProxy* __pMmcStorageManagerProxyInstance;
76         _IpcClient* __pIpcClient;
77         _IMmcStorageManagerListener* __pListener;
78
79 }; // _MmcStorageManagerProxy
80
81 }} // Tizen::Io
82
83 #endif // _FIO_INTERNAL_MMC_STORAGE_MANAGER_PROXY_H_