Symbian
 Developer Library

SYMBIAN OS V9.1

FEEDBACK 

[Index] [Spacer] [Previous] [Next]



Location: e32std.h
Link against: euser.lib

Class RSubSessionBase

class RSubSessionBase;

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:

1. provide a function to create a new sub-session with the server; this should call CreateSubSession().

2. provide a function to close the current sub-session; this should call CloseSubSession().

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

Members

Defined in RSubSessionBase:
CloseSubSession(), CreateAutoCloseSubSession(), CreateSubSession(), CreateSubSession(), RSubSessionBase(), Send(), Send(), SendReceive(), SendReceive(), SendReceive(), SendReceive(), Session(), SubSessionHandle()


Construction and destruction


RSubSessionBase()

protected: inline RSubSessionBase();

Description

Default constructor

[Top]


Member functions


SubSessionHandle()

inline TInt SubSessionHandle() const;

Description

Gets 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.


Session()

protected: IMPORT_C const RSessionBase Session() const;

Description

Returns a copy of the session associated with this sub-session.

Return value

const RSessionBase

a copy of the session


CreateSubSession()

protected: inline TInt CreateSubSession(const RSessionBase &aSession, TInt aFunction, const TIpcArgs &aArgs);

Description

Parameters

const RSessionBase &aSession

TInt aFunction

const TIpcArgs &aArgs

Return value

TInt


CreateSubSession()

protected: inline TInt CreateSubSession(const RSessionBase &aSession, TInt aFunction);

Description

Parameters

const RSessionBase &aSession

TInt aFunction

Return value

TInt


CreateAutoCloseSubSession()

protected: IMPORT_C TInt CreateAutoCloseSubSession(RSessionBase &aSession, TInt aFunction, const TIpcArgs &aArgs);

Description

Creates a new sub-session within an existing session. The new sub-session takes ownership of the session so that when the sub-session is closed, the session is closed too. If the creation of the sub-session fails, the session is closed immediately. In other words, this method will always take ownership of the session, whether it succeeds or not and the caller should never need to close it.

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 TIpcArgs &aArgs

The arguments to be sent to the server as part of the sub-session create request. The fourth argument is not sent to the server, instead it is replaced with a descriptor reference to the 32bit value where the server should store the handle of the created sub-session.

Return value

TInt

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


CloseSubSession()

protected: IMPORT_C 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.


Send()

protected: inline TInt Send(TInt aFunction, const TIpcArgs &aArgs) const;

Description

Parameters

TInt aFunction

const TIpcArgs &aArgs

Return value

TInt


SendReceive()

protected: inline void SendReceive(TInt aFunction, const TIpcArgs &aArgs, TRequestStatus &aStatus) const;

Description

Parameters

TInt aFunction

const TIpcArgs &aArgs

TRequestStatus &aStatus


SendReceive()

protected: inline TInt SendReceive(TInt aFunction, const TIpcArgs &aArgs) const;

Description

Parameters

TInt aFunction

const TIpcArgs &aArgs

Return value

TInt


Send()

protected: inline TInt Send(TInt aFunction) const;

Description

Parameters

TInt aFunction

Return value

TInt


SendReceive()

protected: inline void SendReceive(TInt aFunction, TRequestStatus &aStatus) const;

Description

Parameters

TInt aFunction

TRequestStatus &aStatus


SendReceive()

protected: inline TInt SendReceive(TInt aFunction) const;

Description

Parameters

TInt aFunction

Return value

TInt