blob: 9a81ee894d3b335f66d3bde1df97d1b8f6d5a97d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
|