summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-object.h
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2012-04-24 16:23:27 +0200
committerJiří Klimeš <jklimes@redhat.com>2012-04-25 16:39:17 +0200
commit7c7e8dc6929a2c9c7917ac24f391a920f716451e (patch)
treebbd6eed1f4e7f10220be7a85f7cecd87bcb61ecd /libnm-glib/nm-object.h
parentf4419c9fb3e4b70cef995b7b748173c44a10f104 (diff)
downloadNetworkManager-7c7e8dc6929a2c9c7917ac24f391a920f716451e.tar.gz
libnm-glib: add "object-creation-failed" signal to NMObject
The signal is private for libnm-glib and should not be used externally. It is emitted when there's an error while creating an object. In addition, this commit makes use of the signal in NMClient to ensure that the callbacks are always called for nm_client_activate_connection() and nm_client_add_and_activate_connection().
Diffstat (limited to 'libnm-glib/nm-object.h')
-rw-r--r--libnm-glib/nm-object.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/libnm-glib/nm-object.h b/libnm-glib/nm-object.h
index 3f7b36cff3..267c7148f4 100644
--- a/libnm-glib/nm-object.h
+++ b/libnm-glib/nm-object.h
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
- * Copyright (C) 2007 - 2008 Red Hat, Inc.
+ * Copyright (C) 2007 - 2012 Red Hat, Inc.
*/
#ifndef NM_OBJECT_H
@@ -37,6 +37,22 @@ G_BEGIN_DECLS
#define NM_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_OBJECT))
#define NM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OBJECT, NMObjectClass))
+/**
+ * NMObjectError:
+ * @NM_OBJECT_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_OBJECT_ERROR_OBJECT_CREATION_FAILURE: an error ocured while creating an #NMObject
+ *
+ * Describes errors that may result from operations involving a #NMObject.
+ *
+ **/
+typedef enum {
+ NM_OBJECT_ERROR_UNKNOWN = 0,
+ NM_OBJECT_ERROR_OBJECT_CREATION_FAILURE,
+} NMObjectError;
+
+#define NM_OBJECT_ERROR nm_object_error_quark ()
+GQuark nm_object_error_quark (void);
+
#define NM_OBJECT_DBUS_CONNECTION "dbus-connection"
#define NM_OBJECT_DBUS_PATH "dbus-path"
@@ -47,6 +63,15 @@ typedef struct {
typedef struct {
GObjectClass parent;
+ /* Signals */
+ /* The "object-creation-failed" signal is PRIVATE for libnm-glib and
+ * is not meant for any external usage. It indicates that an error
+ * occured during creation of an object.
+ */
+ void (*object_creation_failed) (NMObject *master_object,
+ GError *error,
+ char *failed_path);
+
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);