S60 5th Edition SDK Example Applications Guide |
00001 /* 00002 * ============================================================================== 00003 * Name : csasyncdocument.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 __CSASYNCDOCUMENT_H__ 00018 #define __CSASYNCDOCUMENT_H__ 00019 00020 // INCLUDE FILES 00021 #include <akndoc.h> 00022 00023 // FORWARD DECLARATIONS 00024 class CCSAsyncAppUi; 00025 class CEikApplication; 00026 class CCSAsyncRequestHandler; 00027 00028 // CLASS DECLARATION 00029 /** 00030 * CCSAsyncDocument 00031 * An instance of class CCSAsyncDocument is the Document part of the AVKON 00032 * application framework for the CSAsync example application 00033 */ 00034 class CCSAsyncDocument : public CAknDocument 00035 { 00036 public: // Constructors and destructors 00037 00038 /** 00039 * NewL. 00040 * Two-phased constructor. 00041 * Constructs a CCSAsyncDocument 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 CCSAsyncDocument. 00046 */ 00047 static CCSAsyncDocument* NewL( CEikApplication& aApp ); 00048 00049 /** 00050 * NewLC. 00051 * Two-phased constructor. 00052 * Constructs a CCSAsyncDocument 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 CCSAsyncDocument. 00057 */ 00058 static CCSAsyncDocument* NewLC( CEikApplication& aApp ); 00059 00060 /** 00061 * ~CCSAsyncDocument. 00062 * Destructor. 00063 * Destroys the object and release all memory objects. 00064 */ 00065 virtual ~CCSAsyncDocument(); 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 * StopClock. 00077 * Stops the clock. 00078 */ 00079 void StopClock(); 00080 00081 /** 00082 * Time. 00083 * Returns the currently stored time. 00084 * @return The time. 00085 */ 00086 TTime Time() const; 00087 00088 /** 00089 * ClockActive. 00090 * Checks whether the clock has been started. 00091 * @return ETrue if the clock has been started, 00092 EFalse if the clock is stopped 00093 */ 00094 TBool ClockActive() const; 00095 00096 public: // Functions from base classes 00097 00098 /** 00099 * From CAknDocument, CreateAppUiL. 00100 * Creates a CCSAsyncAppUi object and returns a pointer to it. 00101 * @return A pointer to the created instance of the AppUi created. 00102 */ 00103 CEikAppUi* CreateAppUiL(); 00104 00105 private: // Constructors and destructors 00106 00107 /** 00108 * CCSAsyncDocument. 00109 * C++ default constructor. 00110 * Perform the first phase of two phase construction. 00111 * @param aApp Application creating this document. 00112 */ 00113 CCSAsyncDocument( CEikApplication& aApp ); 00114 00115 /** 00116 * ConstructL. 00117 * Performs the second phase construction of a CCSAsyncDocument object. 00118 */ 00119 void ConstructL(); 00120 00121 private: // Data 00122 00123 /** 00124 * iHandler, Active object for handling asynchronous requests. 00125 * Owned by CCSAsyncDocument object. 00126 */ 00127 CCSAsyncRequestHandler* iHandler; 00128 }; 00129 00130 00131 #endif // __CSASYNCDOCUMENT_H__ 00132 00133 00134 // End of File
© Nokia 2009 |