Inherits RSessionBase.
Public Member Functions | |
RSecureSession () | |
TInt | Connect () |
TVersion | Version () const |
TInt | ResourceCountL () |
void | Close () |
The client-side handle to a session with the server. The class forms a layer over the Symbian provided RSessionBase class. The main example code calls member functions in the subsession class to make requests to the server. The subsession forwards the requests to the server through the session. A request is identified by a number. This is one of the TSecureServerRequest enum values defined in secureclientandserver.h, The session passes the number and any arguments to the server in a TIpcArgs object.
Definition at line 34 of file secureclient.h.
RSecureSession::RSecureSession | ( | ) |
Constructor.
Definition at line 29 of file secureclientsession.cpp.
TInt RSecureSession::Connect | ( | ) |
Connects to the server using 4 message slots. This creates a new session with the server. In this example, the server is implemented as a separate thread. If the server is not running, the function starts the server before it tries to create a session with it. The version information defines the lowest version of the server with which this client is compatible. Version compatibility is checked when the server side session is created. In this example, the version of the server and the version requested by the client are the same. This is because they are defined by constants common to the client source code and the server source code. In a real application, versions would be defined independently.
Definition at line 44 of file secureclientsession.cpp.
TVersion RSecureSession::Version | ( | void | ) | const |
Gets the lowest version of the server with which this client is compatible. This is a client-side definition. If the server version is lower than this value, connection fails. In a real application, this is how a client can make sure that the server can provide the services that the client expects. The design of the client-server framework assumes that newer versions of a server are backward compatible with older versions of the server.
Definition at line 59 of file secureclientsession.cpp.
TInt RSecureSession::ResourceCountL | ( | ) |
Gets the resource count from the server. The resource count is the number of subsessions attached to the session.
Definition at line 79 of file secureclientsession.cpp.
void RSecureSession::Close | ( | ) |
Deletes all handles associated with session.
Definition at line 67 of file secureclientsession.cpp.