S60 5th Edition SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : timeserversession.h 00004 * Part of : CSSync 00005 * Interface : 00006 * Description : 00007 * Version : 00008 * 00009 * Copyright (c) 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 // Since we only communicate synchronously here, we never have any 00026 // outstanding asynchronous requests. 00027 static const TUint KDefaultMessageSlots = 0; 00028 00029 // Server UID 00030 const TUid KServerUid3 = { 0xA00001FC }; 00031 00032 _LIT( KTimeServerFilename, "CSSyncServer.EXE" ); 00033 00034 #ifdef __WINS__ 00035 static const TUint KServerMinHeapSize = 0x1000; // 4K 00036 static const TUint KServerMaxHeapSize = 0x10000; // 64K 00037 #endif 00038 00039 // CLASS DECLARATION 00040 /** 00041 * RTimeServerSession 00042 * This class provides the client-side interface to the server session 00043 */ 00044 class RTimeServerSession : public RSessionBase 00045 { 00046 public: // Constructors and destructors 00047 00048 /** 00049 * RTimeServerSession. 00050 * Constructs the object. 00051 */ 00052 RTimeServerSession(); 00053 00054 public: // New functions 00055 00056 /** 00057 * Connect. 00058 * Connects to the server and create a session. 00059 * @return Error code. 00060 */ 00061 TInt Connect(); 00062 00063 /** 00064 * Version. 00065 * Gets the version number. 00066 * @return The version. 00067 */ 00068 TVersion Version() const; 00069 00070 /** 00071 * RequestTime. 00072 * Issues a request for the time to the server. 00073 * @param aTime The location for the server to write data into. 00074 */ 00075 void RequestTime( TTime& aTime ) const; 00076 00077 }; 00078 00079 #endif // __TIMESERVERSESSION_H__ 00080 00081 00082 // End of File
© Nokia 2009 |