summary refs log tree commit diff
path: root/libnm-glib/nm-remote-connection.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-01-22 00:29:39 +0100
committerMichael Biebl <biebl@debian.org>2015-01-22 00:29:39 +0100
commit2c032d8f1c6292c1338a615e6ec40252889ba85c (patch)
tree1f77182220b2b0264288ba4a476ab47e5bc48716 /libnm-glib/nm-remote-connection.c
parent33491bc4279481db8ae47213e34a6d695a0e8830 (diff)
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'libnm-glib/nm-remote-connection.c')
-rw-r--r--libnm-glib/nm-remote-connection.c67
1 files changed, 36 insertions, 31 deletions
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index 38911a43..3a70e81e 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -1,7 +1,5 @@
 /* -*- 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
@@ -17,13 +15,15 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2011 Red Hat, Inc.
+ * Copyright 2007 - 2008 Novell, Inc.
+ * Copyright 2007 - 2011 Red Hat, Inc.
  */
 
+#include "config.h"
+
 #include <string.h>
 #include <gio/gio.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
 
 #include <NetworkManager.h>
 #include <nm-utils.h>
@@ -70,13 +70,13 @@ typedef struct RemoteCall RemoteCall;
 typedef void (*RemoteCallFetchResultCb) (RemoteCall *call, DBusGProxyCall *proxy_call, GError *error);
 
 
-typedef struct RemoteCall {
+struct RemoteCall {
 	NMRemoteConnection *self;
 	DBusGProxyCall *call;
 	RemoteCallFetchResultCb fetch_result_cb;
 	GFunc callback;
 	gpointer user_data;
-} RemoteCall;
+};
 
 typedef struct {
 	DBusGConnection *bus;
@@ -125,7 +125,7 @@ _nm_remote_connection_ensure_inited (NMRemoteConnection *self)
 			 */
 			if (!g_error_matches (error, DBUS_GERROR, DBUS_GERROR_NO_REPLY)) {
 				g_warning ("%s: (NMRemoteConnection) error initializing: %s\n",
-					       __func__, error->message);
+				           __func__, error->message);
 			}
 			g_error_free (error);
 		}
@@ -712,8 +712,8 @@ init_get_settings_cb (DBusGProxy *proxy,
 
 static void
 init_async (GAsyncInitable *initable, int io_priority,
-			GCancellable *cancellable, GAsyncReadyCallback callback,
-			gpointer user_data)
+            GCancellable *cancellable, GAsyncReadyCallback callback,
+            gpointer user_data)
 {
 	NMRemoteConnectionInitData *init_data;
 	NMRemoteConnectionPrivate *priv = NM_REMOTE_CONNECTION_GET_PRIVATE (initable);
@@ -864,29 +864,34 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
 	object_class->constructed = constructed;
 
 	/* Properties */
+	/**
+	 * NMRemoteConnection:bus:
+	 *
+	 * The #DBusGConnection that the #NMRemoteConnection is connected to.
+	 */
 	g_object_class_install_property
 		(object_class, PROP_BUS,
-		 g_param_spec_boxed (NM_REMOTE_CONNECTION_BUS,
-							 "DBusGConnection",
-							 "DBusGConnection",
-							 DBUS_TYPE_G_CONNECTION,
-							 G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+		 g_param_spec_boxed (NM_REMOTE_CONNECTION_BUS, "", "",
+		                     DBUS_TYPE_G_CONNECTION,
+		                     G_PARAM_WRITABLE |
+		                     G_PARAM_CONSTRUCT_ONLY |
+		                     G_PARAM_STATIC_STRINGS));
 
 	/* These are needed so _nm_object_create() can create NMRemoteConnections */
 	g_object_class_install_property
 		(object_class, PROP_DBUS_CONNECTION,
-		 g_param_spec_boxed (NM_REMOTE_CONNECTION_DBUS_CONNECTION,
-		                     "DBusGConnection",
-		                     "DBusGConnection",
+		 g_param_spec_boxed (NM_REMOTE_CONNECTION_DBUS_CONNECTION, "", "",
 		                     DBUS_TYPE_G_CONNECTION,
-		                     G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+		                     G_PARAM_WRITABLE |
+		                     G_PARAM_CONSTRUCT_ONLY |
+		                     G_PARAM_STATIC_STRINGS));
 	g_object_class_install_property
 		(object_class, PROP_DBUS_PATH,
-		 g_param_spec_string (NM_REMOTE_CONNECTION_DBUS_PATH,
-		                      "Object Path",
-		                      "DBus Object Path",
+		 g_param_spec_string (NM_REMOTE_CONNECTION_DBUS_PATH, "", "",
 		                      NULL,
-		                      G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
+		                      G_PARAM_WRITABLE |
+		                      G_PARAM_CONSTRUCT_ONLY |
+		                      G_PARAM_STATIC_STRINGS));
 
 	/**
 	 * NMRemoteConnection:unsaved:
@@ -896,12 +901,12 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
 	 *
 	 * Since: 0.9.10
 	 **/
-	g_object_class_install_property (object_class, PROP_UNSAVED,
-		 g_param_spec_boolean (NM_REMOTE_CONNECTION_UNSAVED,
-		                       "Unsaved",
-		                       "Unsaved",
+	g_object_class_install_property
+		(object_class, PROP_UNSAVED,
+		 g_param_spec_boolean (NM_REMOTE_CONNECTION_UNSAVED, "", "",
 		                       FALSE,
-		                       G_PARAM_READABLE));
+		                       G_PARAM_READABLE |
+		                       G_PARAM_STATIC_STRINGS));
 
 	/* Signals */
 	/**
@@ -911,7 +916,7 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
 	 * This signal is emitted when a connection changes, and it is
 	 * still visible to the user.
 	 */
-	signals[UPDATED] = 
+	signals[UPDATED] =
 		g_signal_new (NM_REMOTE_CONNECTION_UPDATED,
 		              G_TYPE_FROM_CLASS (remote_class),
 		              G_SIGNAL_RUN_FIRST,
@@ -927,12 +932,12 @@ nm_remote_connection_class_init (NMRemoteConnectionClass *remote_class)
 	 * This signal is emitted when a connection is either deleted or becomes
 	 * invisible to the current user.
 	 */
-	signals[REMOVED] = 
+	signals[REMOVED] =
 		g_signal_new (NM_REMOTE_CONNECTION_REMOVED,
 		              G_TYPE_FROM_CLASS (remote_class),
 		              G_SIGNAL_RUN_FIRST,
 		              G_STRUCT_OFFSET (NMRemoteConnectionClass, removed),
-	 	              NULL, NULL,
+		              NULL, NULL,
 		              g_cclosure_marshal_VOID__VOID,
 		              G_TYPE_NONE, 0);