Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to implement a client interface with subsessions

A client side subsession is represented by an instance of a class derived from RSubSessionBase which provides the behaviour for:

In the following code fragment, taken from the example that can be found at ...\examples\Base\IPC\ClientServer\complex, the class RCountSubSession, derived from RSubSessionBase, represents the client side subsession with a server (in the example the server is also referred to as the count server). The assumption is made that the client has already established a session with the server as represented by the RCountSession class.

class RCountSubSession : public RSubSessionBase
    {
public:
    TInt Open(RCountSession& aServer);
    TInt SetFromString(const TDesC& aString);
    void Close();
    void Increase();
    void Decrease();
    void IncreaseBy(TInt anInt);
    void DecreaseBy(TInt anInt);
    void Reset();
    TInt CounterValue();
    };
class RCountSession : public RSessionBase
    {
public:
    RCountSession();
    TInt Connect();
    TVersion Version() const;
    TInt ResourceCount();
    void Close();
private:
    RThread iServerThread; 
    };

The important points in this example are:

[Top]


Notes