device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm / nm-dbus-helpers.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2 /*
3  * This library is free software; you can redistribute it and/or
4  * modify it under the terms of the GNU Lesser General Public
5  * License as published by the Free Software Foundation; either
6  * version 2 of the License, or (at your option) any later version.
7  *
8  * This library 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 GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the
15  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301 USA.
17  *
18  * Copyright 2013 Red Hat, Inc.
19  */
20
21 #ifndef __NM_DBUS_HELPERS_PRIVATE_H__
22 #define __NM_DBUS_HELPERS_PRIVATE_H__
23
24
25 #include "nm-default.h"
26 #include "nm-dbus-compat.h"
27
28 GBusType _nm_dbus_bus_type (void);
29
30 GDBusConnection *_nm_dbus_new_connection        (GCancellable *cancellable,
31                                                  GError **error);
32
33 void             _nm_dbus_new_connection_async  (GCancellable *cancellable,
34                                                  GAsyncReadyCallback callback,
35                                                  gpointer user_data);
36 GDBusConnection *_nm_dbus_new_connection_finish (GAsyncResult *result,
37                                                  GError **error);
38
39 gboolean         _nm_dbus_is_connection_private (GDBusConnection *connection);
40
41 void        _nm_dbus_register_proxy_type             (const char *interface,
42                                                       GType proxy_type);
43 /* Guarantee that @interface is a static string */
44 #define _nm_dbus_register_proxy_type(interface, proxy_type) \
45         _nm_dbus_register_proxy_type (interface "", proxy_type) \
46
47 GDBusProxy *_nm_dbus_new_proxy_for_connection        (GDBusConnection *connection,
48                                                       const char *path,
49                                                       const char *interface,
50                                                       GCancellable *cancellable,
51                                                       GError **error);
52
53 void        _nm_dbus_new_proxy_for_connection_async  (GDBusConnection *connection,
54                                                       const char *path,
55                                                       const char *interface,
56                                                       GCancellable *cancellable,
57                                                       GAsyncReadyCallback callback,
58                                                       gpointer user_data);
59 GDBusProxy *_nm_dbus_new_proxy_for_connection_finish (GAsyncResult *result,
60                                                       GError **error);
61
62 void _nm_dbus_bind_properties (gpointer object,
63                                gpointer skeleton);
64
65 void _nm_dbus_bind_methods (gpointer object,
66                             gpointer skeleton,
67                             ...) G_GNUC_NULL_TERMINATED;
68
69 #endif /* __NM_DBUS_HELPERS_PRIVATE_H__ */