CNifAgentBase Class Reference
class CNifAgentBase : public CBase
|
Base class for agents. All agents derive from this base class; either directly or via another class that offers additional functionality.
CAgentBase
;
CStateMachineAgentBase
(for v6.1 agx porting)since v9.5. Use MCPRs/CPRs/SCPRs instead of agents.
Public Member Functions
|
|
CNifAgentBase
()
|
void
|
Authenticate
(
TDes
&,
TDes
&)
|
void
|
CancelAuthenticate
()
|
void
|
CancelConnect
()
|
void
|
CancelReconnect
()
|
void
|
CancelRequestNotificationOfServiceChange
(
MAgentSessionNotify
*)
|
IMPORT_C
TInt
|
CheckReadCapability
(const
TDesC
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
CheckWriteCapability
(const
TDesC
&, const
RMessagePtr2
*)
|
void
|
Connect
(
TAgentConnectType
)
|
void
|
Connect
(
TAgentConnectType
,
CStoreableOverrideSettings
*)
|
TConnectionSettings
&
|
ConnectionSettingsL
()
|
IMPORT_C
TInt
|
Control
(
TUint
,
TUint
,
TDes8
&)
|
IMPORT_C
TInt
|
Control
(
TUint
,
TUint
,
TDes8
&, const
RProcess
&)
|
void
|
Disconnect
(
TInt
)
|
TInt
|
GetExcessData
(
TDes8
&)
|
void
|
GetLastError
(
TInt
&)
|
TInt
|
IncomingConnectionReceived
()
|
void
|
Info
(
TNifAgentInfo
&)
|
TBool
|
IsActive
()
|
TBool
|
IsReconnect
()
|
TInt
|
Notification
(
TNifToAgentEventType
,
TAny
*)
|
CStoreableOverrideSettings
*
|
OverridesL
()
|
IMPORT_C
TInt
|
ReadBool
(const
TDesC
&,
TBool
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
ReadBool
(const
TDesC
&,
TBool
&)
|
IMPORT_C
TInt
|
ReadDes
(const
TDesC
&,
TDes8
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
ReadDes
(const
TDesC
&,
TDes8
&)
|
IMPORT_C
TInt
|
ReadDes
(const
TDesC
&,
TDes16
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
ReadDes
(const
TDesC
&,
TDes16
&)
|
IMPORT_C
TInt
|
ReadInt
(const
TDesC
&,
TUint32
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
ReadInt
(const
TDesC
&,
TUint32
&)
|
IMPORT_C
HBufC
*
|
ReadLongDesLC
(const
TDesC
&, const
RMessagePtr2
*)
|
IMPORT_C
HBufC
*
|
ReadLongDesLC
(const
TDesC
&)
|
void
|
Reconnect
()
|
void
|
RequestNotificationOfServiceChangeL
(
MAgentSessionNotify
*)
|
void
|
SetConnectionSettingsL
(const
TConnectionSettings
&)
|
void
|
SetOverridesL
(
CStoreableOverrideSettings
*)
|
IMPORT_C
TInt
|
WriteBool
(const
TDesC
&,
TBool
, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
WriteBool
(const
TDesC
&,
TBool
)
|
IMPORT_C
TInt
|
WriteDes
(const
TDesC
&, const
TDesC8
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
WriteDes
(const
TDesC
&, const
TDesC8
&)
|
IMPORT_C
TInt
|
WriteDes
(const
TDesC
&, const
TDesC16
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
WriteDes
(const
TDesC
&, const
TDesC16
&)
|
IMPORT_C
TInt
|
WriteInt
(const
TDesC
&,
TUint32
, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
WriteInt
(const
TDesC
&,
TUint32
)
|
Protected Member Functions
|
IMPORT_C
TInt
|
DoCheckReadCapability
(const
TDesC
&, const
RMessagePtr2
*)
|
IMPORT_C
TInt
|
DoCheckWriteCapability
(const
TDesC
&, const
RMessagePtr2
*)
|
TInt
|
DoReadBool
(const
TDesC
&,
TBool
&, const
RMessagePtr2
*)
|
TInt
|
DoReadDes
(const
TDesC
&,
TDes8
&, const
RMessagePtr2
*)
|
TInt
|
DoReadDes
(const
TDesC
&,
TDes16
&, const
RMessagePtr2
*)
|
TInt
|
DoReadInt
(const
TDesC
&,
TUint32
&, const
RMessagePtr2
*)
|
HBufC
*
|
DoReadLongDesLC
(const
TDesC
&, const
RMessagePtr2
*)
|
TInt
|
DoWriteBool
(const
TDesC
&,
TBool
, const
RMessagePtr2
*)
|
TInt
|
DoWriteDes
(const
TDesC
&, const
TDesC8
&, const
RMessagePtr2
*)
|
TInt
|
DoWriteDes
(const
TDesC
&, const
TDesC16
&, const
RMessagePtr2
*)
|
TInt
|
DoWriteInt
(const
TDesC
&,
TUint32
, const
RMessagePtr2
*)
|
Constructor & Destructor Documentation
CNifAgentBase()
IMPORT_C
|
CNifAgentBase
|
(
|
)
|
|
Member Functions Documentation
Authenticate(TDes &, TDes &)
void
|
Authenticate
|
(
|
TDes
&
|
aUsername,
|
|
TDes
&
|
aPassword
|
|
)
|
[pure virtual]
|
CancelAuthenticate()
void
|
CancelAuthenticate
|
(
|
)
|
[pure virtual]
|
CancelConnect()
void
|
CancelConnect
|
(
|
)
|
[pure virtual]
|
CancelReconnect()
void
|
CancelReconnect
|
(
|
)
|
[pure virtual]
|
CancelRequestNotificationOfServiceChange(MAgentSessionNotify *)
void
|
CancelRequestNotificationOfServiceChange
|
(
|
MAgentSessionNotify
*
|
aSession
|
)
|
[pure virtual]
|
CheckControlPolicy(TUint, TUint, const RProcess &)
Check that a client has the required capabilties
CheckReadCapability(const TDesC &, const RMessagePtr2 *)
Check that a client has the required capabilities to read a field Ensure that a client has the required capabilites to read a field
Parameters
const
TDesC
& aField
|
Field Name
|
const
RMessagePtr2
* aMessage
|
Contains client capabilites to validate
|
CheckWriteCapability(const TDesC &, const RMessagePtr2 *)
Check that a client has the required capabilities to write a field Ensure that a client has the required capabilites to write a field
Parameters
const
TDesC
& aField
|
Field Name
|
const
RMessagePtr2
* aMessage
|
Contains client capabilites to validate
|
Connect(TAgentConnectType)
Connect(TAgentConnectType, CStoreableOverrideSettings *)
Control(TUint, TUint, TDes8 &)
This version of the
Control(TUint, TUint, TDes8&)
function is now deprecated. DO NOT Override Use the version of CNifAgentBase::Control(TUint, TUint, TDes8&, RProcess) that takes four parameters
This version of the
Control()
function is now deprecated. Use the version of
CNifAgentBase::Control()
that takes four parameters
Control(TUint, TUint, TDes8 &, const RProcess &)
Disconnect(TInt)
void
|
Disconnect
|
(
|
TInt
|
aReason
|
)
|
[pure virtual]
|
DoCheckReadCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C
TInt
|
DoCheckReadCapability
|
(
|
const
TDesC
&
|
aField,
|
|
const
RMessagePtr2
*
|
aMessage
|
|
)
|
[protected, virtual]
|
Check that a client has the required capabilties to read a field Ensure that a client has the required capabilites to read a field
Parameters
const
TDesC
& aField
|
Field Name
|
const
RMessagePtr2
* aMessage
|
Contains client capabilites to validate
|
DoCheckWriteCapability(const TDesC &, const RMessagePtr2 *)
IMPORT_C
TInt
|
DoCheckWriteCapability
|
(
|
const
TDesC
&
|
aField,
|
|
const
RMessagePtr2
*
|
aMessage
|
|
)
|
[protected, virtual]
|
Check that a client has the required capabilties to write a field Ensure that a client has the required capabilites to write a field
Parameters
const
TDesC
& aField
|
Field Name
|
const
RMessagePtr2
* aMessage
|
Contains client capabilites to validate
|
DoReadBool(const TDesC &, TBool &, const RMessagePtr2 *)
Read an boolean field from the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to read
|
TBool
& aValue
|
On return, contains the value of the field read
|
const
RMessagePtr2
* aMessage
|
|
DoReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)
Read a 8-bit descriptor field from the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to read
|
TDes8
& aValue
|
On return, contains the value of the field read
|
const
RMessagePtr2
* aMessage
|
|
DoReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)
Write an 8-bit descriptor field to the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to which to write
|
TDes16
& aValue
|
The value to be written to the field
|
const
RMessagePtr2
* aMessage
|
|
DoReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)
Read an integer field from the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to read
|
TUint32
& aValue
|
On return, contains the value of the field read
|
const
RMessagePtr2
* aMessage
|
|
DoReadLongDesLC(const TDesC &, const RMessagePtr2 *)
Read a 16-bit descriptor field of unknown size from the connection settings provider
-
Since
-
v7.0s
DoWriteBool(const TDesC &, TBool, const RMessagePtr2 *)
Write an boolean field to the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to which to write
|
TBool
aValue
|
The value to be written to the field
|
const
RMessagePtr2
* aMessage
|
|
DoWriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)
Read a 16-bit descriptor field from the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to read
|
const
TDesC8
& aValue
|
On return, contains the value of the field read
|
const
RMessagePtr2
* aMessage
|
|
DoWriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)
Write an 16-bit descriptor field to the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to which to write
|
const
TDesC16
& aValue
|
The value to be written to the field
|
const
RMessagePtr2
* aMessage
|
|
DoWriteInt(const TDesC &, TUint32, const RMessagePtr2 *)
Write an integer field to the connection settings provider
Parameters
const
TDesC
& aField
|
The name of the field to which to write
|
TUint32
aValue
|
The value to be written to the field
|
const
RMessagePtr2
* aMessage
|
|
GetExcessData(TDes8 &)
TInt
|
GetExcessData
|
(
|
TDes8
&
|
aBuffer
|
)
|
[pure virtual]
|
Return any excess data was received during connection setup
Parameters
TDes8
& aBuffer
|
On return, the buffer contains the excess data from the agent
|
GetLastError(TInt &)
void
|
GetLastError
|
(
|
TInt
&
|
aError
|
)
|
[pure virtual]
|
IncomingConnectionReceived()
TInt
|
IncomingConnectionReceived
|
(
|
)
|
[pure virtual]
|
IsActive()
TBool
|
IsActive
|
(
|
)
|
const [pure virtual]
|
IsReconnect()
TBool
|
IsReconnect
|
(
|
)
|
const [pure virtual]
|
Notification(TNifToAgentEventType, TAny *)
Notification of an event from the nif
-
Since
-
v6.1
ReadBool(const TDesC &, TBool &, const RMessagePtr2 *)
Read an boolean field from the connection settings provider Read a boolean value
Parameters
const
TDesC
& aField
|
Field name
|
TBool
& aValue
|
Returned value
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
ReadBool(const TDesC &, TBool &)
Parameters
const
TDesC
& aField
|
Field name
|
TBool
& aValue
|
Returned value
|
ReadDes(const TDesC &, TDes8 &, const RMessagePtr2 *)
Read a descriptor field from the connection settings provider Read a descriptor
Parameters
const
TDesC
& aField
|
The field name
|
TDes8
& aValue
|
Returned value
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
ReadDes(const TDesC &, TDes8 &)
Parameters
const
TDesC
& aField
|
The field name
|
TDes8
& aValue
|
Returned value
|
ReadDes(const TDesC &, TDes16 &, const RMessagePtr2 *)
Read a descriptor field from the connection settings provider Read a descriptor
Parameters
const
TDesC
& aField
|
The field name
|
TDes16
& aValue
|
Returned value
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
ReadDes(const TDesC &, TDes16 &)
Parameters
const
TDesC
& aField
|
The field name
|
TDes16
& aValue
|
Returned value
|
ReadInt(const TDesC &, TUint32 &, const RMessagePtr2 *)
Read an integer field from the connection settings provider Read an integer
Parameters
const
TDesC
& aField
|
The field name
|
TUint32
& aValue
|
Returned value
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
ReadInt(const TDesC &, TUint32 &)
Parameters
const
TDesC
& aField
|
The field name
|
TUint32
& aValue
|
Returned value
|
ReadLongDesLC(const TDesC &, const RMessagePtr2 *)
Read a descriptor field of unknown size from the connection settings provider
-
Since
-
v7.0s
Read a long descriptor value
Parameters
const
TDesC
& aField
|
Field name
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
ReadLongDesLC(const TDesC &)
IMPORT_C
HBufC
*
|
ReadLongDesLC
|
(
|
const
TDesC
&
|
aField
|
)
|
|
Read a long descriptor value
Parameters
const
TDesC
& aField
|
Field name
|
Reconnect()
void
|
Reconnect
|
(
|
)
|
[pure virtual]
|
RequestNotificationOfServiceChangeL(MAgentSessionNotify *)
SetConnectionSettingsL(const TConnectionSettings &)
SetOverridesL(CStoreableOverrideSettings *)
WriteBool(const TDesC &, TBool, const RMessagePtr2 *)
Write an boolean field to the connection settings provider Write a boolean value
Parameters
const
TDesC
& aField
|
Field name
|
TBool
aValue
|
Value to write
|
const
RMessagePtr2
* aMessage
|
for capability checking
|
WriteBool(const TDesC &, TBool)
Parameters
const
TDesC
& aField
|
Field name
|
TBool
aValue
|
Value to write
|
WriteDes(const TDesC &, const TDesC8 &, const RMessagePtr2 *)
Write a descriptor field to the connection settings provider Write a descriptor
Parameters
const
TDesC
& aField
|
The field name
|
const
TDesC8
& aValue
|
value to write
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
WriteDes(const TDesC &, const TDesC8 &)
Parameters
const
TDesC
& aField
|
The field name
|
const
TDesC8
& aValue
|
value to write
|
WriteDes(const TDesC &, const TDesC16 &, const RMessagePtr2 *)
Write a descriptor field to the connection settings provider Write a descriptor
Parameters
const
TDesC
& aField
|
The field name
|
const
TDesC16
& aValue
|
value to write
|
const
RMessagePtr2
* aMessage
|
For capability checking
|
WriteDes(const TDesC &, const TDesC16 &)
Parameters
const
TDesC
& aField
|
The field name
|
const
TDesC16
& aValue
|
value to write
|
WriteInt(const TDesC &, TUint32, const RMessagePtr2 *)
Write an integer field to the connection settings provider Write an integer
WriteInt(const TDesC &, TUint32)
Parameters
const
TDesC
& aField
|
The field name
|
TUint32
aValue
|
The value
|
Member Data Documentation
MNifAgentNotify * iNotify
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.