diff options
author | Jan Lipovsky <janlipovsky@gmail.com> | 2010-05-28 13:59:28 +0200 |
---|---|---|
committer | Jan Lipovsky <janlipovsky@gmail.com> | 2010-05-28 13:59:28 +0200 |
commit | ba2bbc75e63b968d03da1094fcb8f28a1f734b39 (patch) | |
tree | b2c56735780032dab543167bafd3139f7f73903e /sfshare-gui/dbus_client.h | |
parent | b282327da5b515ce3288b1084bf1e21cf01c49af (diff) | |
download | sfshare-master.tar.gz sfshare-master.tar.xz sfshare-master.zip |
Diffstat (limited to 'sfshare-gui/dbus_client.h')
-rwxr-xr-x | sfshare-gui/dbus_client.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/sfshare-gui/dbus_client.h b/sfshare-gui/dbus_client.h new file mode 100755 index 0000000..9a81ee8 --- /dev/null +++ b/sfshare-gui/dbus_client.h @@ -0,0 +1,48 @@ +/* + * dbus_client.c + * + * 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 library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Author: Jan Lipovsky <janlipovsky@gmail.com> + */ + +#ifndef DBUS_SERVICE_H +#define DBUS_SERVICE_H + +/** Call daemon D-Bus methot get_share_status */ +int dbus_sfshare_get_share (const gchar *path, gchar ***result); +/** Async call daemon D-Bus methot setup_share */ +void dbus_sfshare_set_share (const gchar *name, const gchar *path, const gchar *comment, const gchar *read_only, const gchar *guest_ok); +/** Async call daemon D-Bus methot delete_share */ +void dbus_sfshare_delete_share (const gchar *path); +/** Connect to DBUS */ +void dbus_sfshare_connect ( void ); +/** Disconnect from DBUS - free object */ +void dbus_sfshare_disconnect ( void ); + + +#define ACTION_ID_SETUP_SHARE "org.fedoraproject.SimpleFileShare.setup_share" +#define ASTION_ID_DELETE_SHARE "org.fedoraproject.SimpleFileShare.delete_share" + +/** Check privileges vie PolicyKit */ +void polkit_sfshare_check (const gchar *action_id); +/** Get Polkit Authority */ +void polkit_sfshare_init(); +/** Free Polkit objects */ +void polkit_sfshare_free(); + + +#endif + |