S60 5th Edition SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : cssyncdocument.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 __CSSYNCDOCUMENT_H__ 00018 #define __CSSYNCDOCUMENT_H__ 00019 00020 // INCLUDE FILES 00021 #include <akndoc.h> 00022 #include "TimeServerSession.h" 00023 00024 // FORWARD DECLARATIONS 00025 class CCSSyncAppUi; 00026 class CEikApplication; 00027 00028 // CLASS DECLARATION 00029 /** 00030 * CCSSyncDocument 00031 * An instance of class CCSSyncDocument is the Document part of the AVKON 00032 * application framework for the CSSync example application 00033 */ 00034 class CCSSyncDocument : public CAknDocument 00035 { 00036 public: // Constructors and destructors 00037 00038 /** 00039 * NewL. 00040 * Two-phased constructor. 00041 * Constructs a CCSSyncDocument for the AVKON application aApp 00042 * using two phase construction, and returns a pointer to the 00043 * created object. 00044 * @param aApp Application creating this document. 00045 * @return A pointer to the created instance of CCSSyncDocument. 00046 */ 00047 static CCSSyncDocument* NewL( CEikApplication& aApp ); 00048 00049 /** 00050 * NewLC. 00051 * Two-phased constructor. 00052 * Constructs a CCSSyncDocument for the AVKON application aApp 00053 * using two phase construction, and returns a pointer to the 00054 * created object. 00055 * @param aApp Application creating this document. 00056 * @return A pointer to the created instance of CCSSyncDocument. 00057 */ 00058 static CCSSyncDocument* NewLC( CEikApplication& aApp ); 00059 00060 /** 00061 * ~CCSSyncDocument. 00062 * Destructor. 00063 * Destroys the object and release all memory objects. 00064 */ 00065 virtual ~CCSSyncDocument(); 00066 00067 public: // New functions 00068 00069 /** 00070 * UpdateTime. 00071 * Asks the time server to update this documents locally stored time. 00072 */ 00073 void UpdateTime(); 00074 00075 /** 00076 * Time. 00077 * Returns the currently stored time. 00078 * @return The time. 00079 */ 00080 const TTime& Time() const; 00081 00082 public: // Functions from base classes 00083 00084 /** 00085 * From CAknDocument, CreateAppUiL. 00086 * Creates a CCSSyncAppUi object and returns a pointer to it. 00087 * @return A pointer to the created instance of the AppUi created. 00088 */ 00089 CEikAppUi* CreateAppUiL(); 00090 00091 private: // Constructors and destructors 00092 00093 /** 00094 * CCSSyncDocument. 00095 * C++ default constructor. 00096 * Performs the first phase of two phase construction. 00097 * @param aApp Application creating this document. 00098 */ 00099 CCSSyncDocument( CEikApplication& aApp ); 00100 00101 /** 00102 * ConstructL. 00103 * Performs the second phase construction of a CCSSyncDocument object. 00104 */ 00105 void ConstructL(); 00106 00107 private: // Data 00108 00109 /** 00110 * iServer, interface to the Time Server. 00111 */ 00112 RTimeServerSession iServer; 00113 00114 /** 00115 * iTime, the currently displayed time. 00116 */ 00117 TTime iTime; 00118 }; 00119 00120 00121 #endif // __CSSYNCDOCUMENT_H__ 00122 00123 00124 // End of File
© Nokia 2009 |