Commit 465c1ca6 465c1ca6a66ff10304679d2dcb90c3bd4867bc6d by Sergey Poznyakoff

(struct mu_list_response.level): New member

(struct mu_folder_list): Removed. Use mu_list_t instead
(mu_folder_list): Use mu_list_t. Take an extra argument: a maximum
recusion level.
(mu_folder_lsub): Change typo of the last argument (mu_list_t
now).
(mu_folder_list_destroy): Removed
(mu_list_response_free): New function
1 parent e0e54963
...@@ -28,16 +28,11 @@ extern "C" { ...@@ -28,16 +28,11 @@ extern "C" {
28 struct mu_list_response 28 struct mu_list_response
29 { 29 {
30 int type; /* MU_FOLDER_ATTRIBUTE_.* flags */ 30 int type; /* MU_FOLDER_ATTRIBUTE_.* flags */
31 int level;
31 int separator; 32 int separator;
32 char *name; 33 char *name;
33 }; 34 };
34 35
35 struct mu_folder_list
36 {
37 struct mu_list_response **element;
38 size_t num;
39 };
40
41 /* Constructor/destructor and possible types. */ 36 /* Constructor/destructor and possible types. */
42 extern int mu_folder_create (mu_folder_t *, const char *); 37 extern int mu_folder_create (mu_folder_t *, const char *);
43 extern void mu_folder_destroy (mu_folder_t *); 38 extern void mu_folder_destroy (mu_folder_t *);
...@@ -50,10 +45,9 @@ extern int mu_folder_rename (mu_folder_t, const char *, const char *); ...@@ -50,10 +45,9 @@ extern int mu_folder_rename (mu_folder_t, const char *, const char *);
50 extern int mu_folder_subscribe (mu_folder_t, const char *); 45 extern int mu_folder_subscribe (mu_folder_t, const char *);
51 extern int mu_folder_unsubscribe (mu_folder_t, const char *); 46 extern int mu_folder_unsubscribe (mu_folder_t, const char *);
52 extern int mu_folder_list (mu_folder_t, const char *, const char *, 47 extern int mu_folder_list (mu_folder_t, const char *, const char *,
53 struct mu_folder_list *); 48 size_t, mu_list_t *);
54 extern int mu_folder_lsub (mu_folder_t, const char *, const char *, 49 extern int mu_folder_lsub (mu_folder_t, const char *, const char *,
55 struct mu_folder_list *); 50 mu_list_t *);
56 extern int mu_folder_list_destroy (struct mu_folder_list *);
57 51
58 /* Stream settings. */ 52 /* Stream settings. */
59 extern int mu_folder_get_stream (mu_folder_t, mu_stream_t *); 53 extern int mu_folder_get_stream (mu_folder_t, mu_stream_t *);
...@@ -78,6 +72,8 @@ extern int mu_folder_set_url (mu_folder_t, mu_url_t); ...@@ -78,6 +72,8 @@ extern int mu_folder_set_url (mu_folder_t, mu_url_t);
78 /* FIXME: not implemented */ 72 /* FIXME: not implemented */
79 extern int mu_folder_decrement (mu_folder_t); 73 extern int mu_folder_decrement (mu_folder_t);
80 74
75 extern void mu_list_response_free (void *data);
76
81 77
82 #ifdef __cplusplus 78 #ifdef __cplusplus
83 } 79 }
......