application/application.h

changeset 51
e324291ca9f8
parent 47
3ac472683246
equal deleted inserted replaced
50:9c25e2616bfa 51:e324291ca9f8
48 typedef struct DavApp { 48 typedef struct DavApp {
49 DavConfig *dav_config; 49 DavConfig *dav_config;
50 UiList *repos; 50 UiList *repos;
51 } DavApp; 51 } DavApp;
52 52
53
54 typedef enum DavResourceViewType {
55 DAV_RESOURCE_VIEW_PROPERTIES = 0,
56 DAV_RESOURCE_VIEW_TEXT,
57 DAV_RESOURCE_VIEW_IMAGE
58 } DavResourceViewType;
59
60 #define DAV_RESOURCEVIEWER_PREVIEW_MAX_SIZE 0x1000000
61
53 /* 62 /*
54 * main window document object 63 * main window document object
55 */ 64 */
56 typedef struct DavBrowser { 65 typedef struct DavBrowser {
57 UiContext *ctx; 66 UiContext *ctx;
58 DavSession *sn; 67 DavSession *sn;
59 UiThreadpool *dav_queue; 68 UiThreadpool *dav_queue;
69
70 CxMap *res_open_inprogress;
60 71
61 char *repo_base; 72 char *repo_base;
62 73
63 DavResource *current; 74 DavResource *current;
64 75
79 /* 90 /*
80 * children of the current collection 91 * children of the current collection
81 */ 92 */
82 UiList *resources; 93 UiList *resources;
83 } DavBrowser; 94 } DavBrowser;
95
96 /*
97 * resource view window document object
98 */
99 typedef struct DavResourceViewer {
100 UiContext *ctx;
101 DavSession *sn;
102 DavResource *current;
103 char *path;
104 DavResourceViewType type;
105
106 UiInteger *tabview;
107 UiInteger *loading;
108 UiString *message;
109
110 UiList *properties;
111 UiText *text;
112 UiGeneric *image;
113
114 int error;
115 char *message_str;
116
117 CxBuffer *text_content;
118 char *tmp_file;
119 } DavResourceViewer;
120
121 typedef struct DavPropertyList {
122 char *ns;
123 char *name;
124 char *value_simplified;
125 char *value_full;
126 } DavPropertyList;
84 127
85 void application_init(void); 128 void application_init(void);
86 129
87 /* 130 /*
88 * startup callback for the ui framework 131 * startup callback for the ui framework

mercurial