2011-04-14 16:21:30 +04:00
|
|
|
#ifndef MC__VFS_PATH_H
|
|
|
|
#define MC__VFS_PATH_H
|
|
|
|
|
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
|
|
|
|
struct vfs_class;
|
2011-04-28 15:39:59 +04:00
|
|
|
struct vfs_url_struct;
|
2011-04-14 16:21:30 +04:00
|
|
|
|
2011-04-20 16:59:06 +04:00
|
|
|
typedef struct
|
|
|
|
{
|
2011-04-28 15:39:59 +04:00
|
|
|
GList *path;
|
2011-04-14 16:21:30 +04:00
|
|
|
} vfs_path_t;
|
|
|
|
|
2011-04-20 16:59:06 +04:00
|
|
|
typedef struct
|
|
|
|
{
|
2011-04-14 16:21:30 +04:00
|
|
|
char *path;
|
|
|
|
struct vfs_class *class;
|
|
|
|
char *encoding;
|
2011-04-28 15:39:59 +04:00
|
|
|
|
2011-05-30 11:16:40 +04:00
|
|
|
struct
|
|
|
|
{
|
|
|
|
GIConv converter;
|
|
|
|
DIR *info;
|
2011-05-27 19:28:46 +04:00
|
|
|
} dir;
|
|
|
|
|
2011-04-28 15:39:59 +04:00
|
|
|
char *raw_url_str;
|
|
|
|
struct vfs_url_struct *url;
|
|
|
|
|
|
|
|
struct vfs_s_super *current_super_block;
|
2011-04-14 16:21:30 +04:00
|
|
|
} vfs_path_element_t;
|
|
|
|
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
|
2011-04-20 16:59:06 +04:00
|
|
|
vfs_path_t *vfs_path_new (void);
|
2011-04-14 16:21:30 +04:00
|
|
|
void vfs_path_free (vfs_path_t * path);
|
2011-04-28 15:39:59 +04:00
|
|
|
int vfs_path_elements_count (const vfs_path_t * path);
|
2011-04-14 16:21:30 +04:00
|
|
|
|
|
|
|
char *vfs_path_to_str (const vfs_path_t * path);
|
2011-04-28 15:39:59 +04:00
|
|
|
char *vfs_path_to_str_elements_count (const vfs_path_t * path, int elements_count);
|
2011-04-20 16:59:06 +04:00
|
|
|
vfs_path_t *vfs_path_from_str (const char *path_str);
|
2011-04-14 16:21:30 +04:00
|
|
|
|
2011-04-28 15:39:59 +04:00
|
|
|
vfs_path_element_t *vfs_path_get_by_index (const vfs_path_t * path, int element_index);
|
2011-04-20 16:59:06 +04:00
|
|
|
void vfs_path_element_free (vfs_path_element_t * element);
|
2011-04-14 16:21:30 +04:00
|
|
|
|
2011-04-28 15:39:59 +04:00
|
|
|
struct vfs_class *vfs_prefix_to_class (const char *prefix);
|
2011-04-14 16:21:30 +04:00
|
|
|
|
2011-06-01 14:56:52 +04:00
|
|
|
gboolean vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element);
|
|
|
|
|
2011-04-14 16:21:30 +04:00
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
|
|
|
|
#endif
|