Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RSubSessionBase

RSubSessionBase

Support

Supported from 5.0

Description

Client-side handle to a sub-session. It represents a client-side sub-session and has a corresponding sub-session object on the server-side.

Clients normally define and implement a derived class to provide a richer interface. In particular, a derived class should:

A session must already exist with a server before a client can establish any sub-sessions.

Defined in RSubSessionBase:
CloseSubSession(), CreateSubSession(), RSubSessionBase(), Send(), SendReceive(), SubSessionHandle(), operator=()

See also:


Construction


RSubSessionBase()

protected: RSubSessionBase();

Description

Constructs a default sub-session object.


RSubSessionBase()

protected: RSubSessionBase(const RSubSessionBase& aSubSession);

Description

Copy constructor.

Parameters

const RSubSessionBase& aSubSession

The sub-session object to be copied


operator=()

protected: RSubSessionBase& operator=(const RSubSessionBase& aSubSession);

Description

Assignment constructor.

Parameters

const RSubSessionBase& aSubSession

The sub-session to be assigned

Return value

RSubSessionBase&

A reference to this sub-session

[Top]


Creation and termination of a sub-session


CreateSubSession()

protected: TInt CreateSubSession(RSessionBase& aSession,TInt aFunction,const TAny* aPtr);

Description

Creates a new sub-session within an existing session.

Parameters

RSessionBase& aSession

The session to which this sub-session will belong.

TInt aFunction

The opcode specifying the requested service; the server should interpret this as a request to create a sub-session.

const TAny* aPtr

A pointer to the message argument array - an array of four 32 bit pointers. Only the first three elements of the array are passed to the server.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.


CloseSubSession()

protected: void CloseSubSession(TInt aFunction);

Description

Closes the sub-session.

Parameters

TInt aFunction

The opcode specifying the requested service; the server should interpret this as a request to close the sub-session.

[Top]


Communicating with the server


Send()

protected: TInt Send(TInt aFunction,const TAny* aPtr) const;

Description

Sends a blind message to the server — no reply is expected. A message argument array is passed; this may be used to specify client addresses which the server can use to read from and write to the client address space.

Parameters

TInt aFunction

The opcode specifying the requested service.

const TAny* aPtr

A pointer to the message argument array - an array of four 32 bit parameters.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.


SendReceive()

protected: void SendReceive(TInt aFunction,const TAny* aPtr,TRequestStatus& aStatus) const;

Description

Sends a message to the server and waits asynchronously for the reply. An opcode specifies the service required. A message argument array is passed; this may be used to specify client addresses which the server can use to read from and write to the client address space.

Parameters

TInt aFunction

The opcode specifying the requested service.

const TAny* aPtr

A pointer to the message argument array - an array of four 32 bit parameters.

TRequestStatus& aStatus

A request status which indicates the completion status of the asynchronous request.


SendReceive()

protected: TInt SendReceive(TInt aFunction,const TAny* aPtr) const;

Description

Sends a message to the server and waits synchronously for a reply. An opcode specifies the service required. A message argument array is passed; this may be used to specify client addresses which the server can use to read from and write to the client address space.

Parameters

TInt aFunction

The opcode specifying the requested service.

const TAny* aPtr

A pointer to the message argument array - an array of four 32 bit parameters.

Return value

TInt

KErrNone if successful, otherwise one of the system-wide error codes.

[Top]


Subsession handle number


SubSessionHandle()

TInt SubSessionHandle();

Description

Returns the sub-session handle number.

This number is automatically passed to the server when making requests and is used to identify the appropriate server-side sub-session.

Return value

TInt

The sub-session handle number.