diff -r 9c25e2616bfa -r e324291ca9f8 application/application.h --- a/application/application.h Sun Oct 06 18:43:06 2024 +0200 +++ b/application/application.h Sun Oct 20 21:24:13 2024 +0200 @@ -50,6 +50,15 @@ UiList *repos; } DavApp; + +typedef enum DavResourceViewType { + DAV_RESOURCE_VIEW_PROPERTIES = 0, + DAV_RESOURCE_VIEW_TEXT, + DAV_RESOURCE_VIEW_IMAGE +} DavResourceViewType; + +#define DAV_RESOURCEVIEWER_PREVIEW_MAX_SIZE 0x1000000 + /* * main window document object */ @@ -57,6 +66,8 @@ UiContext *ctx; DavSession *sn; UiThreadpool *dav_queue; + + CxMap *res_open_inprogress; char *repo_base; @@ -82,6 +93,38 @@ UiList *resources; } DavBrowser; +/* + * resource view window document object + */ +typedef struct DavResourceViewer { + UiContext *ctx; + DavSession *sn; + DavResource *current; + char *path; + DavResourceViewType type; + + UiInteger *tabview; + UiInteger *loading; + UiString *message; + + UiList *properties; + UiText *text; + UiGeneric *image; + + int error; + char *message_str; + + CxBuffer *text_content; + char *tmp_file; +} DavResourceViewer; + +typedef struct DavPropertyList { + char *ns; + char *name; + char *value_simplified; + char *value_full; +} DavPropertyList; + void application_init(void); /*