diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2009-12-20 11:24:32 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2009-12-20 11:24:32 +0100 |
commit | 413c3537b8730940d516af4823e83ac8df001ede (patch) | |
tree | a6dc92b02dc5ddf86a870d0d4ee63d18fffd2ac0 /dbus/dbus-file.h | |
parent | 3da9815113c013c3e81f4290d9b74d9862004027 (diff) | |
download | dbus-413c3537b8730940d516af4823e83ac8df001ede.tar.gz |
moved out dbus file related functions from sysdeps into separate files - tested on windows
Diffstat (limited to 'dbus/dbus-file.h')
-rw-r--r-- | dbus/dbus-file.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/dbus/dbus-file.h b/dbus/dbus-file.h new file mode 100644 index 00000000..b83fc6d9 --- /dev/null +++ b/dbus/dbus-file.h @@ -0,0 +1,65 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* dbus-file.h dbus file related stuff (internal to D-Bus implementation) + * + * Copyright (C) 2002, 2003 Red Hat, Inc. + * Copyright (C) 2003 CodeFactory AB + * + * Licensed under the Academic Free License version 2.1 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DBUS_FILE_H +#define DBUS_FILE_H + +//#include <dbus/dbus-types.h> +#include <dbus/dbus-string.h> +#include <dbus/dbus-errors.h> + +DBUS_BEGIN_DECLS + +/** + * @addtogroup DBusFile + * @{ + */ + +/** + * File interface + */ +dbus_bool_t _dbus_file_exists (const char *file); +dbus_bool_t _dbus_file_get_contents (DBusString *str, + const DBusString *filename, + DBusError *error); +dbus_bool_t _dbus_string_save_to_file (const DBusString *str, + const DBusString *filename, + DBusError *error); + +dbus_bool_t _dbus_make_file_world_readable (const DBusString *filename, + DBusError *error); + +dbus_bool_t _dbus_create_file_exclusively (const DBusString *filename, + DBusError *error); +dbus_bool_t _dbus_delete_file (const DBusString *filename, + DBusError *error); +int _dbus_file_read (int fd, + DBusString *buffer, + int count); + +/** @} */ + +DBUS_END_DECLS + +#endif |