Xterm here works again.
[rox-filer.git] / ROX-Filer / src / support.h
blob7438598e25e347510c7ca9f2942047dcbfc5d303
1 /*
2 * ROX-Filer, filer for the ROX desktop project
3 * By Thomas Leonard, <tal197@users.sourceforge.net>.
4 */
6 #ifndef _SUPPORT_H
7 #define _SUPPORT_H
9 #define PRETTY_SIZE_LIMIT 10000
10 #define TIME_FORMAT "%T %d %b %Y"
12 #include <gio/gio.h>
13 #include <glib-object.h>
15 XMLwrapper *xml_cache_load(const gchar *pathname);
16 int save_xml_file(xmlDocPtr doc, const gchar *filename);
17 xmlDocPtr soap_new(xmlNodePtr *ret_body);
18 char *pathdup(const char *path);
19 const guchar *make_path(const char *dir, const char *leaf);
20 const char *our_host_name(void);
21 const char *our_host_name_for_dnd(void);
22 void debug_free_string(void *data);
23 const char *user_name(uid_t uid);
24 const char *group_name(gid_t gid);
25 const char *format_size(off_t size);
26 const char *format_size_aligned(off_t size);
27 const gchar *format_double_size(double size);
28 char *fork_exec_wait(const char **argv);
29 const char *pretty_permissions(mode_t m);
30 gint applicable(uid_t uid, gid_t gid);
31 char *get_local_path(const EscapedPath *escaped_uri);
32 void close_on_exec(int fd, gboolean close);
33 void set_blocking(int fd, gboolean blocking);
34 char *pretty_time(const time_t *time);
35 guchar *copy_file(const guchar *from, const guchar *to);
36 guchar *shell_escape(const guchar *word);
37 gboolean is_sub_dir(const char *sub, const char *parent);
38 gboolean in_list(const guchar *item, const guchar *list);
39 GPtrArray *split_path(const guchar *path);
40 guchar *get_relative_path(const guchar *from, const guchar *to);
41 int text_to_boolean(const char *text, int defvalue);
42 char *readlink_dup(const char *path);
43 gchar *to_utf8(const gchar *src);
44 gchar *from_utf8(const gchar *src);
45 void ensure_utf8(gchar **string);
46 char *md5_hash(const char *message);
47 gchar *expand_path(const gchar *path);
48 void destroy_glist(GList **list);
49 void null_g_free(gpointer p);
50 CollateKey *collate_key_new(const guchar *name);
51 void collate_key_free(CollateKey *key);
52 int collate_key_cmp(const CollateKey *n1, const CollateKey *n2,
53 gboolean caps_first);
54 gboolean file_exists(const char *path);
55 GPtrArray *list_dir(const guchar *path);
56 gint strcmp2(gconstpointer a, gconstpointer b);
57 int stat_with_timeout(const char *path, struct stat *info);
59 EscapedPath *escape_uri_path(const char *path);
60 EscapedPath *encode_path_as_uri(const guchar *path);
61 gchar *unescape_uri(const EscapedPath *uri);
62 gchar *get_uri_scheme(const EscapedPath *uri);
63 gboolean available_in_path(const char *file);
64 char *get_value_from_desktop_file(const char *path,
65 const char *section,
66 const char *key,
67 GError **error);
68 gboolean get_values_from_desktop_file(const char *path,
69 GError **error,
70 const char *section,
71 const char *key,
72 gchar **value, ...);
73 gchar *build_command_with_path(const char *cmd, const char *path);
74 char *path_or_uri(GFile *path);
76 #endif /* _SUPPORT_H */