2019-09-10 11:19:01 +02:00
|
|
|
// SPDX-License-Identifier: LGPL-2.1+
|
2014-07-24 08:53:33 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright 2008 - 2011 Red Hat, Inc.
|
|
|
|
|
*/
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#ifndef __NM_OBJECT_PRIVATE_H__
|
|
|
|
|
#define __NM_OBJECT_PRIVATE_H__
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2018-01-02 13:37:06 +01:00
|
|
|
#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_PRIVATE)
|
|
|
|
|
#error Cannot use this header.
|
|
|
|
|
#endif
|
|
|
|
|
|
2014-07-24 08:53:33 -04:00
|
|
|
#include "nm-object.h"
|
|
|
|
|
|
2014-09-10 13:51:53 -04:00
|
|
|
typedef gboolean (*PropertyMarshalFunc) (NMObject *, GParamSpec *, GVariant *, gpointer);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2014-09-10 13:51:53 -04:00
|
|
|
typedef GObject * (*NMObjectCreatorFunc) (GDBusConnection *, const char *);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
const char *name;
|
|
|
|
|
gpointer field;
|
|
|
|
|
PropertyMarshalFunc func;
|
|
|
|
|
GType object_type;
|
|
|
|
|
const char *signal_prefix;
|
|
|
|
|
} NMPropertiesInfo;
|
|
|
|
|
|
|
|
|
|
void _nm_object_register_properties (NMObject *object,
|
2014-08-18 14:17:52 -04:00
|
|
|
const char *interface,
|
2014-07-24 08:53:33 -04:00
|
|
|
const NMPropertiesInfo *info);
|
|
|
|
|
|
|
|
|
|
void _nm_object_queue_notify (NMObject *object, const char *property);
|
|
|
|
|
|
2016-10-18 16:35:07 +02:00
|
|
|
GDBusObjectManager *_nm_object_get_dbus_object_manager (NMObject *object);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2016-10-18 16:35:07 +02:00
|
|
|
GQuark _nm_object_obj_nm_quark (void);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2016-10-18 16:35:07 +02:00
|
|
|
/* DBus property accessors */
|
2014-07-24 08:53:33 -04:00
|
|
|
|
|
|
|
|
void _nm_object_set_property (NMObject *object,
|
|
|
|
|
const char *interface,
|
|
|
|
|
const char *prop_name,
|
2014-09-10 13:51:53 -04:00
|
|
|
const char *format_string,
|
|
|
|
|
...);
|
2014-07-24 08:53:33 -04:00
|
|
|
|
2014-09-10 13:51:53 -04:00
|
|
|
GDBusProxy *_nm_object_get_proxy (NMObject *object,
|
2014-08-18 14:17:52 -04:00
|
|
|
const char *interface);
|
|
|
|
|
|
2017-03-20 12:27:17 +01:00
|
|
|
struct udev;
|
|
|
|
|
void _nm_device_set_udev (NMDevice *device, struct udev *udev);
|
|
|
|
|
|
all: fix up multiple-include-guard defines
Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
guard, which meant that nm-test-utils.h could not tell which of them
was being included (and so, eg, if you tried to include
nm-ip4-config.h in a libnm test, it would fail to compile because
nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
Fix this by changing the include guards in the non-API-stable parts of
the tree:
- libnm-glib/nm-ip4-config.h remains NM_IP4_CONFIG_H
- libnm/nm-ip4-config.h now uses __NM_IP4_CONFIG_H__
- src/nm-ip4-config.h now uses __NETWORKMANAGER_IP4_CONFIG_H__
And likewise for all other headers.
The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
__NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
consistent with the general scheme, do still mostly make sense in
isolation.
2014-08-13 14:10:11 -04:00
|
|
|
#endif /* __NM_OBJECT_PRIVATE_H__ */
|