Remove vfs_url_t structure (replace with vfs_path_element_t)
[midnight-commander.git] / lib / vfs / path.h
blob613ff08d8f7bf1b1ac39b61a81aff39e94d9d329
1 #ifndef MC__VFS_PATH_H
2 #define MC__VFS_PATH_H
4 /*** typedefs(not structures) and defined constants **********************************************/
6 /*** enums ***************************************************************************************/
8 /*** structures declarations (and typedefs of structures)*****************************************/
10 struct vfs_class;
11 struct vfs_url_struct;
13 typedef struct
15 GList *path;
16 } vfs_path_t;
18 typedef struct
20 char *user;
21 char *password;
22 char *host;
23 int port;
24 char *path;
25 struct vfs_class *class;
26 char *encoding;
28 struct
30 GIConv converter;
31 DIR *info;
32 } dir;
34 char *raw_url_str;
36 struct vfs_s_super *current_super_block;
37 } vfs_path_element_t;
39 /*** global variables defined in .c file *********************************************************/
41 /*** declarations of public functions ************************************************************/
43 vfs_path_t *vfs_path_new (void);
44 void vfs_path_free (vfs_path_t * path);
45 int vfs_path_elements_count (const vfs_path_t * path);
47 char *vfs_path_to_str (const vfs_path_t * path);
48 char *vfs_path_to_str_elements_count (const vfs_path_t * path, int elements_count);
49 vfs_path_t *vfs_path_from_str (const char *path_str);
51 vfs_path_element_t *vfs_path_get_by_index (const vfs_path_t * path, int element_index);
52 void vfs_path_element_free (vfs_path_element_t * element);
54 struct vfs_class *vfs_prefix_to_class (const char *prefix);
56 gboolean vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element);
58 char *vfs_path_serialize (const vfs_path_t * vpath, GError ** error);
59 vfs_path_t *vfs_path_deserialize (const char *data, GError ** error);
61 /*** inline functions ****************************************************************************/
63 #endif