src/mn-vfs.h (1997B) - raw
1 /* 2 * Mail Notification 3 * Copyright (C) 2003-2008 Jean-Yves Lefort <jylefort@brutele.be> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 */ 19 20 #ifndef _MN_VFS_H 21 #define _MN_VFS_H 22 23 #include <glib.h> 24 #include <libgnomevfs/gnome-vfs.h> 25 26 typedef struct _MNVFSReadLineContext MNVFSReadLineContext; 27 28 GnomeVFSResult mn_vfs_read_line (MNVFSReadLineContext **context, 29 GnomeVFSHandle *handle, 30 const char **line); 31 void mn_vfs_read_line_context_free (MNVFSReadLineContext *context); 32 33 gboolean mn_vfs_test (GnomeVFSURI *uri, GFileTest test); 34 35 GnomeVFSResult mn_vfs_read_entire_file_uri (GnomeVFSURI *uri, 36 int *file_size, 37 char **file_contents); 38 GnomeVFSResult mn_vfs_write_entire_file_uri (GnomeVFSURI *uri, 39 gsize file_size, 40 const char *file_contents, 41 gboolean exclusive, 42 unsigned int perms); 43 gboolean mn_vfs_write_entire_file_uri_safe (GnomeVFSURI *uri, 44 gsize file_size, 45 const char *file_contents, 46 unsigned int perms, 47 GError **err); 48 49 GnomeVFSURI *mn_vfs_uri_append_file_suffix (GnomeVFSURI *uri, 50 const char *suffix); 51 52 char *mn_vfs_uri_extract_short_name (const char *text_uri); 53 54 char *mn_vfs_get_local_path (GnomeVFSURI *uri); 55 56 gboolean mn_vfs_result_to_g_error (GnomeVFSResult result, GError **err); 57 58 #endif /* _MN_VFS_H */