application/application.h

changeset 35
834d9c15a69f
parent 29
3fc287f06305
equal deleted inserted replaced
34:98e041f2f9a2 35:834d9c15a69f
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE. 26 * POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef IDAV_APPLICATION_H 29 #ifndef IDAV_APPLICATION_H
30 #define IDAV_APPLICATION_H 30 #define IDAV_APPLICATION_H
31 31
32 #include <ui/ui.h> 32 #include <ui/ui.h>
33 33
34 #include <stdio.h> 34 #include <stdio.h>
35 #include <stdlib.h> 35 #include <stdlib.h>
38 #include <libidav/webdav.h> 38 #include <libidav/webdav.h>
39 #include <libidav/config.h> 39 #include <libidav/config.h>
40 40
41 #include <cx/linked_list.h> 41 #include <cx/linked_list.h>
42 42
43 #ifdef __cplusplus 43 #ifdef __cplusplus
44 extern "C" { 44 extern "C" {
45 #endif 45 #endif
46 46
47 47
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 /* 53 /*
54 * main window document object 54 * main window document object
55 */ 55 */
56 typedef struct DavBrowser { 56 typedef struct DavBrowser {
57 UiContext *ctx; 57 UiContext *ctx;
58 DavSession *sn; 58 DavSession *sn;
59 UiThreadpool *dav_queue; 59 UiThreadpool *dav_queue;
60 60
61 char *repo_base; 61 char *repo_base;
62 62
63 DavResource *current; 63 DavResource *current;
64 64
65 /* 65 /*
66 * incremented every time current is updated 66 * incremented every time current is updated
67 */ 67 */
68 uint64_t res_counter; 68 uint64_t res_counter;
69 69
70 CxList *navigation_stack; 70 CxList *navigation_stack;
71 bool navstack_enabled; 71 bool navstack_enabled;
72 int navstack_pos; 72 int navstack_pos;
73 73
74 /* 74 /*
75 * path textfield value 75 * path textfield value
76 */ 76 */
77 UiString *path; 77 UiString *path;
78 78
79 /* 79 /*
80 * children of the current collection 80 * children of the current collection
81 */ 81 */
82 UiList *resources; 82 UiList *resources;
83 } DavBrowser; 83 } DavBrowser;
84 84
85 void application_init(void); 85 void application_init(void);
86 86
87 /* 87 /*
115 115
116 void action_newfile(UiEvent *event, void *data); 116 void action_newfile(UiEvent *event, void *data);
117 117
118 void action_mkcol(UiEvent *event, void *data); 118 void action_mkcol(UiEvent *event, void *data);
119 119
120 #ifdef __cplusplus 120 #ifdef __cplusplus
121 } 121 }
122 #endif 122 #endif
123 123
124 #endif /* IDAV_APPLICATION_H */ 124 #endif /* IDAV_APPLICATION_H */

mercurial