00001
00002
00003
00004
00005 #ifndef __DBMSAPPUI_H__
00006 #define __DBMSAPPUI_H__
00007
00008 #include <aknappui.h>
00009 #include "DBMSEngine.h"
00010
00011
00012 class CDBMSAppView;
00013 class CDBMSListboxView;
00014 class CDBMSEditorView;
00015 class CDesC16ArrayFlat;
00016
00017
00018 _LIT(KDatabaseFile,"DBMS.dat");
00019
00020
00032 class CDBMSAppUi : public CAknAppUi
00033 {
00034 public:
00035
00043 void ConstructL();
00044
00052 CDBMSAppUi();
00053
00054
00060 ~CDBMSAppUi();
00061
00062
00063 public:
00064
00077 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane);
00078
00079
00087 void HandleCommandL(TInt aCommand);
00088
00093 void HandleStatusPaneSizeChange();
00094
00095 private:
00096
00103 void OpenDatabaseL();
00104
00111 void CreateDatabaseL();
00112
00118 void RemoveDatabaseL();
00119
00126 void CloseDatabaseL();
00127
00133 void ShowBookEditorViewL();
00134
00144 void AddBookL(TBool aUseSql);
00145
00154 void RemoveBookL();
00155
00161 void RemoveAllBooksL();
00162
00168 void UpdateBookTitleL();
00169
00176 void ShowAllBooksL();
00177
00184 void SearchBooksL();
00185
00193 void IndexFindL();
00194
00201 void AddDateColumnL();
00202
00210 void RemoveDateColumnL();
00211
00217 void ShowColumnsL();
00218
00219 private:
00220
00226 TFileName ApplicationDriveAndPathL() const;
00227
00233 TFileName DatabaseDriveAndPathL() const;
00234
00236 enum TViewId
00237 {
00238 ENone,
00239 EMainView,
00240 EListView,
00241 EColumnsView,
00242 EEditorView
00243 };
00244
00250 void ChangeViewL(TViewId aNewView);
00251
00257 void ShowNoteL(const TDesC& aMessage) const;
00258
00266 CDesCArrayFlat* TitlesArrayL(const CDesCArrayFlat* aFullInfoArray) const;
00267
00273 TBool QueryTextL(TDesC& aPrompt, TDes& aResultText) const;
00274
00275 private:
00276
00277 TViewId iCurrentView;
00278
00280 CDBMSAppView* iAppView;
00281
00283 CDBMSListboxView* iListboxView;
00284
00286 CDBMSEditorView* iBookEditorView;
00287
00289 CBookDb* iBookDb;
00290
00292 TFileName iDatabaseFile;
00293 };
00294
00295 #endif // __DBMSAPPUI_H__
00296