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