|
1 // Copyright (c) 1997-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 // Agent (agt) APIs. |
|
15 // This file contains the APIs required to implement a basic agent for Symbian OS. APIs for more advanced agents can be found in the header files referenced below. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file NIFAGT.H |
|
21 @sa CAgentSMBase.h |
|
22 @sa CAgentBase.h |
|
23 @publishedPartner |
|
24 @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
25 */ |
|
26 |
|
27 #if !defined(__NIFAGT_H__) |
|
28 #define __NIFAGT_H__ |
|
29 |
|
30 #ifndef __NIFMAN_H__ |
|
31 #include <nifman.h> |
|
32 #endif |
|
33 |
|
34 #ifndef __NIFPRVAR_H__ |
|
35 #include <comms-infras/nifprvar.h> |
|
36 #endif |
|
37 |
|
38 #include <comms-infras/connectionsettings.h> |
|
39 #include <cdbstore.h> |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 // Agent classes |
|
45 |
|
46 class CNifAgentBase; |
|
47 class CAgentAdapter; |
|
48 |
|
49 class CNifAgentFactory : public CNifFactory |
|
50 /** |
|
51 * The factory object used to create new instances of a agent. |
|
52 * An agent is packaged in a dll - nifman will call this class to create new instances of a agent. |
|
53 * @ingroup Agent |
|
54 * |
|
55 * @publishedPartner |
|
56 * @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
57 */ |
|
58 { |
|
59 friend class CAgentAdapter; |
|
60 |
|
61 protected: |
|
62 /** |
|
63 * Create a new instance of the agent specified by aName |
|
64 * @param aName The name of the agent to be created |
|
65 * @returns A pointer to a new instance of the agent |
|
66 */ |
|
67 virtual CNifAgentBase *NewAgentL(const TDesC& aName) = 0; |
|
68 |
|
69 /** |
|
70 * Retrieve information about an agent |
|
71 * @param aInfo On return, contains information about the agent |
|
72 * @param aIndex An index into CNifAgentBase-derived objects in the agent, starting from 0. It is up to the agent how it assigns indices to objects. |
|
73 * @returns KErrNone, if successful; or one of the standard Symbian OS error codes |
|
74 */ |
|
75 virtual TInt Info(TNifAgentInfo& aInfo, TInt aIndex) const = 0; |
|
76 |
|
77 }; |
|
78 |
|
79 class MNifAgentNotify |
|
80 /** |
|
81 * Interface from the agent to Nifman |
|
82 * @ingroup Nifman |
|
83 * @publishedPartner |
|
84 * @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
85 */ |
|
86 { |
|
87 public: |
|
88 /** |
|
89 * Callback to indicate that the agent has finished its connection phase, and is ready to pass control to the nif |
|
90 * @param aStatus The error code generated by this phase of connection startup |
|
91 */ |
|
92 virtual void ConnectComplete(TInt aStatus) = 0; |
|
93 |
|
94 /** |
|
95 * Callback to indicate that the agent has performed the requested reconnection |
|
96 * @note Obviously, this is only used in situations where the agent has received a request to reconnect |
|
97 * @param aStatus The error code, if any, from the reconnection attempt |
|
98 */ |
|
99 virtual void ReconnectComplete(TInt aStatus) = 0; |
|
100 |
|
101 /** |
|
102 * Indication that the agent has finished authenticating |
|
103 * @param aStatus The error code, if any, from the reconnection attempt |
|
104 */ |
|
105 virtual void AuthenticateComplete(TInt aStatus) = 0; |
|
106 |
|
107 /** |
|
108 * Callback from the agent to indicate that it has successfully started the connection |
|
109 * @note This call will cause nifman to load and bind the nif |
|
110 * @note This does not mean that the connection is ready for use by the nif yet - the nif is handed control after ConnectComplete() |
|
111 */ |
|
112 virtual void ServiceStarted() = 0; |
|
113 |
|
114 /** |
|
115 * |
|
116 */ |
|
117 virtual void ServiceClosed() = 0; |
|
118 |
|
119 /** |
|
120 * |
|
121 */ |
|
122 virtual void DisconnectComplete() = 0; |
|
123 |
|
124 /** |
|
125 * Progress notification from an agent for a connection |
|
126 * @param aStage The progress stage that has been reached |
|
127 * @param aError Any errors that have occured |
|
128 * @since v5.0 |
|
129 */ |
|
130 virtual void AgentProgress(TInt aStage, TInt aError) = 0; |
|
131 |
|
132 /** |
|
133 * Progress notification from an agent for a subconnection |
|
134 * @note This function will not be called until agents support starting subconnections |
|
135 * @param aSubConnectionUniqueId The subconnection to which this notification refers |
|
136 * @param aStage The progress stage that has been reached |
|
137 * @param aError Any errors that have occured |
|
138 * @since v7.0s |
|
139 */ |
|
140 virtual void AgentProgress(TSubConnectionUniqueId aSubConnectionUniqueId, TInt aStage, TInt aError) = 0; |
|
141 |
|
142 /** |
|
143 * Notification of an event from the nif |
|
144 * @param aEvent The type of event that occured |
|
145 * @param aInfo Any data associated with the event |
|
146 * @returns KErrNone if successful, otherwise one of the system-wide error codes |
|
147 * @note SC with previous releases broken in v6.1 when first argument changed type |
|
148 * @since |
|
149 */ |
|
150 virtual TInt Notification(TAgentToNifEventType aEvent, TAny* aInfo = NULL) = 0; |
|
151 |
|
152 /** |
|
153 * |
|
154 * @note Needs to be called by the agent when it gets an incoming call so that agent can wait for an incoming and do an outgoing at the same time, i.e. it waits for the incoming without NifMan's knowledge |
|
155 * @since v6.1 |
|
156 */ |
|
157 virtual TInt IncomingConnectionReceived() = 0; |
|
158 |
|
159 /** |
|
160 * Indication that some parameter relating to a subconnection has changed in the agent eg. new subconnection opened, QoS changed |
|
161 * @param aEventType The type of the event |
|
162 * @param aEvent The event which has occured |
|
163 * @param aEventData Any arguments or additional data to do with the event; the interpretation of this depends on the event |
|
164 * @param aSource An appropriate identifier of the source of the event - this will be used when one receiver is receiving events from many producers |
|
165 * @since v7.0s |
|
166 */ |
|
167 virtual void AgentEvent(TNetworkAdaptorEventType aEventType, TUint aEvent, const TDesC8& aEventData, TAny* aSource=0)=0; |
|
168 }; |
|
169 |
|
170 class MAgentSessionNotify |
|
171 /** |
|
172 * Interface from agents to CNifSession |
|
173 * @ingroup Nifman |
|
174 * @publishedPartner |
|
175 * @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
176 * @note This used to be the interface used by both CNifAgentRef and the agent to communicate with CNifSession |
|
177 * @note It has now been altered so only the agent uses it, for ServiceChangeNotification(); ProgressNotification() has now been moved to the MNifSessionNotify interface |
|
178 * @note Agents should not have been calling ProgressNotification() anyway, they should call MNifAgentNotify::AgentProgress() |
|
179 */ |
|
180 { |
|
181 public: |
|
182 /** |
|
183 * |
|
184 */ |
|
185 virtual void ServiceChangeNotification(TUint32 aId, const TDesC& aType) = 0; |
|
186 }; |
|
187 |
|
188 class MNifAgentExtendedManagementInterface |
|
189 /** |
|
190 * Interface for extended RConnection functionality |
|
191 * Intended for derivation by agents wishing to support extended connection management functionality |
|
192 * @see Corresponding MNifIfExtendedManagementInterface for nifs wishing to support extended connection management functionality |
|
193 * @publishedPartner |
|
194 * @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
195 * @note Augments CNifAgentBase, which provides basic connection management functionality |
|
196 * @note To support this interface, clients must accept a Control(KCOLAgent, KCOGetAgentEMIPtr, TPckg<MNifIfExtendedManagementInterface*>) and return a pointer to a class that implements this interface |
|
197 * @note Until the APIs are correctly defined to support agents that start subconnetions, this class should also be derived in the nif |
|
198 */ |
|
199 { |
|
200 public: |
|
201 /** |
|
202 Find out the type of this connection (eg. CSD, GPRS, CDMA, Ethernet, some more specific subtype) |
|
203 |
|
204 @param aConnectionType On return, contains the type of the connection |
|
205 @return KErrNone, or one of the system-wide error codes |
|
206 */ |
|
207 virtual TInt GetInterfaceType(TConnectionType& aConnectionType)=0; |
|
208 |
|
209 /** |
|
210 Discover how many subconnections exist on an interface |
|
211 |
|
212 @note All interfaces must support at least one subconnection |
|
213 @param aCount On return, contains the number of subconnections that currently exist on this interface |
|
214 @return KErrNone, or one of the system-wide error codes |
|
215 */ |
|
216 virtual TInt EnumerateSubConnections(TUint& aCount)=0; |
|
217 |
|
218 /** |
|
219 Get information about a subconnection with no prior knowledge of the unique id of any subconnetion |
|
220 |
|
221 @note aSubConnectionInfo should contain a class derived from TSubConnectionInfo; |
|
222 the class should be suitable for type of interface being queried, |
|
223 however it is up to the interface to check this. |
|
224 @note The type of the class can be determined by checking the iConnectionType member |
|
225 @note Unique IDs for subconnections are on a per-nif basis. |
|
226 It is the responsibility of the nif or agent to generate these IDs and |
|
227 to ensure they are unique across the connection |
|
228 @param aIndex A number between one and the total number of subconnections |
|
229 returned by EnumerateSubConnections() |
|
230 @param aSubConnectionInfo Should contain a class derived from TSubConnectionInfo and |
|
231 suitable for the type of the interface being queried; on return, |
|
232 contains the class with all its members filled in |
|
233 @return KErrNone, or one of the system-wide error codes; in particular |
|
234 KErrArgument if the class type is unsuitable |
|
235 */ |
|
236 virtual TInt GetSubConnectionInfo(TUint aIndex, TDes8& aSubConnectionInfo)=0; |
|
237 |
|
238 /** |
|
239 Get information about the subconnection with the supplied unique ID |
|
240 |
|
241 @note aSubConnectionInfo should contain a class derived from TSubConnectionInfo; |
|
242 the class should be suitable for type of interface being queried, |
|
243 however it is up to the interface to check this. |
|
244 @note The type of the class can be determined by checking the iConnectionType member |
|
245 @param aSubConnectionInfo Should contain a class derived from |
|
246 TSubConnectionInfo and suitable for the type of the interface being queried, |
|
247 and with the iSubConnectionUniqueId member set to the appropriate unique ID |
|
248 @return KErrNone, or one of the system-wide error codes; in particular |
|
249 KErrArgument if the class type is unsuitable |
|
250 */ |
|
251 virtual TInt GetSubConnectionInfo(TDes8& aSubConnectionInfo)=0; |
|
252 }; |
|
253 |
|
254 class CNifAgentBase : public CBase |
|
255 /** |
|
256 * Base class for agents. |
|
257 * All agents derive from this base class; either directly or via another class that offers additional functionality. |
|
258 * @sa CAgentBase; CStateMachineAgentBase (for v6.1 agx porting) |
|
259 * @ingroup Agent |
|
260 * |
|
261 * @publishedPartner |
|
262 * @deprecated since v9.5. Use MCPRs/CPRs/SCPRs instead of agents. |
|
263 */ |
|
264 { |
|
265 friend class CNifAgentRef; |
|
266 friend class CNifAgentRef2; |
|
267 friend class CAgentAdapter; |
|
268 |
|
269 public: |
|
270 /** |
|
271 * |
|
272 */ |
|
273 IMPORT_C CNifAgentBase(); |
|
274 |
|
275 /** |
|
276 * @deprecated |
|
277 * This version of the Control(TUint, TUint, TDes8&) function is now deprecated. DO NOT Override |
|
278 * Use the version of CNifAgentBase::Control(TUint, TUint, TDes8&, RProcess) that takes four parameters |
|
279 */ |
|
280 IMPORT_C virtual TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption); |
|
281 |
|
282 /** |
|
283 * |
|
284 */ |
|
285 virtual void Info(TNifAgentInfo& aInfo) const = 0; |
|
286 |
|
287 /** |
|
288 * |
|
289 */ |
|
290 virtual void Connect(TAgentConnectType aType) = 0; |
|
291 |
|
292 /** |
|
293 * |
|
294 */ |
|
295 virtual void Connect(TAgentConnectType aType, CStoreableOverrideSettings* aOverrideSettings) = 0; |
|
296 |
|
297 /** |
|
298 * |
|
299 */ |
|
300 virtual void CancelConnect() = 0; |
|
301 |
|
302 /** |
|
303 * |
|
304 */ |
|
305 virtual void Reconnect() = 0; |
|
306 |
|
307 /** |
|
308 * |
|
309 */ |
|
310 virtual void CancelReconnect() = 0; |
|
311 |
|
312 /** |
|
313 * |
|
314 */ |
|
315 virtual void Authenticate(TDes& aUsername, TDes& aPassword) = 0; |
|
316 |
|
317 /** |
|
318 * |
|
319 */ |
|
320 virtual void CancelAuthenticate() = 0; |
|
321 |
|
322 /** |
|
323 * |
|
324 */ |
|
325 virtual void Disconnect(TInt aReason) = 0; |
|
326 |
|
327 /** |
|
328 * Return any excess data was received during connection setup |
|
329 * @param aBuffer On return, the buffer contains the excess data from the agent |
|
330 * @returns KErrNone, if successful; otherwise, one of the standard Symbian OS error codes |
|
331 */ |
|
332 virtual TInt GetExcessData(TDes8& aBuffer) = 0; |
|
333 |
|
334 /** |
|
335 * Notification of an event from the nif |
|
336 * @param aEvent The type of event that occured |
|
337 * @param aInfo Any data associated with the event |
|
338 * @returns KErrNone if successful, otherwise one of the system-wide error codes |
|
339 * @since v6.1 |
|
340 */ |
|
341 virtual TInt Notification(TNifToAgentEventType aEvent, TAny* aInfo) = 0; |
|
342 |
|
343 /** |
|
344 * |
|
345 */ |
|
346 virtual TInt IncomingConnectionReceived() = 0; |
|
347 |
|
348 /** |
|
349 * |
|
350 */ |
|
351 virtual void GetLastError(TInt& aError) = 0; |
|
352 |
|
353 /** |
|
354 * |
|
355 */ |
|
356 virtual TBool IsActive() const = 0; |
|
357 |
|
358 /** |
|
359 * |
|
360 */ |
|
361 virtual TBool IsReconnect() const = 0; |
|
362 |
|
363 /** |
|
364 * |
|
365 */ |
|
366 virtual void SetConnectionSettingsL(const TConnectionSettings& aSettings) = 0; |
|
367 |
|
368 /** |
|
369 * |
|
370 */ |
|
371 virtual TConnectionSettings& ConnectionSettingsL() = 0; |
|
372 |
|
373 /** |
|
374 * |
|
375 */ |
|
376 virtual void SetOverridesL(CStoreableOverrideSettings* aOverrideSettings) = 0; |
|
377 |
|
378 /** |
|
379 * |
|
380 */ |
|
381 virtual CStoreableOverrideSettings* OverridesL() = 0; |
|
382 |
|
383 /** |
|
384 * |
|
385 */ |
|
386 virtual void RequestNotificationOfServiceChangeL(MAgentSessionNotify* aSession) = 0; |
|
387 |
|
388 /** |
|
389 * |
|
390 */ |
|
391 virtual void CancelRequestNotificationOfServiceChange(MAgentSessionNotify* aSession) = 0; |
|
392 |
|
393 |
|
394 /** |
|
395 * |
|
396 */ |
|
397 IMPORT_C virtual TInt Control(TUint aOptionLevel, TUint aOptionName, TDes8& aOption, const RProcess& aProcess); |
|
398 |
|
399 /** |
|
400 * Read an integer field from the connection settings provider |
|
401 * @param aField The name of the field to read |
|
402 * @param aValue On return, contains the value of the field read |
|
403 * @param aMessage For capability checking |
|
404 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
405 */ |
|
406 IMPORT_C TInt ReadInt(const TDesC& aField, TUint32& aValue,const RMessagePtr2* aMessage); |
|
407 IMPORT_C TInt ReadInt(const TDesC& aField, TUint32& aValue ); |
|
408 |
|
409 /** |
|
410 * Write an integer field to the connection settings provider |
|
411 * @param aField The name of the field to which to write |
|
412 * @param aValue The value to be written to the field |
|
413 * @param aMessage For capability checking |
|
414 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
415 */ |
|
416 IMPORT_C TInt WriteInt(const TDesC& aField, TUint32 aValue,const RMessagePtr2* aMessage); |
|
417 IMPORT_C TInt WriteInt(const TDesC& aField, TUint32 aValue ); |
|
418 |
|
419 /** |
|
420 * Read a descriptor field from the connection settings provider |
|
421 * @param aField The name of the field to read |
|
422 * @param aValue On return, contains the value of the field read |
|
423 * @param aMessage For capability checking |
|
424 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
425 */ |
|
426 IMPORT_C TInt ReadDes(const TDesC& aField, TDes8& aValue,const RMessagePtr2* aMessage); |
|
427 IMPORT_C TInt ReadDes(const TDesC& aField, TDes8& aValue ); |
|
428 |
|
429 /** |
|
430 * Write a descriptor field to the connection settings provider |
|
431 * @param aField The name of the field to which to write |
|
432 * @param aValue The value to be written to the field |
|
433 * @param aMessage For capability checking |
|
434 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
435 */ |
|
436 IMPORT_C TInt WriteDes(const TDesC& aField, const TDesC8& aValue,const RMessagePtr2* aMessage); |
|
437 IMPORT_C TInt WriteDes(const TDesC& aField, const TDesC8& aValue ); |
|
438 |
|
439 /** |
|
440 * Read a descriptor field from the connection settings provider |
|
441 * @param aField The name of the field to read |
|
442 * @param aValue On return, contains the value of the field read |
|
443 * @param aMessage For capability checking |
|
444 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
445 */ |
|
446 IMPORT_C TInt ReadDes(const TDesC& aField, TDes16& aValue,const RMessagePtr2* aMessage); |
|
447 IMPORT_C TInt ReadDes(const TDesC& aField, TDes16& aValue ); |
|
448 |
|
449 /** |
|
450 * Write a descriptor field to the connection settings provider |
|
451 * @param aField The name of the field to which to write |
|
452 * @param aValue The value to be written to the field |
|
453 * @param aMessage For capability checking |
|
454 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
455 */ |
|
456 IMPORT_C TInt WriteDes(const TDesC& aField, const TDesC16& aValue,const RMessagePtr2* aMessage); |
|
457 IMPORT_C TInt WriteDes(const TDesC& aField, const TDesC16& aValue ); |
|
458 /** |
|
459 * Read an boolean field from the connection settings provider |
|
460 * @param aField The name of the field to read |
|
461 * @param aValue On return, contains the value of the field read |
|
462 * @param aMessage For capability checking |
|
463 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
464 */ |
|
465 IMPORT_C TInt ReadBool(const TDesC& aField, TBool& aValue,const RMessagePtr2* aMessage); |
|
466 IMPORT_C TInt ReadBool(const TDesC& aField, TBool& aValue ); |
|
467 /** |
|
468 * Write an boolean field to the connection settings provider |
|
469 * @param aField The name of the field to which to write |
|
470 * @param aValue The value to be written to the field |
|
471 * @param aMessage For capability checking |
|
472 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
473 */ |
|
474 IMPORT_C TInt WriteBool(const TDesC& aField, TBool aValue,const RMessagePtr2* aMessage); |
|
475 IMPORT_C TInt WriteBool(const TDesC& aField, TBool aValue ); |
|
476 |
|
477 /** |
|
478 * Read a descriptor field of unknown size from the connection settings provider |
|
479 * @param aField The name of the field to read |
|
480 * @param aMessage For capability checking |
|
481 * @returns The value of the field read |
|
482 * @since v7.0s |
|
483 */ |
|
484 IMPORT_C HBufC* ReadLongDesLC(const TDesC& aField, const RMessagePtr2* aMessage); |
|
485 IMPORT_C HBufC* ReadLongDesLC(const TDesC& aField ); |
|
486 |
|
487 /** |
|
488 * Check that a client has the required capabilities to read a field |
|
489 * @param aField The field to check |
|
490 * @param aMessage Message containing client capabilites |
|
491 * @returns one of the system-wide error codes |
|
492 */ |
|
493 IMPORT_C TInt CheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage ); |
|
494 /** |
|
495 * Check that a client has the required capabilities to write a field |
|
496 * @param aField The field to check |
|
497 * @param aMessage Message containing client capabilites |
|
498 * @returns one of the system-wide error codes |
|
499 */ |
|
500 IMPORT_C TInt CheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage ); |
|
501 |
|
502 |
|
503 protected: |
|
504 |
|
505 /** |
|
506 * Read an integer field from the connection settings provider |
|
507 * @param aField The name of the field to read |
|
508 * @param aValue On return, contains the value of the field read |
|
509 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
510 */ |
|
511 virtual TInt DoReadInt(const TDesC& aField, TUint32& aValue,const RMessagePtr2* aMessage) = 0; |
|
512 |
|
513 /** |
|
514 * Write an integer field to the connection settings provider |
|
515 * @param aField The name of the field to which to write |
|
516 * @param aValue The value to be written to the field |
|
517 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
518 */ |
|
519 virtual TInt DoWriteInt(const TDesC& aField, TUint32 aValue,const RMessagePtr2* aMessage) = 0; |
|
520 |
|
521 /** |
|
522 * Read a 8-bit descriptor field from the connection settings provider |
|
523 * @param aField The name of the field to read |
|
524 * @param aValue On return, contains the value of the field read |
|
525 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
526 */ |
|
527 virtual TInt DoReadDes(const TDesC& aField, TDes8& aValue,const RMessagePtr2* aMessage) = 0; |
|
528 |
|
529 /** |
|
530 * Read a 16-bit descriptor field from the connection settings provider |
|
531 * @param aField The name of the field to read |
|
532 * @param aValue On return, contains the value of the field read |
|
533 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
534 */ |
|
535 virtual TInt DoWriteDes(const TDesC& aField, const TDesC8& aValue,const RMessagePtr2* aMessage) = 0; |
|
536 |
|
537 /** |
|
538 * Write an 8-bit descriptor field to the connection settings provider |
|
539 * @param aField The name of the field to which to write |
|
540 * @param aValue The value to be written to the field |
|
541 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
542 */ |
|
543 virtual TInt DoReadDes(const TDesC& aField, TDes16& aValue,const RMessagePtr2* aMessage) = 0; |
|
544 |
|
545 /** |
|
546 * Write an 16-bit descriptor field to the connection settings provider |
|
547 * @param aField The name of the field to which to write |
|
548 * @param aValue The value to be written to the field |
|
549 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
550 */ |
|
551 virtual TInt DoWriteDes(const TDesC& aField, const TDesC16& aValue,const RMessagePtr2* aMessage) = 0; |
|
552 |
|
553 /** |
|
554 * Read an boolean field from the connection settings provider |
|
555 * @param aField The name of the field to read |
|
556 * @param aValue On return, contains the value of the field read |
|
557 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
558 */ |
|
559 virtual TInt DoReadBool(const TDesC& aField, TBool& aValue,const RMessagePtr2* aMessage) = 0; |
|
560 |
|
561 /** |
|
562 * Write an boolean field to the connection settings provider |
|
563 * @param aField The name of the field to which to write |
|
564 * @param aValue The value to be written to the field |
|
565 * @returns KErrNone, if successful; otherwise one of the standard Symbian OS error codes |
|
566 */ |
|
567 virtual TInt DoWriteBool(const TDesC& aField, TBool aValue,const RMessagePtr2* aMessage) = 0; |
|
568 |
|
569 /** |
|
570 * Read a 16-bit descriptor field of unknown size from the connection settings provider |
|
571 * @param aField The name of the field to read |
|
572 * @returns The value of the field read |
|
573 * @since v7.0s |
|
574 */ |
|
575 virtual HBufC* DoReadLongDesLC(const TDesC& aField,const RMessagePtr2* aMessage) = 0; |
|
576 |
|
577 /** |
|
578 * Check that a client has the required capabilties to read a field |
|
579 * @param aField the name of the field to read |
|
580 * @param aMessage Message containing the capabilities of the client |
|
581 * @returns KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes |
|
582 */ |
|
583 IMPORT_C virtual TInt DoCheckReadCapability( const TDesC& aField, const RMessagePtr2* aMessage ); |
|
584 /** |
|
585 * Check that a client has the required capabilties to write a field |
|
586 * @param aField the name of the field to write |
|
587 * @param aMessage Message containing the capabilities of the client |
|
588 * @returns KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes |
|
589 */ |
|
590 IMPORT_C virtual TInt DoCheckWriteCapability( const TDesC& aField, const RMessagePtr2* aMessage ); |
|
591 |
|
592 private: |
|
593 /** |
|
594 * Check that a client has the required capabilties |
|
595 * @param aOptionLevel |
|
596 * @param aOptionName |
|
597 * @param aOption |
|
598 * @param aMessage |
|
599 * @returns KErrNone, if the client has the required capabilites, otherwise one of the standard Symbian OS error codes |
|
600 */ |
|
601 TBool CheckControlPolicy(TUint aLevel, TUint aOption, const RProcess& aProcess); |
|
602 |
|
603 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
604 public: |
|
605 /** |
|
606 * Get the bearer information from the agent. The function has to be overridden |
|
607 * by the agent implementaion, if agent want to return the bearer specific information |
|
608 * to the Agent CPR. Otherwise, a default bearer value will returned. |
|
609 */ |
|
610 IMPORT_C virtual TUint32 GetBearerInfo() const ; |
|
611 #endif //SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
612 |
|
613 |
|
614 protected: |
|
615 MNifAgentNotify* iNotify; //< Pointer for the interface to nifman |
|
616 |
|
617 }; |
|
618 |
|
619 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS |
|
620 #include <comms-infras/nifagt_internal.h> |
|
621 #endif |
|
622 |
|
623 #endif |