D-Bus
1.10.12
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-file.h dbus file related stuff (internal to D-Bus implementation) 00003 * 00004 * Copyright (C) 2002, 2003 Red Hat, Inc. 00005 * Copyright (C) 2003 CodeFactory AB 00006 * 00007 * Licensed under the Academic Free License version 2.1 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00022 * 00023 */ 00024 00025 #ifndef DBUS_FILE_H 00026 #define DBUS_FILE_H 00027 00028 //#include <dbus/dbus-types.h> 00029 #include <dbus/dbus-string.h> 00030 #include <dbus/dbus-errors.h> 00031 00032 DBUS_BEGIN_DECLS 00033 00042 dbus_bool_t _dbus_file_exists (const char *file); 00043 DBUS_PRIVATE_EXPORT 00044 dbus_bool_t _dbus_file_get_contents (DBusString *str, 00045 const DBusString *filename, 00046 DBusError *error); 00047 dbus_bool_t _dbus_string_save_to_file (const DBusString *str, 00048 const DBusString *filename, 00049 dbus_bool_t world_readable, 00050 DBusError *error); 00051 00052 dbus_bool_t _dbus_make_file_world_readable (const DBusString *filename, 00053 DBusError *error); 00054 00055 dbus_bool_t _dbus_create_file_exclusively (const DBusString *filename, 00056 DBusError *error); 00057 DBUS_PRIVATE_EXPORT 00058 dbus_bool_t _dbus_delete_file (const DBusString *filename, 00059 DBusError *error); 00060 00063 DBUS_END_DECLS 00064 00065 #endif