Commit 4d1681ef authored by Daniel Gnoutcheff's avatar Daniel Gnoutcheff

libnm-glib: merge nm-remote-settings{,-system}

Originally, nm-remote-settings was used by the daemon to monitor the
user settings service, and its subclass nm-remote-settings-system was
used by NM clients to monitor the system settings service. With user
settings services gone, this distinction is no longer needed. Simplify
things a bit and merge the classes.
parent 215640c5
......@@ -45,7 +45,6 @@
#include <nm-device-bt.h>
//#include <nm-device-olpc-mesh.h>
#include <nm-remote-settings.h>
#include <nm-remote-settings-system.h>
#include <nm-settings-interface.h>
#include <nm-settings-connection-interface.h>
#include <nm-vpn-connection.h>
......@@ -1529,7 +1528,7 @@ do_connections (NmCli *nmc, int argc, char **argv)
}
/* get system settings */
if (!(nmc->system_settings = nm_remote_settings_system_new (bus))) {
if (!(nmc->system_settings = nm_remote_settings_new (bus))) {
g_string_printf (nmc->return_text, _("Error: Could not get system settings."));
nmc->return_value = NMC_RESULT_ERROR_UNKNOWN;
return nmc->return_value;
......
......@@ -35,7 +35,6 @@
#include <nm-client.h>
#include <nm-setting-connection.h>
#include <nm-remote-settings.h>
#include <nm-remote-settings-system.h>
#include <nm-settings-interface.h>
#include <nm-settings-connection-interface.h>
......
......@@ -24,7 +24,6 @@
#include <nm-client.h>
#include <nm-remote-settings.h>
#include <nm-remote-settings-system.h>
/* nmcli exit codes */
typedef enum {
......@@ -92,7 +91,7 @@ typedef struct _NmCli {
int timeout; /* Operation timeout */
NMRemoteSettingsSystem *system_settings; /* System settings */
NMRemoteSettings *system_settings; /* System settings */
gboolean system_settings_running; /* Is system settings service running? */
GSList *system_connections; /* List of system connections */
......
......@@ -31,7 +31,6 @@
<xi:include href="xml/nm-object.xml"/>
<xi:include href="xml/nm-remote-connection.xml"/>
<xi:include href="xml/nm-remote-settings.xml"/>
<xi:include href="xml/nm-remote-settings-system.xml"/>
<xi:include href="xml/nm-settings-connection-interface.xml"/>
<xi:include href="xml/nm-settings-interface.xml"/>
<xi:include href="xml/nm-settings-service.xml"/>
......
......@@ -81,7 +81,6 @@ libnminclude_HEADERS = \
nm-settings-interface.h \
nm-settings-system-interface.h \
nm-remote-settings.h \
nm-remote-settings-system.h \
nm-settings-connection-interface.h \
nm-exported-connection.h
......@@ -115,7 +114,6 @@ libnm_glib_la_SOURCES = \
nm-settings-interface.c \
nm-settings-system-interface.c \
nm-remote-settings.c \
nm-remote-settings-system.c \
nm-settings-connection-interface.c \
nm-exported-connection.c
......
......@@ -123,8 +123,6 @@ global:
nm_remote_connection_new;
nm_remote_settings_get_type;
nm_remote_settings_new;
nm_remote_settings_system_get_type;
nm_remote_settings_system_new;
nm_serial_device_get_bytes_received;
nm_serial_device_get_bytes_sent;
nm_serial_device_get_type;
......
This diff is collapsed.
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
* libnm_glib -- Access network status & information from glib applications
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 Novell, Inc.
* Copyright (C) 2009 Red Hat, Inc.
*/
#ifndef NM_REMOTE_SETTINGS_SYSTEM_H
#define NM_REMOTE_SETTINGS_SYSTEM_H
#include <glib.h>
#include <dbus/dbus-glib.h>
#include "nm-remote-settings.h"
#include "nm-settings-system-interface.h"
G_BEGIN_DECLS
#define NM_TYPE_REMOTE_SETTINGS_SYSTEM (nm_remote_settings_system_get_type ())
#define NM_REMOTE_SETTINGS_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_REMOTE_SETTINGS_SYSTEM, NMRemoteSettingsSystem))
#define NM_REMOTE_SETTINGS_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_REMOTE_SETTINGS_SYSTEM, NMRemoteSettingsSystemClass))
#define NM_IS_REMOTE_SETTINGS_SYSTEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_REMOTE_SETTINGS_SYSTEM))
#define NM_IS_REMOTE_SETTINGS_SYSTEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_REMOTE_SETTINGS_SYSTEM))
#define NM_REMOTE_SETTINGS_SYSTEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_REMOTE_SETTINGS_SYSTEM, NMRemoteSettingsSystemClass))
typedef struct {
NMRemoteSettings parent;
} NMRemoteSettingsSystem;
typedef struct {
NMRemoteSettingsClass parent;
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
} NMRemoteSettingsSystemClass;
GType nm_remote_settings_system_get_type (void);
NMRemoteSettingsSystem *nm_remote_settings_system_new (DBusGConnection *bus);
G_END_DECLS
#endif /* NM_REMOTE_SETTINGS_SYSTEM_H */
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment