| class RConnectionMonitor : public RSessionBase |
CONNMON.LIB
| Public Member Functions | |
|---|---|
| RConnectionMonitor () | |
| IMPORT_C void | CancelAsyncRequest ( TInt ) |
| IMPORT_C void | CancelNotifications () |
| IMPORT_C void | Close () |
| IMPORT_C TInt | ConnectL () |
| IMPORT_C void | GetBoolAttribute (const TUint , const TUint , const TUint , TBool &, TRequestStatus &) |
| IMPORT_C void | GetConnectionCount ( TUint &, TRequestStatus &) |
| IMPORT_C TInt | GetConnectionInfo (const TUint , TUint &, TUint &) |
| IMPORT_C void | GetIntAttribute (const TUint , const TUint , const TUint , TInt &, TRequestStatus &) |
| IMPORT_C void | GetPckgAttribute (const TUint , const TUint , const TUint , TDes8 &, TRequestStatus &) |
| IMPORT_C void | GetPckgAttribute (const TUint , const TUint , const TUint , TDes16 &, TRequestStatus &) |
| IMPORT_C void | GetStringAttribute (const TUint , const TUint , const TUint , TDes &, TRequestStatus &) |
| IMPORT_C TInt | GetSubConnectionInfo (const TUint , const TUint , TUint &) |
| IMPORT_C void | GetUintAttribute (const TUint , const TUint , const TUint , TUint &, TRequestStatus &) |
| IMPORT_C TInt | NotifyEventL ( MConnectionMonitorObserver &) |
| IMPORT_C TInt | SetBoolAttribute (const TUint , const TUint , const TUint , const TBool ) |
| IMPORT_C TInt | SetIntAttribute (const TUint , const TUint , const TUint , const TInt ) |
| IMPORT_C TInt | SetPckgAttribute (const TUint , const TUint , const TUint , const TDes8 &) |
| IMPORT_C TInt | SetStringAttribute (const TUint , const TUint , const TUint , const TDes &) |
| IMPORT_C TInt | SetUintAttribute (const TUint , const TUint , const TUint , const TUint ) |
| Private Member Functions | |
|---|---|
| void | CancelReceiveEvent () |
| TBool | IsConnected () |
| TPtr8 & | NextPtr () |
| void | ReceiveEvent ( TDes8 &, TDes8 &, TRequestStatus &) |
| Inherited Enumerations | |
|---|---|
| RHandleBase:TAttributes | |
| RSessionBase:TAttachMode | |
| Private Attributes | |
|---|---|
| CConnMonEventHandler * | iHandler |
| TInt | iIndex |
| RArray < TPtr8 > | iPtrArray |
| Inherited Attributes | |
|---|---|
| RHandleBase::iHandle | |
| IMPORT_C void | CancelAsyncRequest | ( | TInt | aReqToCancel | ) |
Cancels an asyncronous request. If there is several active requests of the same type (for example GetIntAttribute), they will all be cancelled. When a request is cancelled, it is completed with error code KErrCancel.
| TInt aReqToCancel | Identifies the request type to be cancelled. The different types are defined in TConnMonAsyncRequest. |
| IMPORT_C void | CancelNotifications | ( | ) |
Cancels the notifications from connection monitor.
| IMPORT_C void | Close | ( | ) |
Closes the Connection Monitor session. An opened RConnectionMonitor must be closed explicitily to prevent a resource (memory) leak.
| IMPORT_C TInt | ConnectL | ( | ) |
Connects the client to the Connection Monitor Server. It must be called before any of other methods during the Connection Monitor session.
| IMPORT_C void | GetBoolAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TBool & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | ||||
Gets the value for a TBool attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TBool & aValue | On completion, contains the requested TBool attribute. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C void | GetConnectionCount | ( | TUint & | aConnectionCount, |
| TRequestStatus & | aStatus | |||
| ) | ||||
Gathers information on currently active connections.
| TUint & aConnectionCount | On completion, contains the number of active connections. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C TInt | GetConnectionInfo | ( | const TUint | aIndex, |
| TUint & | aConnectionId, | |||
| TUint & | aSubConnectionCount | |||
| ) | const | |||
Gets the connection ID and the count of the subconnections for the given index. GetConnectionCount() must be called to gather the information on active connections before calling this method.
| IMPORT_C void | GetIntAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TInt & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | ||||
Gets the value for a TInt attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TInt & aValue | On completion, contains the requested TInt attribute. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C void | GetPckgAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TDes8 & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | const | |||
Gets the value for a packaged attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TDes8 & aValue | On completion, contains the requested packaged attribute. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C void | GetPckgAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TDes16 & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | const | |||
Gets the value for a packaged attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TDes16 & aValue | On completion, contains the requested packaged attribute. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C void | GetStringAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TDes & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | const | |||
Gets the value for a string attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TDes & aValue | On completion, contains the requested string. Use a 16-bit descriptor! |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C TInt | GetSubConnectionInfo | ( | const TUint | aConnectionId, |
| const TUint | aIndex, | |||
| TUint & | aSubConnectionId | |||
| ) | const | |||
Gets the subconnection ID for the given index.
| IMPORT_C void | GetUintAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| TUint & | aValue, | |||
| TRequestStatus & | aStatus | |||
| ) | ||||
Gets the value for a TUint attribute.
| const TUint aConnectionId | Connection ID. |
| const TUint aSubConnectionId | Subconnection ID. If set to 0, method applies to connection. |
| const TUint aAttribute | Identifies the attribute to be retrieved. |
| TUint & aValue | On completion, contains the requested TUint attribute. |
| TRequestStatus & aStatus | KErrNone if successful, a system-wide error code if not. |
| IMPORT_C TInt | NotifyEventL | ( | MConnectionMonitorObserver & | aObserver | ) |
Registers an event observer to catch connection monitor events.
| MConnectionMonitorObserver & aObserver | The event observer. |
| void | ReceiveEvent | ( | TDes8 & | aBuffer, |
| TDes8 & | aExtraBuf, | |||
| TRequestStatus & | aStatus | |||
| ) | [private] | |||
| TDes8 & aBuffer | |
| TDes8 & aExtraBuf | |
| TRequestStatus & aStatus |
| IMPORT_C TInt | SetBoolAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| const TBool | aValue | |||
| ) | const | |||
Sets the value for a TBool attribute.
This method can be used to stop a connection (KConnectionStop).
| IMPORT_C TInt | SetIntAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| const TInt | aValue | |||
| ) | const | |||
Sets the value for a TInt attribute.
| IMPORT_C TInt | SetPckgAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| const TDes8 & | aValue | |||
| ) | const | |||
Sets the value for a packaged attribute. There is currently no packaged attributes that can be set.
| IMPORT_C TInt | SetStringAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| const TDes & | aValue | |||
| ) | const | |||
Sets the value for a string attribute.
| IMPORT_C TInt | SetUintAttribute | ( | const TUint | aConnectionId, |
| const TUint | aSubConnectionId, | |||
| const TUint | aAttribute, | |||
| const TUint | aValue | |||
| ) | const | |||
Sets the value for a TUint attribute.
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.