S60 5th Edition SDK
Example Applications Guide

CCSAsyncDocument Class Reference

#include <csasyncdocument.h>

Inheritance diagram for CCSAsyncDocument:

List of all members.

Detailed Description

CCSAsyncDocument An instance of class CCSAsyncDocument is the Document part of the AVKON application framework for the CSAsync example application

Definition at line 34 of file csasyncdocument.h.

Public Member Functions

virtual ~CCSAsyncDocument ()
void UpdateTime ()
void StopClock ()
TTime Time () const
TBool ClockActive () const
CEikAppUi * CreateAppUiL ()

Static Public Member Functions

static CCSAsyncDocumentNewL (CEikApplication &aApp)
static CCSAsyncDocumentNewLC (CEikApplication &aApp)

Private Member Functions

 CCSAsyncDocument (CEikApplication &aApp)
void ConstructL ()

Private Attributes

CCSAsyncRequestHandleriHandler


Constructor & Destructor Documentation

CCSAsyncDocument::~CCSAsyncDocument  )  [virtual]
 

~CCSAsyncDocument. Destructor. Destroys the object and release all memory objects.

Definition at line 73 of file csasyncdocument.cpp.

References iHandler.

00074     {
00075     delete iHandler;
00076     }

CCSAsyncDocument::CCSAsyncDocument CEikApplication &  aApp  )  [private]
 

CCSAsyncDocument. C++ default constructor. Perform the first phase of two phase construction.

Parameters:
aApp Application creating this document.

Definition at line 62 of file csasyncdocument.cpp.

Referenced by NewLC().

00063 : CAknDocument( aApp )
00064     {
00065     // No implementation required
00066     }


Member Function Documentation

CCSAsyncDocument * CCSAsyncDocument::NewL CEikApplication &  aApp  )  [static]
 

NewL. Two-phased constructor. Constructs a CCSAsyncDocument for the AVKON application aApp using two phase construction, and returns a pointer to the created object.

Parameters:
aApp Application creating this document.
Returns:
A pointer to the created instance of CCSAsyncDocument.

Definition at line 28 of file csasyncdocument.cpp.

References NewLC().

Referenced by CCSAsyncApplication::CreateDocumentL().

00029     {
00030     CCSAsyncDocument* self = NewLC( aApp );
00031     CleanupStack::Pop( self );
00032     return self;
00033     }

CCSAsyncDocument * CCSAsyncDocument::NewLC CEikApplication &  aApp  )  [static]
 

NewLC. Two-phased constructor. Constructs a CCSAsyncDocument for the AVKON application aApp using two phase construction, and returns a pointer to the created object.

Parameters:
aApp Application creating this document.
Returns:
A pointer to the created instance of CCSAsyncDocument.

Definition at line 40 of file csasyncdocument.cpp.

References CCSAsyncDocument().

Referenced by NewL().

00041     {
00042     CCSAsyncDocument* self = new ( ELeave ) CCSAsyncDocument( aApp );
00043     CleanupStack::PushL( self );
00044     self->ConstructL();
00045     return self;
00046     }

void CCSAsyncDocument::UpdateTime  ) 
 

UpdateTime. Asks the time server to update this documents locally stored time.

Definition at line 98 of file csasyncdocument.cpp.

References iHandler, and CCSAsyncRequestHandler::RequestTime().

Referenced by CCSAsyncAppUi::HandleCommandL().

00099     {
00100     iHandler->RequestTime();
00101     }

void CCSAsyncDocument::StopClock  ) 
 

StopClock. Stops the clock.

Definition at line 108 of file csasyncdocument.cpp.

References CCSAsyncRequestHandler::CancelRequest(), ClockActive(), and iHandler.

Referenced by CCSAsyncAppUi::HandleCommandL().

00109     {
00110     if ( ClockActive() )
00111         {
00112         iHandler->CancelRequest() ;
00113         }
00114     }

TTime CCSAsyncDocument::Time  )  const
 

Time. Returns the currently stored time.

Returns:
The time.

Definition at line 121 of file csasyncdocument.cpp.

References iHandler, and CCSAsyncRequestHandler::Time().

Referenced by CCSAsyncAppView::Draw().

00122     {
00123     return iHandler->Time();
00124     }

TBool CCSAsyncDocument::ClockActive  )  const
 

ClockActive. Checks whether the clock has been started.

Returns:
ETrue if the clock has been started, EFalse if the clock is stopped

Definition at line 131 of file csasyncdocument.cpp.

References iHandler.

Referenced by StopClock().

00132     {
00133     return iHandler->IsActive();
00134     }

CEikAppUi * CCSAsyncDocument::CreateAppUiL  ) 
 

From CAknDocument, CreateAppUiL. Creates a CCSAsyncAppUi object and returns a pointer to it.

Returns:
A pointer to the created instance of the AppUi created.

Definition at line 83 of file csasyncdocument.cpp.

References iHandler, and CCSAsyncRequestHandler::NewL().

00084     {
00085     // Create the application user interface, and return a pointer to it
00086     CCSAsyncAppUi* appUi = new ( ELeave ) CCSAsyncAppUi;
00087     CleanupStack::PushL( appUi );
00088     iHandler = CCSAsyncRequestHandler::NewL( *appUi );
00089     CleanupStack::Pop( appUi ) ;
00090     return appUi;
00091     }

void CCSAsyncDocument::ConstructL  )  [private]
 

ConstructL. Performs the second phase construction of a CCSAsyncDocument object.

Definition at line 53 of file csasyncdocument.cpp.

00054     {
00055     // No implementation required
00056     }


Member Data Documentation

CCSAsyncRequestHandler* CCSAsyncDocument::iHandler [private]
 

iHandler, Active object for handling asynchronous requests. Owned by CCSAsyncDocument object.

Definition at line 127 of file csasyncdocument.h.

Referenced by ClockActive(), CreateAppUiL(), StopClock(), Time(), UpdateTime(), and ~CCSAsyncDocument().


The documentation for this class was generated from the following files:

© Nokia 2009

Back to top