1 /* |
|
2 * Copyright (c) 2009-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 * Client side IPC handling for Connection Method Manager server. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CMMANAGERAPI_H |
|
21 #define CMMANAGERAPI_H |
|
22 |
|
23 #include <e32std.h> |
|
24 #include <cmdefconnvalues.h> |
|
25 #include <cmgenconnsettings.h> |
|
26 |
|
27 class CCmDestinationWrapper; |
|
28 class CCmConnectionMethodWrapper; |
|
29 class TBearerPriority; |
|
30 class TCmmIpcStructGetConnMethods; |
|
31 class TCmmIpcStructMoveConnMethod; |
|
32 |
|
33 |
|
34 NONSHARABLE_CLASS( RCmManagerApi ) : public RSessionBase |
|
35 { |
|
36 public: |
|
37 /** |
|
38 * Constructor. |
|
39 */ |
|
40 RCmManagerApi(); |
|
41 |
|
42 public: |
|
43 /** |
|
44 * Opens a connection (session) to the CMM server. |
|
45 * @return KErrNone if the connection succeeds, a system-wide error code |
|
46 * if not. |
|
47 */ |
|
48 TInt Connect(); |
|
49 |
|
50 /** |
|
51 * Closes the connection (session). |
|
52 */ |
|
53 void Close(); |
|
54 |
|
55 TInt StoreDestinationWrapper( |
|
56 CCmDestinationWrapper* aDestinationWrapper ); |
|
57 TInt RemoveDestinationWrapper( |
|
58 CCmDestinationWrapper* aDestinationWrapper ); |
|
59 CCmDestinationWrapper* GetDestinationWrapperL( const TInt aHandle ); |
|
60 |
|
61 TInt StoreConnMethodWrapper( |
|
62 CCmConnectionMethodWrapper* aConnMethodWrapper ); |
|
63 TInt RemoveConnMethodWrapper( |
|
64 CCmConnectionMethodWrapper* aConnMethodWrapper ); |
|
65 CCmConnectionMethodWrapper* GetConnMethodWrapperL( const TInt aHandle ); |
|
66 |
|
67 TInt GetBearerInfoInt( |
|
68 const TUint32 aBearerType, |
|
69 const TUint32 aAttribute, |
|
70 TUint32& aValue ); |
|
71 TInt GetBearerInfoBool( |
|
72 const TUint32 aBearerType, |
|
73 const TUint32 aAttribute, |
|
74 TBool& aValue ); |
|
75 TInt GetBearerInfoString( |
|
76 const TUint32 aBearerType, |
|
77 const TUint32 aAttribute, |
|
78 HBufC* aBuffer ); |
|
79 TInt GetBearerInfoString8( |
|
80 const TUint32 aBearerType, |
|
81 const TUint32 aAttribute, |
|
82 HBufC8* aBuffer8 ); |
|
83 |
|
84 TInt GetConnectionMethodInfoInt( |
|
85 const TUint32 aIapId, |
|
86 const TUint32 aAttribute, |
|
87 TUint32& aValue ); |
|
88 TInt GetConnectionMethodInfoBool( |
|
89 const TUint32 aIapId, |
|
90 const TUint32 aAttribute, |
|
91 TBool& aValue ); |
|
92 TInt GetConnectionMethodInfoString( |
|
93 const TUint32 aIapId, |
|
94 const TUint32 aAttribute, |
|
95 HBufC* aBuffer ); |
|
96 TInt GetConnectionMethodInfoString8( |
|
97 const TUint32 aIapId, |
|
98 const TUint32 aAttribute, |
|
99 HBufC8* aBuffer8 ); |
|
100 |
|
101 void GetConnMethodsL( |
|
102 const TCmmIpcStructGetConnMethods& aParameters, |
|
103 RArray<TUint32>& aCmArray ); |
|
104 void GetAllDestinationsL( |
|
105 RArray<TUint32>& aDestArray ); |
|
106 |
|
107 void GetBearerPriorityArrayL( RArray<TBearerPriority>& aArray ); |
|
108 void SetBearerPriorityArrayL( const RArray<TBearerPriority>& aArray ); |
|
109 |
|
110 void GetSupportedBearersL( RArray<TUint32>& aArray ); |
|
111 |
|
112 TInt GetEasyWlanId( TUint32& aValue ); |
|
113 |
|
114 TInt ReadDefaultConnection( |
|
115 TCmDefConnValue& aDefConnSetting ); |
|
116 TInt WriteDefaultConnection( |
|
117 const TCmDefConnValue& aDefConnSetting ); |
|
118 |
|
119 TInt ReadGeneralConnectionSettings( |
|
120 TCmGenConnSettings& aGenConnSettings ); |
|
121 TInt WriteGeneralConnectionSettings( |
|
122 const TCmGenConnSettings& aGenConnSettings ); |
|
123 |
|
124 TInt CopyConnectionMethod( |
|
125 const TInt aTargetDestHandle, |
|
126 const TInt aConnMethodHandle, |
|
127 TInt& aIndex ); |
|
128 TInt MoveConnectionMethod( |
|
129 TCmmIpcStructMoveConnMethod& aPkgData ); |
|
130 TInt RemoveConnectionMethod( |
|
131 const TInt aTargetDestHandle, |
|
132 const TInt aConnMethodHandle ); |
|
133 TInt RemoveAllReferences( |
|
134 const TInt aConnMethodHandle ); |
|
135 TInt GetUncategorizedIcon( HBufC* aBuffer ); |
|
136 |
|
137 private: |
|
138 // Array of destination handles opened through this session. |
|
139 // Does not have ownership of contained objects. |
|
140 RPointerArray<CCmDestinationWrapper> iDestinations; |
|
141 |
|
142 // Array of connection method handles opened through this session. |
|
143 // Does not have ownership of contained objects. |
|
144 RPointerArray<CCmConnectionMethodWrapper> iConnMethods; |
|
145 |
|
146 // True when a session is established to the server. |
|
147 TBool iConnected; |
|
148 |
|
149 // True when using smaller buffer for ConnectionMethodL(array)-query. |
|
150 // Bigger buffer is taken into use if needed. |
|
151 TBool iSmallBufsForDestinations; |
|
152 |
|
153 // True when using smaller buffer for AllDestinationsL(array)-query. |
|
154 // Bigger buffer is taken into use if needed. |
|
155 TBool iSmallBufsForConnMethods; |
|
156 }; |
|
157 |
|
158 #endif // CMMANAGERAPI_H |
|
159 |
|
160 // End of file |
|