class MMsgConnManager |
Public Member Functions | |
---|---|
void | AddEventSubscriberL(MMsgBearerObsCallback *) |
void | CancelStartL() |
RConnection & | Connection() |
void | Destroy() |
TInt | NumberOfActiveConns() |
HBufC * | ReadFromCommsDbLC(const TSupportedCommDbRecords) |
void | RemoveEventSubscriber(MMsgBearerObsCallback *) |
void | SetAccessPointIDL(const TInt) |
RSocketServ & | SocketSession() |
void | StartConnection(TRequestStatus &) |
TBool | Status() |
void | StopConnection() |
void | StopConnection(TRequestStatus &) |
void | AddEventSubscriberL | ( | MMsgBearerObsCallback * | aClient | ) | [pure virtual] |
Add an object to the queue of listeners. The object to be added must inplement the interface MMsgBearerObsCallback in order to receive events from the system agent. It is important to note that the call to the notification handler (HandleBearerEventL()) takes place inside the RunL() method of this Connection Manager, so the listening object MUST return the control to the Manager AS SOON AS POSSIBLE in order not to clog the scheduler.
MMsgBearerObsCallback * aClient |
void | CancelStartL | ( | ) | [pure virtual] |
KErrAbort if the TRequestStatus object the client supplied is not active, hence, there is no pending request that would require cancelling. In normal cases - when RConnection::Start() or its progress notifications are pending - ConnMan completes the client's request with the "error" KErrCancel.
RConnection & | Connection | ( | ) | [pure virtual] |
Returns a reference to the currently open connection
void | Destroy | ( | ) | [pure virtual] |
Destructor. Must be called when the services of the manager are no longer needed. This is merely a wrapper to the C++ destructor.
It is highly advisable that a client of this API ALWAYS Destroy()s the instance it owns only after it has disposed of all other connection-related components at its command. This is because the other components may still be dependent on the RConnection and RSocketServ instances provided by this object.
TInt | NumberOfActiveConns | ( | ) | [pure virtual] |
Returns the number of active connections currently open
HBufC * | ReadFromCommsDbLC | ( | const TSupportedCommDbRecords | aParameter | ) | [pure virtual] |
Read data from the Comms Database
const TSupportedCommDbRecords aParameter |
void | RemoveEventSubscriber | ( | MMsgBearerObsCallback * | aClient | ) | [pure virtual] |
Remove an object from the queue of listeners. It is not necessary to call this method at deletion time, as the destructor destroys the subscriber queue altogether. If, however, a listener object is destroyed (or is likely to be) before an instance of Connection Manager, it is mandatory to remove the listener from the queue prior to deleting the listener.
MMsgBearerObsCallback * aClient |
void | SetAccessPointIDL | ( | const TInt | aAccessPointID | ) | [pure virtual] |
Set the ID of the Access Point to connect to. Note that this function is effective only when there is no active connection the start of which has been initiated by the client. In other words, the ID of the desired Access Point can be changed only BEFORE calling StartConnection().
KErrNotFound if the Access Point ID does not exist
const TInt aAccessPointID |
RSocketServ & | SocketSession | ( | ) | [pure virtual] |
Returns a reference to the active socket server.
void | StartConnection | ( | TRequestStatus & | aStatus | ) | [pure virtual] |
Start a connection. This asynchronous request completes as soon as a connection has been successfully opened or an error condition has been detected.
Completes with:
KErrNone if a connection has been succesfully opened
KErrNotReady if client has called StopConnection() and attempts to start a new connection before the previous one has been disconnected.
KErrAlreadyExists if a client attempts to open a connection while one is already being opened
KErrTimedOut if the specified timeout value expires
TRequestStatus & aStatus | Request status of the client. |
TBool | Status | ( | ) | const [pure virtual] |
Returns the state of this connection manager:
ETrue, if a connection is available
EFalse otherwise; bearer suspended, StartConnection() failed etc.
A component that wishes to send/receive data is encouraged to call this function before opening a socket, or reading from or writing to one. This way it can be assured that no component prompts up that annoying IAP dialog.
void | StopConnection | ( | TRequestStatus & | aStatus | ) | [pure virtual] |
Stop a connection. This asynchronous request completes as soon as a connection has been closed. Note that it takes a few seconds for the connection to really wear out. Thus, when a client calls this function, it should really mean what it is saying, because a new connection CANNOT BE OPENED before a previous one has been deactivated.
KErrNone if connection closing is successful
KErrAbort if call takes place while connection initiation is ongoing or if there is no active connection that would require closing. If a connection initiation is ongoing client should use CancelStartL() method instead.
TRequestStatus & aStatus | Request status of the client |
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.