|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 #ifndef RMTPFRAMEWORK_H |
|
21 #define RMTPFRAMEWORK_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <f32file.h> |
|
25 |
|
26 #include "mtpdebug.h" |
|
27 |
|
28 class CMTPConnectionMgr; |
|
29 class CMTPDataProviderController; |
|
30 class CMTPFrameworkConfig; |
|
31 class CMTPObjectMgr; |
|
32 class CMTPParserRouter; |
|
33 class CMTPReferenceMgr; |
|
34 class CMTPStorageMgr; |
|
35 class RFs; |
|
36 class CMTPDataCodeGenerator; |
|
37 class CMTPServiceMgr; |
|
38 |
|
39 /** |
|
40 Implements the MTP framework singletons manager. |
|
41 @internalComponent |
|
42 */ |
|
43 class RMTPFramework |
|
44 { |
|
45 public: |
|
46 |
|
47 IMPORT_C RMTPFramework(); |
|
48 |
|
49 IMPORT_C void OpenL(); |
|
50 IMPORT_C void OpenLC(); |
|
51 IMPORT_C void Close(); |
|
52 |
|
53 IMPORT_C CMTPConnectionMgr& ConnectionMgr() const; |
|
54 IMPORT_C CMTPDataProviderController& DpController() const; |
|
55 IMPORT_C CMTPFrameworkConfig& FrameworkConfig() const; |
|
56 IMPORT_C RFs& Fs() const; |
|
57 IMPORT_C CMTPObjectMgr& ObjectMgr() const; |
|
58 IMPORT_C CMTPReferenceMgr& ReferenceMgr() const; |
|
59 IMPORT_C CMTPParserRouter& Router() const; |
|
60 IMPORT_C CMTPStorageMgr& StorageMgr() const; |
|
61 IMPORT_C CMTPDataCodeGenerator& DataCodeGenerator() const; |
|
62 IMPORT_C CMTPServiceMgr& ServiceMgr() const; |
|
63 |
|
64 private: // Owned |
|
65 |
|
66 class CSingletons : public CObject |
|
67 { |
|
68 public: |
|
69 |
|
70 static CSingletons& OpenL(); |
|
71 |
|
72 public: // From CObject |
|
73 |
|
74 void Close(); |
|
75 |
|
76 private: |
|
77 |
|
78 virtual ~CSingletons(); |
|
79 void ConstructL(); |
|
80 |
|
81 public: // Owned |
|
82 |
|
83 /** |
|
84 FLOGGER debug trace member variable. |
|
85 */ |
|
86 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
87 |
|
88 /** |
|
89 The construction in-progress flag, which is used to manage nested |
|
90 (recursive) opens. |
|
91 */ |
|
92 TBool iConstructing; |
|
93 |
|
94 /** |
|
95 The connection manager singleton. |
|
96 */ |
|
97 CMTPConnectionMgr* iSingletonConnectionMgr; |
|
98 |
|
99 /** |
|
100 The data provider controller singleton. |
|
101 */ |
|
102 CMTPDataProviderController* iSingletonDpController; |
|
103 |
|
104 /** |
|
105 The configurability parameter data singleton. |
|
106 */ |
|
107 CMTPFrameworkConfig* iSingletonFrameworkConfig; |
|
108 |
|
109 /** |
|
110 The file server session singleton |
|
111 */ |
|
112 RFs iSingletonFs; |
|
113 |
|
114 /** |
|
115 The object manager singleton. |
|
116 */ |
|
117 CMTPObjectMgr* iSingletonObjectMgr; |
|
118 |
|
119 /** |
|
120 The request and event parser/router singleton. |
|
121 */ |
|
122 CMTPParserRouter* iSingletonRouter; |
|
123 |
|
124 /** |
|
125 The storage manager singleton. |
|
126 */ |
|
127 CMTPStorageMgr* iSingletonStorageMgr; |
|
128 |
|
129 /** |
|
130 The data code manager singleton. |
|
131 */ |
|
132 CMTPDataCodeGenerator* iSingleDataCodeGenerator; |
|
133 |
|
134 /** |
|
135 The device service manager singleton. |
|
136 */ |
|
137 CMTPServiceMgr* iSingleServiceMgr; |
|
138 |
|
139 }; |
|
140 |
|
141 private: // Owned |
|
142 |
|
143 /** |
|
144 FLOGGER debug trace member variable. |
|
145 */ |
|
146 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
147 |
|
148 /** |
|
149 The nested flag which indicates if the singletons manager reference was |
|
150 recursively opened. |
|
151 */ |
|
152 TBool iNested; |
|
153 |
|
154 /** |
|
155 The singletons reference block. |
|
156 */ |
|
157 CSingletons* iSingletons; |
|
158 }; |
|
159 |
|
160 #endif // RMTPFRAMEWORK_H |