r1283: Added a whole load of 'const' modifiers so we can do extra checking...
[rox-filer.git] / ROX-Filer / src / support.h
blobb1f56d3bf2480982e650fe48c7781caa3b09e5a9
1 /*
2 * $Id$
4 * ROX-Filer, filer for the ROX desktop project
5 * By Thomas Leonard, <tal197@users.sourceforge.net>.
6 */
8 #ifndef _SUPPORT_H
9 #define _SUPPORT_H
11 struct _XMLwrapper {
12 int ref;
13 xmlDocPtr doc;
16 #define PRETTY_SIZE_LIMIT 10000
17 #define TIME_FORMAT "%T %d %b %Y"
19 XMLwrapper *xml_cache_load(const gchar *pathname);
20 void xml_cache_unref(XMLwrapper *wrapper);
21 int save_xml_file(xmlDocPtr doc, const gchar *filename);
22 xmlNode *get_subnode(xmlNode *node, const char *namespaceURI, const char *name);
23 xmlDocPtr soap_new(xmlNodePtr *ret_body);
24 char *pathdup(const char *path);
25 GString *make_path(const char *dir, const char *leaf);
26 const char *our_host_name();
27 const char *our_host_name_for_dnd();
28 pid_t spawn_full(const char **argv, const char *dir, int *to_stderr);
29 void debug_free_string(void *data);
30 const char *user_name(uid_t uid);
31 const char *group_name(gid_t gid);
32 char *format_size(off_t size);
33 char *format_size_aligned(off_t size);
34 gchar *format_double_size(double size);
35 char *fork_exec_wait(const char **argv);
36 char *pretty_permissions(mode_t m);
37 gint applicable(uid_t uid, gid_t gid);
38 const char *get_local_path(const char *uri);
39 void close_on_exec(int fd, gboolean close);
40 void set_blocking(int fd, gboolean blocking);
41 char *pretty_time(time_t *time);
42 guchar *copy_file(const guchar *from, const guchar *to);
43 guchar *shell_escape(const guchar *word);
44 gboolean is_sub_dir(const char *sub, const char *parent);
45 gboolean in_list(const guchar *item, const guchar *list);
46 GPtrArray *split_path(const guchar *path);
47 guchar *get_relative_path(const guchar *from, const guchar *to);
48 int text_to_boolean(const char *text, int defvalue);
49 char *readlink_dup(const char *path);
50 gchar *to_utf8(const gchar *src);
51 gchar *from_utf8(const gchar *src);
52 char *md5_hash(const char *message);
54 #endif /* _SUPPORT_H */