mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-09 13:02:01 +03:00
a12fdfbb0e
* completed vfs_path_from_str(); * completed vfs_path_to_str() and vfs_path_to_str_elements_count(); * removed deprecated vfs_split(); * changes in all related code; * new unit tests. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
52 lines
1.5 KiB
C
52 lines
1.5 KiB
C
#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;
|
|
struct vfs_url_struct;
|
|
|
|
typedef struct
|
|
{
|
|
GList *path;
|
|
char *unparsed;
|
|
char *unparsed_encoding;
|
|
} vfs_path_t;
|
|
|
|
typedef struct
|
|
{
|
|
char *path;
|
|
struct vfs_class *class;
|
|
char *encoding;
|
|
|
|
char *raw_url_str;
|
|
struct vfs_url_struct *url;
|
|
|
|
struct vfs_s_super *current_super_block;
|
|
} vfs_path_element_t;
|
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
vfs_path_t *vfs_path_new (void);
|
|
void vfs_path_free (vfs_path_t * path);
|
|
int vfs_path_elements_count (const vfs_path_t * path);
|
|
|
|
char *vfs_path_to_str (const vfs_path_t * path);
|
|
char *vfs_path_to_str_elements_count (const vfs_path_t * path, int elements_count);
|
|
vfs_path_t *vfs_path_from_str (const char *path_str);
|
|
|
|
vfs_path_element_t *vfs_path_get_by_index (const vfs_path_t * path, int element_index);
|
|
void vfs_path_element_free (vfs_path_element_t * element);
|
|
|
|
struct vfs_class *vfs_prefix_to_class (const char *prefix);
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
#endif
|