blob: ec93d99e5b9813aa7f89a365a7dc0b19591b2310 (
plain) (
blame)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
#ifndef GNUNET_DBUS_LIB_OBJECT_PATH_H
#define GNUNET_DBUS_LIB_OBJECT_PATH_H
#include "gnunet_dbus_lib_object.h"
/**
* Represents a path of DBus objects in service's object namespace. eg.
* /org/freedesktop/PolicyKit1/Authority
*/
struct GNUNET_DBUS_ObjectPath;
/**
* Create an object path from a GNUNET_DBUS_Service and a list of
* GNUNET_DBUS_Object. The last item in the list must be NULL.
* For example, to create the path to the
* /org/freedesktop/PolicyKit1/Authority1 object you would call as:
*
* GNUNET_DBUS_object_path_create(policy_kit_service_object,
* org_object,
* freedesktop_object,
* PolicyKit1_object,
* Authority_object,
* NULL);
*/
struct GNUNET_DBUS_ObjectPath *
GNUNET_DBUS_object_path_create (
struct GNUNET_DBUS_Service *service,
...)
__attribute__((sentinel));
/**
* Increase the reference count of this GNUNET_DBUS_ObjectPath by one.
*/
void
GNUNET_DBUS_object_path_ref (
struct GNUNET_DBUS_ObjectPath *path);
/**
* Decrease the reference count of this GNUNET_DBUS_ObjectPath by one. Will
* free the GNUNET_DBUS_ObjectPath if the reference count reaches zero.
*/
void
GNUNET_DBUS_object_path_unref (
struct GNUNET_DBUS_ObjectPath *path);
/**
* Format the GNUNET_DBUS_ObjectPath as a string. eg.
* "/org/freedesktop/PolicyKit1/Authority1".
*/
char *
GNUNET_DBUS_object_path_to_string (
const struct GNUNET_DBUS_ObjectPath *path);
/**
* Get the destination object of this path. ie. the final object in the path.
*/
struct GNUNET_DBUS_Object *
GNUNET_DBUS_object_path_get_destination (
const struct GNUNET_DBUS_ObjectPath *path);
#endif
|