S60 5th Edition SDK
Example Applications Guide

CCSSyncDocument Class Reference

#include <cssyncdocument.h>

Inheritance diagram for CCSSyncDocument:

List of all members.

Detailed Description

CCSSyncDocument An instance of class CCSSyncDocument is the Document part of the AVKON application framework for the CSSync example application

Definition at line 34 of file cssyncdocument.h.

Public Member Functions

virtual ~CCSSyncDocument ()
void UpdateTime ()
const TTime & Time () const
CEikAppUi * CreateAppUiL ()

Static Public Member Functions

static CCSSyncDocumentNewL (CEikApplication &aApp)
static CCSSyncDocumentNewLC (CEikApplication &aApp)

Private Member Functions

 CCSSyncDocument (CEikApplication &aApp)
void ConstructL ()

Private Attributes

RTimeServerSession iServer
TTime iTime


Constructor & Destructor Documentation

CCSSyncDocument::~CCSSyncDocument  )  [virtual]
 

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

Definition at line 74 of file cssyncdocument.cpp.

References iServer.

00075     {
00076     iServer.Close();
00077     }

CCSSyncDocument::CCSSyncDocument CEikApplication &  aApp  )  [private]
 

CCSSyncDocument. C++ default constructor. Performs the first phase of two phase construction.

Parameters:
aApp Application creating this document.

Definition at line 63 of file cssyncdocument.cpp.

Referenced by NewLC().

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


Member Function Documentation

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

NewL. Two-phased constructor. Constructs a CCSSyncDocument 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 CCSSyncDocument.

Definition at line 28 of file cssyncdocument.cpp.

References NewLC().

Referenced by CCSSyncApplication::CreateDocumentL().

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

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

NewLC. Two-phased constructor. Constructs a CCSSyncDocument 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 CCSSyncDocument.

Definition at line 40 of file cssyncdocument.cpp.

References CCSSyncDocument().

Referenced by NewL().

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

void CCSSyncDocument::UpdateTime  ) 
 

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

Definition at line 95 of file cssyncdocument.cpp.

References iServer, iTime, and RTimeServerSession::RequestTime().

Referenced by CCSSyncAppUi::HandleCommandL().

00096     {
00097     iServer.RequestTime( iTime );
00098     }

const TTime & CCSSyncDocument::Time  )  const
 

Time. Returns the currently stored time.

Returns:
The time.

Definition at line 105 of file cssyncdocument.cpp.

References iTime.

Referenced by CCSSyncAppView::Draw().

00106     {
00107     return iTime;
00108     }

CEikAppUi * CCSSyncDocument::CreateAppUiL  ) 
 

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

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

Definition at line 84 of file cssyncdocument.cpp.

00085     {
00086     // Create the application user interface, and return a pointer to it
00087     return ( static_cast<CEikAppUi*>( new ( ELeave ) CCSSyncAppUi() ) );
00088     }

void CCSSyncDocument::ConstructL  )  [private]
 

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

Definition at line 53 of file cssyncdocument.cpp.

References RTimeServerSession::Connect(), and iServer.

00054     {
00055     User::LeaveIfError( iServer.Connect() );
00056     }


Member Data Documentation

RTimeServerSession CCSSyncDocument::iServer [private]
 

iServer, interface to the Time Server.

Definition at line 112 of file cssyncdocument.h.

Referenced by ConstructL(), UpdateTime(), and ~CCSSyncDocument().

TTime CCSSyncDocument::iTime [private]
 

iTime, the currently displayed time.

Definition at line 117 of file cssyncdocument.h.

Referenced by Time(), and UpdateTime().


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

© Nokia 2009

Back to top