examples/ForumNokia/ContactsModel/inc/ContactsModelDocument.h

00001 /*
00002  * Copyright © 2008 Nokia Corporation.
00003  */
00004 
00005 #ifndef CONTACTSMODELDOCUMENT_H
00006 #define CONTACTSMODELDOCUMENT_H
00007 
00008 // INCLUDES
00009 #include <akndoc.h>
00010 
00011 #include <cntdb.h>
00012 
00013 // CONSTANTS
00014 
00015 // FORWARD DECLARATIONS
00016 class  CEikAppUi;
00017 
00018 // CLASS DECLARATION
00019 
00023 class CContactsModelDocument : public CAknDocument
00024     {
00025     public: // Constructors and destructor
00029         static CContactsModelDocument* NewL(CEikApplication& aApp);
00030 
00034         virtual ~CContactsModelDocument();
00035 
00036     public: // New functions
00048                 HBufC * GetItemL(TInt anIndex);
00049 
00058                 TInt ItemCount();
00059 
00065                 void UpdateContactsL();
00066 
00079                 TInt ImportL(RReadStream& aReadStream);
00080 
00094                 void ExportL(RWriteStream& aWriteStream, TInt aExportItem);
00095 
00096 
00097     private:
00098 
00102         CContactsModelDocument(CEikApplication& aApp);
00103         void ConstructL();
00104 
00105     private:
00106 
00110         CEikAppUi* CreateAppUiL();
00111 
00112                 // array of contact's ids that are displayed in the application
00113                 CContactIdArray* iContacts;
00114 
00115                 //text definition used to display contact items
00116                 CContactTextDef* iTextDef;
00117     };
00118 
00119 #endif
00120 
00121 // End of File
00122 

Generated by  doxygen 1.6.2