mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-18 02:40:40 +02:00
libnm: consistently use "INTERFACE" rather than "IFACE" in macros
Most D-Bus interface name macros used "INTERFACE" in their name (eg, NM_DBUS_INTERFACE), but a few used "IFACE" instead (eg, NM_DBUS_IFACE_SETTINGS). Make them consistent.
This commit is contained in:
parent
3ac0f52878
commit
f441cf2b90
14 changed files with 29 additions and 29 deletions
|
|
@ -28,8 +28,8 @@
|
|||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
#include <dbus/dbus-glib.h>
|
||||
|
||||
#define NM_AVAHI_AUTOIPD_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
|
||||
#define NM_AVAHI_AUTOIPD_DBUS_IFACE "org.freedesktop.nm_avahi_autoipd"
|
||||
#define NM_AVAHI_AUTOIPD_DBUS_SERVICE "org.freedesktop.nm_avahi_autoipd"
|
||||
#define NM_AVAHI_AUTOIPD_DBUS_INTERFACE "org.freedesktop.nm_avahi_autoipd"
|
||||
|
||||
static DBusConnection *
|
||||
dbus_init (void)
|
||||
|
|
@ -113,7 +113,7 @@ main (int argc, char *argv[])
|
|||
if (connection == NULL)
|
||||
exit (1);
|
||||
|
||||
message = dbus_message_new_signal ("/", NM_AVAHI_AUTOIPD_DBUS_IFACE, "Event");
|
||||
message = dbus_message_new_signal ("/", NM_AVAHI_AUTOIPD_DBUS_INTERFACE, "Event");
|
||||
if (message == NULL) {
|
||||
fprintf (stderr, "Error: not enough memory to send autoip Event signal.\n");
|
||||
exit (1);
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@
|
|||
#define DISPATCHER_TYPE_RESULT (dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_INVALID))
|
||||
#define DISPATCHER_TYPE_RESULT_ARRAY (dbus_g_type_get_collection ("GPtrArray", DISPATCHER_TYPE_RESULT))
|
||||
|
||||
#define NM_DISPATCHER_DBUS_SERVICE "org.freedesktop.nm_dispatcher"
|
||||
#define NM_DISPATCHER_DBUS_IFACE "org.freedesktop.nm_dispatcher"
|
||||
#define NM_DISPATCHER_DBUS_PATH "/org/freedesktop/nm_dispatcher"
|
||||
#define NM_DISPATCHER_DBUS_SERVICE "org.freedesktop.nm_dispatcher"
|
||||
#define NM_DISPATCHER_DBUS_INTERFACE "org.freedesktop.nm_dispatcher"
|
||||
#define NM_DISPATCHER_DBUS_PATH "/org/freedesktop/nm_dispatcher"
|
||||
|
||||
#define NMD_CONNECTION_PROPS_PATH "path"
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ int main (int argc, char *argv[])
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS);
|
||||
NM_DBUS_INTERFACE_SETTINGS);
|
||||
|
||||
/* Add a connection */
|
||||
add_connection (proxy, "__Test connection__");
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ print_connection (DBusGConnection *bus, const char *path)
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
path,
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION);
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION);
|
||||
g_assert (proxy);
|
||||
|
||||
/* Request the all the configuration of the Connection */
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ int main (int argc, char *argv[])
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS);
|
||||
NM_DBUS_INTERFACE_SETTINGS);
|
||||
|
||||
/* List connections of system settings service */
|
||||
list_connections (proxy);
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ int main() {
|
|||
QDBusInterface interface(
|
||||
NM_DBUS_SERVICE,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS,
|
||||
NM_DBUS_INTERFACE_SETTINGS,
|
||||
QDBusConnection::systemBus());
|
||||
|
||||
addConnection(interface, "__Test connection__");
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const QString getConnection(const QString& connectionUuid, Connection *found_con
|
|||
QDBusInterface interface(
|
||||
NM_DBUS_SERVICE,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS,
|
||||
NM_DBUS_INTERFACE_SETTINGS,
|
||||
QDBusConnection::systemBus());
|
||||
|
||||
// Get connection list and find the connection with 'connectionUuid'
|
||||
|
|
@ -71,7 +71,7 @@ const QString getConnection(const QString& connectionUuid, Connection *found_con
|
|||
ifaceForSettings = new QDBusInterface(
|
||||
NM_DBUS_SERVICE,
|
||||
connection.path(),
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION,
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION,
|
||||
QDBusConnection::systemBus());
|
||||
QDBusReply<Connection> result2 = ifaceForSettings->call("GetSettings");
|
||||
delete ifaceForSettings;
|
||||
|
|
@ -120,7 +120,7 @@ void changeConnection(const QString& uuid)
|
|||
QDBusInterface interface(
|
||||
NM_DBUS_SERVICE,
|
||||
conPath,
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION,
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION,
|
||||
QDBusConnection::systemBus());
|
||||
|
||||
// Call Update() D-Bus method to update connection
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ int main() {
|
|||
QDBusInterface interface(
|
||||
NM_DBUS_SERVICE,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS,
|
||||
NM_DBUS_INTERFACE_SETTINGS,
|
||||
QDBusConnection::systemBus());
|
||||
|
||||
listConnections(interface);
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@
|
|||
#define NM_DBUS_INTERFACE_DEVICE_GRE NM_DBUS_INTERFACE_DEVICE ".Gre"
|
||||
|
||||
|
||||
#define NM_DBUS_IFACE_SETTINGS "org.freedesktop.NetworkManager.Settings"
|
||||
#define NM_DBUS_INTERFACE_SETTINGS "org.freedesktop.NetworkManager.Settings"
|
||||
#define NM_DBUS_PATH_SETTINGS "/org/freedesktop/NetworkManager/Settings"
|
||||
|
||||
#define NM_DBUS_IFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection"
|
||||
#define NM_DBUS_INTERFACE_SETTINGS_CONNECTION "org.freedesktop.NetworkManager.Settings.Connection"
|
||||
#define NM_DBUS_PATH_SETTINGS_CONNECTION "/org/freedesktop/NetworkManager/Settings/Connection"
|
||||
#define NM_DBUS_IFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManager.Settings.Connection.Secrets"
|
||||
#define NM_DBUS_INTERFACE_SETTINGS_CONNECTION_SECRETS "org.freedesktop.NetworkManager.Settings.Connection.Secrets"
|
||||
|
||||
#define NM_DBUS_INTERFACE_AGENT_MANAGER NM_DBUS_INTERFACE ".AgentManager"
|
||||
#define NM_DBUS_PATH_AGENT_MANAGER "/org/freedesktop/NetworkManager/AgentManager"
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ constructed (GObject *object)
|
|||
|
||||
priv->proxy = _nm_dbus_new_proxy_for_connection (priv->bus,
|
||||
nm_connection_get_path (NM_CONNECTION (object)),
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION);
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION);
|
||||
g_assert (priv->proxy);
|
||||
dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT);
|
||||
|
||||
|
|
@ -625,7 +625,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
|||
/* Get properties */
|
||||
hash = NULL;
|
||||
if (!dbus_g_proxy_call (priv->props_proxy, "GetAll", error,
|
||||
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS_CONNECTION,
|
||||
G_TYPE_STRING, NM_DBUS_INTERFACE_SETTINGS_CONNECTION,
|
||||
G_TYPE_INVALID,
|
||||
DBUS_TYPE_G_MAP_OF_VARIANT, &hash,
|
||||
G_TYPE_INVALID))
|
||||
|
|
@ -698,7 +698,7 @@ init_get_settings_cb (DBusGProxy *proxy,
|
|||
/* Grab properties */
|
||||
dbus_g_proxy_begin_call (priv->props_proxy, "GetAll",
|
||||
init_async_got_properties, init_data, NULL,
|
||||
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS_CONNECTION,
|
||||
G_TYPE_STRING, NM_DBUS_INTERFACE_SETTINGS_CONNECTION,
|
||||
G_TYPE_INVALID);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1014,7 +1014,7 @@ name_owner_changed (DBusGProxy *proxy,
|
|||
|
||||
dbus_g_proxy_begin_call (priv->props_proxy, "GetAll",
|
||||
nm_appeared_got_properties, self, NULL,
|
||||
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
|
||||
G_TYPE_STRING, NM_DBUS_INTERFACE_SETTINGS,
|
||||
G_TYPE_INVALID);
|
||||
} else {
|
||||
priv->service_running = FALSE;
|
||||
|
|
@ -1179,7 +1179,7 @@ constructed (GObject *object)
|
|||
|
||||
priv->proxy = _nm_dbus_new_proxy_for_connection (priv->bus,
|
||||
NM_DBUS_PATH_SETTINGS,
|
||||
NM_DBUS_IFACE_SETTINGS);
|
||||
NM_DBUS_INTERFACE_SETTINGS);
|
||||
g_assert (priv->proxy);
|
||||
dbus_g_proxy_set_default_timeout (priv->proxy, G_MAXINT);
|
||||
|
||||
|
|
@ -1242,7 +1242,7 @@ init_sync (GInitable *initable, GCancellable *cancellable, GError **error)
|
|||
|
||||
/* Get properties */
|
||||
if (!dbus_g_proxy_call (priv->props_proxy, "GetAll", error,
|
||||
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
|
||||
G_TYPE_STRING, NM_DBUS_INTERFACE_SETTINGS,
|
||||
G_TYPE_INVALID,
|
||||
DBUS_TYPE_G_MAP_OF_VARIANT, &props,
|
||||
G_TYPE_INVALID))
|
||||
|
|
@ -1313,7 +1313,7 @@ init_get_properties (NMRemoteSettingsInitData *init_data)
|
|||
|
||||
dbus_g_proxy_begin_call (priv->props_proxy, "GetAll",
|
||||
init_async_got_properties, init_data, NULL,
|
||||
G_TYPE_STRING, NM_DBUS_IFACE_SETTINGS,
|
||||
G_TYPE_STRING, NM_DBUS_INTERFACE_SETTINGS,
|
||||
G_TYPE_INVALID);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ test_make_invisible (void)
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
path,
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION);
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION);
|
||||
g_assert (proxy != NULL);
|
||||
|
||||
/* Bypass the NMRemoteSettings object so we can test it independently */
|
||||
|
|
@ -221,7 +221,7 @@ test_make_visible (void)
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
path,
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION);
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION);
|
||||
g_assert (proxy != NULL);
|
||||
|
||||
/* Bypass the NMRemoteSettings object so we can test it independently */
|
||||
|
|
@ -304,7 +304,7 @@ test_remove_connection (void)
|
|||
proxy = dbus_g_proxy_new_for_name (bus,
|
||||
NM_DBUS_SERVICE,
|
||||
path,
|
||||
NM_DBUS_IFACE_SETTINGS_CONNECTION);
|
||||
NM_DBUS_INTERFACE_SETTINGS_CONNECTION);
|
||||
g_assert (proxy != NULL);
|
||||
|
||||
/* Bypass the NMRemoteSettings object so we can test it independently */
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ _dispatcher_call (DispatcherAction action,
|
|||
proxy = dbus_g_proxy_new_for_name (g_connection,
|
||||
NM_DISPATCHER_DBUS_SERVICE,
|
||||
NM_DISPATCHER_DBUS_PATH,
|
||||
NM_DISPATCHER_DBUS_IFACE);
|
||||
NM_DISPATCHER_DBUS_INTERFACE);
|
||||
if (!proxy) {
|
||||
nm_log_err (LOGD_DISPATCH, "(%u) could not get dispatcher proxy!", reqid);
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -2032,7 +2032,7 @@ nm_settings_class_init (NMSettingsClass *class)
|
|||
G_TYPE_NONE, 1, G_TYPE_OBJECT);
|
||||
|
||||
dbus_g_error_domain_register (NM_SETTINGS_ERROR,
|
||||
NM_DBUS_IFACE_SETTINGS,
|
||||
NM_DBUS_INTERFACE_SETTINGS,
|
||||
NM_TYPE_SETTINGS_ERROR);
|
||||
|
||||
/* And register all the settings errors with D-Bus */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue