# examples/S60CppExamples/ClientServerAsync/client/inc/timeserversession.h

    00001 /*
    00002 * ==============================================================================
    00003 *  Name        : timeserversession.h
    00004 *  Part of     : CSAsync
    00005 *  Interface   :
    00006 *  Description :
    00007 *  Version     :
    00008 *
    00009 *  Copyright (c) 2004-2006 Nokia Corporation.
    00010 *  This material, including documentation and any related
    00011 *  computer programs, is protected by copyright controlled by
    00012 *  Nokia Corporation.
    00013 * ==============================================================================
    00014 */
    00015
    00016
    00017 #ifndef __TIMESERVERSESSION_H__
    00018 #define __TIMESERVERSESSION_H__
    00019
    00020 // INCLUDE FILES
    00021 #include <e32base.h>
    00022
    00023 // CONSTANTS
    00024 // Number of message slots to reserve for this client server session.
    00025 // In this example we can have one asynchronous request outstanding
    00026 // and one synchronous request in progress.
    00027 const TUint KDefaultMessageSlots = 2;
    00028
    00029 const TUid KServerUid3 = { 0xA0000227 }; // Server UID
    00030
    00031 _LIT( KTimeServerFilename, "CSAsyncServer" );
    00032
    00033 #ifdef __WINS__
    00034 static const TUint KServerMinHeapSize =  0x1000;  //  4K
    00035 static const TUint KServerMaxHeapSize = 0x10000;  // 64K
    00036 #endif
    00037
    00038 // CLASS DECLARATION
    00043 class RTimeServerSession : public RSessionBase
    00044     {
    00045     public: // Constructors and destructors
    00046
    00051         RTimeServerSession();
    00052
    00053     public: // New functions
    00054
    00060         TInt Connect();
    00061
    00067         TVersion Version() const;
    00068
    00075         void RequestTime( TTime& aTime,TRequestStatus& aStatus );
    00076
    00081         void CancelRequestTime() const;
    00082
    00083     private: // Data
    00084
    00088         TPtr8 iTimeBuffer;
    00089     };
    00090
    00091
    00092 #endif // __TIMESERVERSESSION_H__
    00093
    00094
    00095 // End of File