|
1 /* |
|
2 * Copyright (c) 2006 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: Connection method extended interface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CMCONNECTIONMETHODEXT_H |
|
19 #define CMCONNECTIONMETHODEXT_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <cmconnectionmethoddef.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 class CCmPluginBaseEng; |
|
27 class RCmDestinationExt; |
|
28 |
|
29 /** |
|
30 * RCmConnectionMethodExt is for getting/setting values of a connection method. |
|
31 * Use RCmManagerExt or RCmDestinationExt classes to query a connection method. |
|
32 * @lib cmmanager.lib |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 NONSHARABLE_CLASS( RCmConnectionMethodExt ) |
|
36 { |
|
37 //===================================================================== |
|
38 // Constructors/Destructors |
|
39 // |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Default constructor. |
|
44 */ |
|
45 IMPORT_C RCmConnectionMethodExt(); |
|
46 |
|
47 |
|
48 /** |
|
49 * Copy constructor. |
|
50 */ |
|
51 IMPORT_C RCmConnectionMethodExt(const RCmConnectionMethodExt& aItem); |
|
52 |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 IMPORT_C ~RCmConnectionMethodExt(); |
|
58 |
|
59 //===================================================================== |
|
60 // API functions |
|
61 public: |
|
62 |
|
63 /** |
|
64 * Close the session. |
|
65 */ |
|
66 IMPORT_C void Close(); |
|
67 |
|
68 /** |
|
69 * Creates a copy of this connection method. UpdateL() has to be called |
|
70 * to store new connection method in database. Copy is put to |
|
71 * the Uncategorized destination. The ownership is passed. |
|
72 */ |
|
73 IMPORT_C RCmConnectionMethodExt CreateCopyL(); |
|
74 |
|
75 /** |
|
76 * Gets the value for a TInt attribute. |
|
77 * @param aAttribute Identifies the attribute to be retrived. |
|
78 * @return contains the requested TInt attribute. |
|
79 */ |
|
80 IMPORT_C TUint32 GetIntAttributeL( TUint32 aAttribute ) const; |
|
81 |
|
82 /** |
|
83 * Gets the value for a TBool attribute. |
|
84 * @param aAttribute Identifies the attribute to be retrived. |
|
85 * @return contains the requested TBool attribute. |
|
86 */ |
|
87 IMPORT_C TBool GetBoolAttributeL( TUint32 aAttribute ) const; |
|
88 |
|
89 /** |
|
90 * Gets the value for a String16 attribute. |
|
91 * HBuf ownership is passed to the caller |
|
92 * @param aAttribute Identifies the attribute to be retrived. |
|
93 * @return copy of the requested attribute. Ownership is passed. |
|
94 */ |
|
95 IMPORT_C HBufC* GetStringAttributeL( TUint32 aAttribute ) const; |
|
96 |
|
97 /** |
|
98 * Gets the value for a String8 attribute. |
|
99 * HBuf ownership is passed to the caller |
|
100 * @param aAttribute Identifies the attribute to be retrived. |
|
101 * @return copy of the requested attribute. Ownership is passed. |
|
102 */ |
|
103 IMPORT_C HBufC8* GetString8AttributeL( const TUint32 aAttribute ) const; |
|
104 |
|
105 /** |
|
106 * Sets the value for a TInt attribute. |
|
107 * @param aAttribute Identifies the attribute to be set. |
|
108 * @param aValue The value to be set. |
|
109 * @return None. |
|
110 */ |
|
111 IMPORT_C void SetIntAttributeL( TUint32 aAttribute, TUint32 aValue ); |
|
112 |
|
113 /** |
|
114 * Sets the value for a TBool attribute. |
|
115 * @param aAttribute Identifies the attribute to be set. |
|
116 * @param aValue The value to be set. |
|
117 * @return None. |
|
118 */ |
|
119 IMPORT_C void SetBoolAttributeL( TUint32 aAttribute, TBool aValue ); |
|
120 |
|
121 /** |
|
122 * Sets the value for a String16 attribute. |
|
123 * @param aAttribute Identifies the attribute to be set. |
|
124 * @param aValue The value to be set. |
|
125 * @return None. |
|
126 */ |
|
127 IMPORT_C void SetStringAttributeL( TUint32 aAttribute, |
|
128 const TDesC16& aValue ); |
|
129 |
|
130 /** |
|
131 * Sets the value for a String8 attribute. |
|
132 * @param aAttribute Identifies the attribute to be set. |
|
133 * @param aValue The value to be set. |
|
134 * @return None. |
|
135 */ |
|
136 IMPORT_C void SetString8AttributeL( TUint32 aAttribute, |
|
137 const TDesC8& aValue ); |
|
138 |
|
139 /** |
|
140 * Call this function only if this CM is an embedded destination! |
|
141 * @return embedded destination |
|
142 */ |
|
143 IMPORT_C RCmDestinationExt DestinationL() const; |
|
144 |
|
145 /** |
|
146 * Try to delete the connection method. If it is referenced from |
|
147 * any destination, then the references are removed and the |
|
148 * connection method is deleted. |
|
149 * Do NOT call this function if you got this |
|
150 * connection method from a destination. Call destination's |
|
151 * DeleteConnectionMethodL() function instead. |
|
152 * @return ETrue if connection method deleted. |
|
153 */ |
|
154 IMPORT_C TBool DeleteL(); |
|
155 |
|
156 /** |
|
157 * Update in the database. |
|
158 * @return None. |
|
159 */ |
|
160 IMPORT_C void UpdateL(); |
|
161 |
|
162 /** |
|
163 * checks if connection methods are the same |
|
164 * |
|
165 * @since S60 3.2 |
|
166 * @param aConnMethod the connection method being compared |
|
167 * @return ETrue if the destinations are the same |
|
168 */ |
|
169 IMPORT_C TBool operator==( RCmConnectionMethodExt& aConnMethod ) const; |
|
170 |
|
171 /** |
|
172 * checks if connection methods are not the same |
|
173 * |
|
174 * @since S60 3.2 |
|
175 * @param aConnMethod the connection method being compared |
|
176 * @return ETrue if the destinations are different |
|
177 */ |
|
178 IMPORT_C TBool operator!=( RCmConnectionMethodExt& aConnMethod ) const; |
|
179 |
|
180 |
|
181 /** |
|
182 * assignment operator |
|
183 * |
|
184 * @since S60 3.2 |
|
185 * @return RCmConnectionMethod |
|
186 */ |
|
187 IMPORT_C RCmConnectionMethodExt& operator=(const RCmConnectionMethodExt& |
|
188 aConnMethod); |
|
189 |
|
190 private: |
|
191 |
|
192 friend class RCmManagerExt; |
|
193 friend class RCmDestinationExt; |
|
194 |
|
195 private: |
|
196 |
|
197 CCmPluginBaseEng* iImplementation; |
|
198 }; |
|
199 |
|
200 #endif // CMCONNECTIONMETHODEXT_H |
|
201 |
|
202 // End of File |