examples/Base/IPC/ClientServer/Simple/SimpleClient.h

00001 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
00002 // All rights reserved.
00003 // This component and the accompanying materials are made available
00004 // under the terms of "Eclipse Public License v1.0"
00005 // which accompanies this distribution, and is available
00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
00007 //
00008 // Initial Contributors:
00009 // Nokia Corporation - initial contribution.
00010 //
00011 // Contributors:
00012 //
00013 // Description:
00014 //
00015 
00016 #if !defined(__COUNTSERV_H__)
00017 #define __COUNTSERV_H__
00018 
00019 #if !defined(__E32BASE_H__)
00020 #include <e32base.h>
00021 #endif
00022 
00023 
00024 //**********************************
00025 //RCountServSession
00026 //**********************************
00027 
00028 // Our client-side handle to a session with the server.
00029 // The class forms a layer over the Symbian provided RSessionBase class.
00030 //
00031 // The class deals with the requests made by the main example code by forwarding
00032 // them to the server. The type of request is identified by a code, one of
00033 // the TCountServRqst enum values, and arguments are passed via a TIpcArgs object.
00034 //
00035 // The functions Increase(), Decrease() etc are wrappers for different calls to 
00036 // SendReceive().
00037 //
00038 // Most of the functions here return void; if they fail, the server panics the client.
00039 // If they return it can be assumed that there is no error.
00040 //
00041 // The RThread object is a handle to the thread that is acting as the server.
00042 
00043 
00044 class RCountServSession : public RSessionBase
00045         {
00046 public:
00047         RCountServSession();
00048         TInt Connect();
00049         TVersion Version() const;
00050         TInt UnsupportedRequest();
00051         TInt SetFromString(const TDesC& aString);
00052         void Increase();
00053         void Decrease();
00054         void IncreaseBy(TInt anInt);
00055         void DecreaseBy(TInt anInt);
00056         void Reset();
00057         TInt CounterValue();
00058         void BadRequest();
00059         void Close();
00060 private:
00061     RThread iServerThread;
00062         };
00063 
00064 
00065 #endif
00066 

Generated by  doxygen 1.6.2