00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00030
00031
00032
00033
00034
00035 #ifndef __CL_STACK__H__
00036 #define __CL_STACK__H__
00037
00038 #include <glib.h>
00039 #include "erMdsContent.h"
00040
00041 #ifdef __cplusplus
00042 extern "C"
00043 {
00044 #endif
00045
00046 typedef enum
00047 {
00048
00049 st_ContentTypeBooks = 0,
00050 st_ContentTypeNews,
00051 st_ContentTypeDocs,
00052 st_ContentTypeNotes,
00053 st_ARCHIVES_COUNT,
00054
00055 st_StorageTypeCF = st_ARCHIVES_COUNT,
00056
00057 st_StorageTypeSD,
00058 st_StorageTypeUSB,
00059 st_StorageTypeMain,
00060 st_MenuTypeMode,
00061 st_DownloadHistory,
00062 st_SearchResult,
00063 st_RecentDocuments,
00064 st_ContentTypeUndefined
00065 } st_ContentType_e;
00066
00067 #define ARCHIVE_TYPE_COUNT st_ARCHIVES_COUNT //number of archive types for which a history stack is created
00068 #define TOTAL_STACK_COUNT st_ContentTypeUndefined
00069 #define INITIAL_STACK_ARRAY_SIZE 20
00070 #define INITIAL_DIR_COUNT_ARRAY_SIZE 3
00071 #define INITIAL_SEARCH_COUNT_ARRAY_SIZE 3
00072
00073
00074 typedef struct {
00075 GArray *dirArray;
00076 mdsSortStruct_t sort;
00077 unsigned int index;
00078 } stItem_t;
00079
00083 void stackDestroyAll(void);
00084
00088 void stackInitAll(void);
00089
00096 void stackPush(st_ContentType_e contentType, stItem_t* stackItem);
00097
00101 void stackPop(st_ContentType_e contentType);
00102
00108 stItem_t* stackPeek(st_ContentType_e contentType);
00109
00113 int stackHeight(st_ContentType_e contentType);
00114
00119 void stackClear(st_ContentType_e contentType);
00120
00125 void stackItemDestroy(stItem_t* stackItem);
00126
00130 void stackItemDisplay(stItem_t* stackItem);
00131
00135 void stackDisplay(st_ContentType_e contentType);
00136
00138
00139
00140 gboolean stackIsStorage(st_ContentType_e contentType);
00141
00142
00143 gboolean stackIsArchive(st_ContentType_e contentType);
00144
00145
00146 #ifdef __cplusplus
00147 }
00148 #endif
00149
00150 #endif //__CL_STACK__H__
00151