RConnectionMonitor Class Reference

#include <mw/rconnmon.h>

Link against: CONNMON.LIB

class RConnectionMonitor : public RSessionBase

Inherits from

  • RConnectionMonitor
    Public Member Functions
    RConnectionMonitor()
    IMPORT_C voidCancelAsyncRequest(TInt)
    IMPORT_C voidCancelNotifications()
    IMPORT_C voidClose()
    IMPORT_C TIntConnectL()
    IMPORT_C voidGetBoolAttribute(const TUint, const TUint, const TUint, TBool &, TRequestStatus &)
    IMPORT_C voidGetConnectionCount(TUint &, TRequestStatus &)
    IMPORT_C TIntGetConnectionInfo(const TUint, TUint &, TUint &)
    IMPORT_C voidGetIntAttribute(const TUint, const TUint, const TUint, TInt &, TRequestStatus &)
    IMPORT_C voidGetPckgAttribute(const TUint, const TUint, const TUint, TDes8 &, TRequestStatus &)
    IMPORT_C voidGetPckgAttribute(const TUint, const TUint, const TUint, TDes16 &, TRequestStatus &)
    IMPORT_C voidGetStringAttribute(const TUint, const TUint, const TUint, TDes &, TRequestStatus &)
    IMPORT_C TIntGetSubConnectionInfo(const TUint, const TUint, TUint &)
    IMPORT_C voidGetUintAttribute(const TUint, const TUint, const TUint, TUint &, TRequestStatus &)
    IMPORT_C TIntNotifyEventL(MConnectionMonitorObserver &)
    IMPORT_C TIntSetBoolAttribute(const TUint, const TUint, const TUint, const TBool)
    IMPORT_C TIntSetIntAttribute(const TUint, const TUint, const TUint, const TInt)
    IMPORT_C TIntSetPckgAttribute(const TUint, const TUint, const TUint, const TDes8 &)
    IMPORT_C TIntSetStringAttribute(const TUint, const TUint, const TUint, const TDes &)
    IMPORT_C TIntSetUintAttribute(const TUint, const TUint, const TUint, const TUint)
    Inherited Attributes
    RHandleBase::iHandle
    Inherited Enumerations
    RHandleBase:TAttributes
    RSessionBase:TAttachMode
    Inherited Functions
    RHandleBase::Attributes()const
    RHandleBase::BTraceId()const
    RHandleBase::DoExtendedClose()
    RHandleBase::Duplicate(const RThread &,TOwnerType)
    RHandleBase::FullName()const
    RHandleBase::FullName(TDes &)const
    RHandleBase::Handle()const
    RHandleBase::HandleInfo(THandleInfo *)
    RHandleBase::Name()const
    RHandleBase::NotifyDestruction(TRequestStatus &)
    RHandleBase::Open(const TFindHandleBase &,TOwnerType)
    RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
    RHandleBase::RHandleBase()
    RHandleBase::RHandleBase(TInt)
    RHandleBase::SetHandle(TInt)
    RHandleBase::SetHandleNC(TInt)
    RSessionBase::CreateSession(RServer2,const TVersion &)
    RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
    RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
    RSessionBase::CreateSession(const TDesC &,const TVersion &)
    RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
    RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
    RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
    RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
    RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
    RSessionBase::Open(TInt,TOwnerType)
    RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
    RSessionBase::Send(TInt)const
    RSessionBase::Send(TInt,const TIpcArgs &)const
    RSessionBase::SendReceive(TInt)const
    RSessionBase::SendReceive(TInt,TRequestStatus &)const
    RSessionBase::SendReceive(TInt,const TIpcArgs &)const
    RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
    RSessionBase::SetReturnedHandle(TInt)
    RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
    RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
    RSessionBase::ShareAuto()
    RSessionBase::ShareProtected()

    Detailed Description

    RConnectionMonitor

    Constructor & Destructor Documentation

    RConnectionMonitor ( )

    RConnectionMonitor()[inline]

    Constructor.

    Member Function Documentation

    CancelAsyncRequest ( TInt )

    IMPORT_C voidCancelAsyncRequest(TIntaReqToCancel)

    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.

    ParameterDescription
    aReqToCancelIdentifies the request type to be cancelled. The different types are defined in TConnMonAsyncRequest.

    CancelNotifications ( )

    IMPORT_C voidCancelNotifications()

    Cancels the notifications from connection monitor.

    Close ( )

    IMPORT_C voidClose()

    Reimplemented from RHandleBase::Close()

    Closes the Connection Monitor session. An opened RConnectionMonitor must be closed explicitily to prevent a resource (memory) leak.

    ConnectL ( )

    IMPORT_C TIntConnectL()

    Connects the client to the Connection Monitor Server. It must be called before any of other methods during the Connection Monitor session.

    Returns: KErrNone if successful, a system-wide error code if not.

    GetBoolAttribute ( const TUint, const TUint, const TUint, TBool &, TRequestStatus & )

    IMPORT_C voidGetBoolAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TBool &aValue,
    TRequestStatus &aStatus
    )

    Gets the value for a TBool attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested TBool attribute.
    aStatusKErrNone if successful, a system-wide error code if not.

    GetConnectionCount ( TUint &, TRequestStatus & )

    IMPORT_C voidGetConnectionCount(TUint &aConnectionCount,
    TRequestStatus &aStatus
    )

    Gathers information on currently active connections.

    ParameterDescription
    aConnectionCountOn completion, contains the number of active connections.
    aStatusKErrNone if successful, a system-wide error code if not.

    GetConnectionInfo ( const TUint, TUint &, TUint & )

    IMPORT_C TIntGetConnectionInfo(const TUintaIndex,
    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.

    ParameterDescription
    aIndexMust be between 1 and the count returned by GetConnectionCount().
    aConnectionIdOn return, contains the connection ID.
    aSubConnectionCountOn return, contains the number of subconnections.

    Returns: KErrNone if successful, a system-wide error code if not.

    GetIntAttribute ( const TUint, const TUint, const TUint, TInt &, TRequestStatus & )

    IMPORT_C voidGetIntAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TInt &aValue,
    TRequestStatus &aStatus
    )

    Gets the value for a TInt attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested TInt attribute.
    aStatusKErrNone if successful, a system-wide error code if not.

    GetPckgAttribute ( const TUint, const TUint, const TUint, TDes8 &, TRequestStatus & )

    IMPORT_C voidGetPckgAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TDes8 &aValue,
    TRequestStatus &aStatus
    )const

    Gets the value for a packaged attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested packaged attribute.
    aStatusKErrNone if successful, a system-wide error code if not.

    GetPckgAttribute ( const TUint, const TUint, const TUint, TDes16 &, TRequestStatus & )

    IMPORT_C voidGetPckgAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TDes16 &aValue,
    TRequestStatus &aStatus
    )const

    Gets the value for a packaged attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested packaged attribute.
    aStatusKErrNone if successful, a system-wide error code if not.

    GetStringAttribute ( const TUint, const TUint, const TUint, TDes &, TRequestStatus & )

    IMPORT_C voidGetStringAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TDes &aValue,
    TRequestStatus &aStatus
    )const

    Gets the value for a string attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested string. Use a 16-bit descriptor!
    aStatusKErrNone if successful, a system-wide error code if not.

    GetSubConnectionInfo ( const TUint, const TUint, TUint & )

    IMPORT_C TIntGetSubConnectionInfo(const TUintaConnectionId,
    const TUintaIndex,
    TUint &aSubConnectionId
    )const

    Gets the subconnection ID for the given index.

    ParameterDescription
    aConnectionIdConnection ID.
    aIndexMust be between 1 and the subconnection count returned by GetConnectionInfo().
    aSubConnectionIdOn return, contains the subconnection ID.

    Returns: KErrNone if successful, a system-wide error code if not.

    GetUintAttribute ( const TUint, const TUint, const TUint, TUint &, TRequestStatus & )

    IMPORT_C voidGetUintAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    TUint &aValue,
    TRequestStatus &aStatus
    )

    Gets the value for a TUint attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be retrieved.
    aValueOn completion, contains the requested TUint attribute.
    aStatusKErrNone if successful, a system-wide error code if not.

    NotifyEventL ( MConnectionMonitorObserver & )

    IMPORT_C TIntNotifyEventL(MConnectionMonitorObserver &aObserver)

    Registers an event observer to catch connection monitor events.

    ParameterDescription
    aObserverThe event observer.

    Returns: KErrNone if successful, a system-wide error code if not.

    SetBoolAttribute ( const TUint, const TUint, const TUint, const TBool )

    IMPORT_C TIntSetBoolAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    const TBoolaValue
    )const

    Sets the value for a TBool attribute.

    This method can be used to stop a connection (KConnectionStop).

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be set.
    aValueThe value to be set.

    Returns: KErrNone if successful, a system-wide error code if not.

    SetIntAttribute ( const TUint, const TUint, const TUint, const TInt )

    IMPORT_C TIntSetIntAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    const TIntaValue
    )const

    Sets the value for a TInt attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be set.
    aValueThe value to be set.

    Returns: KErrNone if successful, a system-wide error code if not.

    SetPckgAttribute ( const TUint, const TUint, const TUint, const TDes8 & )

    IMPORT_C TIntSetPckgAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    const TDes8 &aValue
    )const

    Sets the value for a packaged attribute. There is currently no packaged attributes that can be set.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be set.
    aValueThe value to be set.

    Returns: KErrNone if successful, a system-wide error code if not.

    SetStringAttribute ( const TUint, const TUint, const TUint, const TDes & )

    IMPORT_C TIntSetStringAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    const TDes &aValue
    )const

    Sets the value for a string attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be set.
    aValueThe string value to be set. Must be a 16-bit descriptor.

    Returns: KErrNone if successful, a system-wide error code if not.

    SetUintAttribute ( const TUint, const TUint, const TUint, const TUint )

    IMPORT_C TIntSetUintAttribute(const TUintaConnectionId,
    const TUintaSubConnectionId,
    const TUintaAttribute,
    const TUintaValue
    )const

    Sets the value for a TUint attribute.

    ParameterDescription
    aConnectionIdConnection ID.
    aSubConnectionIdSubconnection ID. If set to 0, method applies to connection.
    aAttributeIdentifies the attribute to be set.
    aValueThe value to be set.

    Returns: KErrNone if successful, a system-wide error code if not.