Nokia N97 SDK
Example Applications Guide

CSIPExDoc Class Reference

#include <SIPExDoc.h>

Inheritance diagram for CSIPExDoc:

List of all members.

Detailed Description

The document class. Document part of the CKON application framework for the SIPLine. Creates appui.

Definition at line 36 of file SIPExDoc.h.


Public Member Functions

virtual  ~CSIPExDoc ()
CSIPExEngine *  CreateEngineL (MSIPExGameObserver &aObserver)
CEikAppUi *  CreateAppUiL ()
void  StoreInfoTextL (const TDesC &aText)
const TDesC &  InfoText ()

Static Public Member Functions

static CSIPExDoc *  NewL (CEikApplication &aApp)

Private Member Functions

  CSIPExDoc (CEikApplication &aApp)
void  ConstructL ()

Private Attributes

CSIPExEngine *  iEngine
HBufC *  iInfoText


Constructor & Destructor Documentation

CSIPExDoc::~CSIPExDoc (   )  [virtual]
 

Destructor.

Definition at line 65 of file SIPExDoc.cpp.

References iEngine, and iInfoText.

00066     {
00067     delete iEngine;
00068     delete iInfoText;
00069     }

CSIPExDoc::CSIPExDoc (  CEikApplication &  aApp  )  [private]
 

C++ default constructor.

Parameters:
aApp  Reference to the application class

Definition at line 33 of file SIPExDoc.cpp.

Referenced by NewL().

00034     : CEikDocument( aApp )
00035     {
00036     }


Member Function Documentation

CSIPExDoc * CSIPExDoc::NewL (  CEikApplication &  aApp  )  [static]
 

Two-phased constructor.

Parameters:
aApp  reference to the application class instance

Definition at line 53 of file SIPExDoc.cpp.

References CSIPExDoc().

Referenced by CSIPExApp::CreateDocumentL().

00054     {
00055     CSIPExDoc* self = new( ELeave ) CSIPExDoc( aApp );
00056     
00057     CleanupStack::PushL( self );
00058     self->ConstructL();
00059     CleanupStack::Pop();
00060 
00061     return self;
00062     }

CSIPExEngine * CSIPExDoc::CreateEngineL (  MSIPExGameObserver &  aObserver  ) 
 

Creates the application engine.

Parameters:
aObserver  A reference to the game observer.
Returns:
A pointer to engine. The client gets ownership of the engine.

Definition at line 87 of file SIPExDoc.cpp.

References iEngine, and CSIPExEngine::NewL().

00088     {    
00089     iEngine = CSIPExEngine::NewL( aObserver );
00090     return iEngine;
00091     }

CEikAppUi * CSIPExDoc::CreateAppUiL (   ) 
 

From CEikDocument Creates instance of appui class

Returns:
Pointer to the appui class instance

Definition at line 76 of file SIPExDoc.cpp.

00077     {
00078     CSIPExAppUi* appUi = new ( ELeave ) CSIPExAppUi;
00079     return appUi;
00080     }

void CSIPExDoc::StoreInfoTextL (  const TDesC &  aText  ) 
 

Info text is always stored in document. Text will be appended to existing info text unless max size is reached. In such situation oldest text will be removed.

Parameters:
aText  info text

Definition at line 97 of file SIPExDoc.cpp.

References iInfoText.

00098     {
00099     __ASSERT_ALWAYS( 
00100         ( aText.Length() + 1 ) < KMaxInfoLength, User::Leave( KErrArgument ) );
00101     
00102     TPtr ptext( iInfoText->Des() );
00103     
00104     TInt appendLen = aText.Length() + 1; // plus one is for line break 
00105     
00106     if ( ( appendLen + iInfoText->Length() ) > KMaxInfoLength )
00107         {
00108         ptext.Delete( 0, appendLen );
00109         }
00110         
00111     ptext.Append( aText );
00112     ptext.Append( CEditableText::ELineBreak );
00113     }

const TDesC & CSIPExDoc::InfoText (   ) 
 

Returns reference to current info text

Definition at line 119 of file SIPExDoc.cpp.

References iInfoText.

00120     {
00121     return *iInfoText;
00122     }

void CSIPExDoc::ConstructL (   )  [private]
 

By default Symbian 2nd phase constructor is private.

Definition at line 43 of file SIPExDoc.cpp.

References iInfoText.

00044     {
00045     iInfoText = HBufC::NewL( KMaxInfoLength );
00046     }


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

© Nokia 2009

Back to top