ConnectionServ::RConnectionServ Class Reference

class ConnectionServ::RConnectionServ : public RCommsSession

Provides access to the comms management plane.

Inherits from

Public Member Functions
RConnectionServ ()
IMPORT_C void AccessPointNotification (const CConnectionServParameterBundle &, MAccessPointNotificationObserver &)
IMPORT_C void AccessPointStatusQuery (const CConnectionServParameterBundle &, CConnectionServParameterBundle &, TRequestStatus &)
IMPORT_C void CancelAccessPointNotification ()
IMPORT_C void CancelAccessPointStatusQuery ()
IMPORT_C void Close ()
IMPORT_C TInt Connect ( TUint )
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()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
CConnectionServImpl * iConnectionServImpl
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RConnectionServ()

IMPORT_C RConnectionServ ( )

Empty ctor

Member Functions Documentation

AccessPointNotification(const CConnectionServParameterBundle &, MAccessPointNotificationObserver &)

IMPORT_C void AccessPointNotification ( const CConnectionServParameterBundle & aQuery,
MAccessPointNotificationObserver & aObserver
)

As for AccessPointStatusQuery, but will notify of changes to availability of requested Access Point(s).

aQuery is an in parameter. It must be created and deleted (after the request has completed!) by the caller of this method. The Parameter Bundle contains 1 Parameter Set Container (at present). The Parameter Set Container contains 1 or more query Parameter Sets to specify the Access Point or group of Access Points it wishes to retrieve information about.

The aQuery defines a set of access points. As soon as this "view" is established on the server, an empty bundle gets reported to the observer (see second argument, aObserver) to denote that all the notifications are all registered on the server side. After that, Access Points entering or leaving the set get reported to the observer. This is at least the case for the generic tier parameters. Tiers with advanced parameters (e.g. signal strength) may define their own criteria as to when to notify (e.g. signal strength crossing some threshold by some amount) Queueing of multiple events happens automatically on the server side.

aObserver refers to a client-defined implementation of the MAccessPointNotificationObserver interface - this defines an AccessPointNotification(CConnectionServParameterBundle* aResult) method (which is called on each result back from the connection server), and an AccessPointNotificationError() method which is called in case of an error.

Notifications are performed by a worker active object. Therefore you must have an active scheduler to use this API, and a return of control to the active scheduler is required before any notification or error will be received via your observer.

AccessPointStatusQuery(const CConnectionServParameterBundle &, CConnectionServParameterBundle &, TRequestStatus &)

IMPORT_C void AccessPointStatusQuery ( const CConnectionServParameterBundle & aQuery,
CConnectionServParameterBundle & aResult,
TRequestStatus & aStatus
)

Retrieve information from the Tier(s) specified in the Connect function about the availability of one or more services.

aQuery is an in parameter. It must be created and deleted (after the request has completed!) by the caller of this method. The Parameter Bundle contains 1 Parameter Set Container (at present). The Parameter Set Container contains 1 or more query Parameter Sets to specify the Access Point or group of Access Points it wishes to retrieve information about.

aResult is an out parameter. It must be created and deleted (after the request has completed!) by the caller of this method. The Connection Server populates this bundle with information about the access points that matched the query.

The time taken to perform this action depends on the implementation in the Tier Manager stack plug-in that serves the tier this session is attached to. Hence it's an asynchronous request.

It delegates to active objects to do its work, and hence the passed-in TRequestStatus is completed by the thread that calls this function. Therefore it is not possible to make this call act "synchronously" by just using WaitForRequest on the following line to the call to this function. Instead you'd have to kick off a worker thread to perform this call, then use your main thread to do the waiting for the completion. This should only be a problem for test code, as all "real-world" apps are event based anyway so would supply an active object for this request, therefore would return control to the active scheduler which can then do what it needs to complete the request.

CancelAccessPointNotification()

IMPORT_C void CancelAccessPointNotification ( )

Tell the Connection Server we are cancelling our notification session. If no notification session is active, does nothing.

This function is synchronous, in that it ensures the cancel has gone all the way through to the server before it returns.

CancelAccessPointStatusQuery()

IMPORT_C void CancelAccessPointStatusQuery ( )

Tell the Connection Server we are cancelling our status query request. If no query is active, does nothing.

This function is synchronous, in that it ensures the cancel has gone all the way through to the server before it returns.

Close()

IMPORT_C void Close ( )

Ends the session and ends the association with the Tier that was specified in Connect.

Closes the comms manager sub-session

Delete owned object and drop to base class

Connect(TUint)

IMPORT_C TInt Connect ( TUint aTierId )

Opens a new RConnServer session.

Opens a session to the connection server.

RHandleBase::Close() should be called once the session is no longer required. All resources which are opened using the session will be automatically closed when the session terminates.

Parameters

TUint aTierId Id of the Tier to connect to. To use the instance the client connects to a Tier, depending on the technology they need to address. All actions are then performed in the context of that Tier until Close is called. The Tier Id may be Null which indicates all tiers. At the moment no functionality supports the Null value.

Member Data Documentation

CConnectionServImpl * iConnectionServImpl

CConnectionServImpl * iConnectionServImpl [private]