device: renew dhcp leases on awake for software devices
[NetworkManager.git] / shared / nm-dbus-compat.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16  *
17  * Copyright 2015 Red Hat, Inc.
18  */
19
20 #ifndef __NM_DBUS_COMPAT_H__
21 #define __NM_DBUS_COMPAT_H__
22
23 /* Copied from <dbus/dbus-shared.h> */
24
25 /* Bus names */
26
27 /** The bus name used to talk to the bus itself. */
28 #define DBUS_SERVICE_DBUS      "org.freedesktop.DBus"
29
30 /* Paths */
31 /** The object path used to talk to the bus itself. */
32 #define DBUS_PATH_DBUS  "/org/freedesktop/DBus"
33 /** The object path used in local/in-process-generated messages. */
34 #define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
35
36 /* Interfaces, these #define don't do much other than
37  * catch typos at compile time
38  */
39 /** The interface exported by the object with #DBUS_SERVICE_DBUS and #DBUS_PATH_DBUS */
40 #define DBUS_INTERFACE_DBUS           "org.freedesktop.DBus"
41 /** The interface supported by introspectable objects */
42 #define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
43 /** The interface supported by objects with properties */
44 #define DBUS_INTERFACE_PROPERTIES     "org.freedesktop.DBus.Properties"
45 /** The interface supported by most dbus peers */
46 #define DBUS_INTERFACE_PEER           "org.freedesktop.DBus.Peer"
47
48 /** This is a special interface whose methods can only be invoked
49  * by the local implementation (messages from remote apps aren't
50  * allowed to specify this interface).
51  */
52 #define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
53
54 /* Owner flags */
55 #define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 /**< Allow another service to become the primary owner if requested */
56 #define DBUS_NAME_FLAG_REPLACE_EXISTING  0x2 /**< Request to replace the current primary owner */
57 #define DBUS_NAME_FLAG_DO_NOT_QUEUE      0x4 /**< If we can not become the primary owner do not place us in the queue */
58
59 /* Replies to request for a name */
60 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER  1 /**< Service has become the primary owner of the requested name */
61 #define DBUS_REQUEST_NAME_REPLY_IN_QUEUE       2 /**< Service could not become the primary owner and has been placed in the queue */
62 #define DBUS_REQUEST_NAME_REPLY_EXISTS         3 /**< Service is already in the queue */
63 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER  4 /**< Service is already the primary owner */
64
65 /* Replies to releasing a name */
66 #define DBUS_RELEASE_NAME_REPLY_RELEASED        1 /**< Service was released from the given name */
67 #define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT    2 /**< The given name does not exist on the bus */
68 #define DBUS_RELEASE_NAME_REPLY_NOT_OWNER       3 /**< Service is not an owner of the given name */
69
70 /* Replies to service starts */
71 #define DBUS_START_REPLY_SUCCESS         1 /**< Service was auto started */
72 #define DBUS_START_REPLY_ALREADY_RUNNING 2 /**< Service was already running */
73
74 #endif  /* __NM_DBUS_COMPAT_H__ */