1 /* |
|
2 * Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Implementation of connection method manager. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CMMANAGERIMPL_H |
|
21 #define CMMANAGERIMPL_H |
|
22 |
|
23 #include <metadatabase.h> |
|
24 #include <datamobilitycommsdattypes.h> |
|
25 #include <cmmanagerdef.h> |
|
26 |
|
27 #include "cmmserverdefs.h" |
|
28 |
|
29 class CCmmTransactionHandler; |
|
30 class CCmPluginBaseEng; |
|
31 class CCmmCache; |
|
32 |
|
33 |
|
34 NONSHARABLE_CLASS( CCmManagerImpl ) : public CBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Two phased construction. |
|
39 */ |
|
40 static CCmManagerImpl* NewL(); |
|
41 |
|
42 /** |
|
43 * Destructor. |
|
44 */ |
|
45 virtual ~CCmManagerImpl(); |
|
46 |
|
47 private: |
|
48 /** |
|
49 * Constructor. |
|
50 */ |
|
51 CCmManagerImpl(); |
|
52 |
|
53 /** |
|
54 * 2nd phase constructor. |
|
55 */ |
|
56 void ConstructL(); |
|
57 |
|
58 public: |
|
59 /** |
|
60 * Check the existence of tables we need. Creates if it is not exist, get |
|
61 * the table id otherwise. |
|
62 */ |
|
63 void CheckTablesL(); |
|
64 |
|
65 /** |
|
66 * Query all of the supported bearer types. |
|
67 * |
|
68 * @param aArray List of all supported bearer types. |
|
69 */ |
|
70 void SupportedBearersL( RArray<TUint32>& aArray ) const; |
|
71 |
|
72 /** |
|
73 * Return the requested table ID. |
|
74 */ |
|
75 CommsDat::TMDBElementId TableId( TCmmDbRecords aRecord ); |
|
76 |
|
77 /** |
|
78 * Get a handle to the database cache manager. |
|
79 */ |
|
80 CCmmCache& Cache(); |
|
81 |
|
82 /** |
|
83 * Get a handle to the database transaction handler. |
|
84 */ |
|
85 CCmmTransactionHandler* GetTransactionHandler(); |
|
86 |
|
87 /** |
|
88 * Get a handle to database session. |
|
89 */ |
|
90 CommsDat::CMDBSession& Session() const; |
|
91 |
|
92 /** |
|
93 * Return true is WLAN is supported on phone. |
|
94 */ |
|
95 TBool WlanSupported() const; |
|
96 |
|
97 private: |
|
98 /** |
|
99 * Build an array of all bearer specific plugins. |
|
100 */ |
|
101 void BuildPluginArrayL(); |
|
102 |
|
103 private: |
|
104 // Database cache manager. |
|
105 CCmmCache* iCache; //Owned. |
|
106 |
|
107 // Array for bearer plugins. |
|
108 CArrayPtrFlat<const CCmPluginBaseEng>* iPlugins; // Owned. |
|
109 |
|
110 // Database transaction handler. |
|
111 CCmmTransactionHandler* iTrans; //Owned. |
|
112 |
|
113 // Destination network table ID. |
|
114 CommsDat::TMDBElementId iSnapTableId; |
|
115 // Global bearer type priorization table ID. |
|
116 CommsDat::TMDBElementId iBearerPriorityTableId; |
|
117 // Destination metadata table ID. |
|
118 CommsDat::TMDBElementId iDestMetadataTableId; |
|
119 // Default connection table ID. |
|
120 CommsDat::TMDBElementId iDefConnTableId; |
|
121 |
|
122 // Flag for feature manager initialization status. |
|
123 TBool iIsFeatureManagerInitialised; |
|
124 |
|
125 // True if phone supports WLAN. |
|
126 TBool iWLanSupport; |
|
127 }; |
|
128 |
|
129 #endif // CMMANAGERIMPL_H |
|
130 |
|
131 // End of file |
|