summaryrefslogtreecommitdiff
path: root/libnm/nm-client.h
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-20 14:03:30 -0400
committerDan Winship <danw@gnome.org>2014-10-22 08:29:10 -0400
commit388a0c5e784b4babd80b57f8a66250bd3db37262 (patch)
tree66cdb311d3429f7fda237560de19fca6dc458146 /libnm/nm-client.h
parent2ff4a7d4b0a7892fb08291d34e28df1cce31dbb9 (diff)
downloadNetworkManager-388a0c5e784b4babd80b57f8a66250bd3db37262.tar.gz
libnm: consolidate NMClientError and NMObjectError
Consolidate NMClientError and NMObjectError (such that there is now only one libnm-API-specific error domain). In particular, merge NM_CONNECTION_ERROR_CONNECTION_REMOVED with NM_OBJECT_ERROR_OBJECT_CREATION_FAILURE as the new NM_CONNECTION_ERROR_OBJECT_CREATION_FAILED. Also make object_creation_failed() be a plain method rather than a signal, since there's no reason for anyone to be connecting to it on another object. And remove its GError argument because the subclass can just create its own more-specific error.
Diffstat (limited to 'libnm/nm-client.h')
-rw-r--r--libnm/nm-client.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index 64bd0a0d32..2f22289c1f 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -131,21 +131,23 @@ typedef enum {
/**
* NMClientError:
- * @NM_CLIENT_ERROR_UNKNOWN: unknown or unclassified error
+ * @NM_CLIENT_ERROR_FAILED: unknown or unclassified error
* @NM_CLIENT_ERROR_MANAGER_NOT_RUNNING: an operation that requires NetworkManager
* failed because NetworkManager is not running
- * @NM_CLIENT_ERROR_CONNECTION_REMOVED: the #NMRemoteConnection object
- * was removed before it was completely initialized
- * @NM_CLIENT_ERROR_CONNECTION_UNAVAILABLE: the #NMRemoteConnection object
- * is not visible or otherwise unreadable
+ * @NM_CLIENT_ERROR_OBJECT_CREATION_FAILED: NetworkManager claimed that an
+ * operation succeeded, but the object that was allegedly created (eg,
+ * #NMRemoteConnection, #NMActiveConnection) was apparently destroyed before
+ * #NMClient could create a representation of it.
*
* Describes errors that may result from operations involving a #NMClient.
+ *
+ * D-Bus operations may also return errors from other domains, including
+ * #NMManagerError, #NMSettingsError, #NMAgentManagerError, and #NMConnectionError.
**/
typedef enum {
- NM_CLIENT_ERROR_UNKNOWN = 0, /*< nick=UnknownError >*/
- NM_CLIENT_ERROR_MANAGER_NOT_RUNNING, /*< nick=ManagerNotRunning >*/
- NM_CLIENT_ERROR_CONNECTION_REMOVED, /*< nick=ConnectionRemoved >*/
- NM_CLIENT_ERROR_CONNECTION_UNAVAILABLE, /*< nick=ConnectionUnavailable >*/
+ NM_CLIENT_ERROR_FAILED = 0,
+ NM_CLIENT_ERROR_MANAGER_NOT_RUNNING,
+ NM_CLIENT_ERROR_OBJECT_CREATION_FAILED,
} NMClientError;
#define NM_CLIENT_ERROR nm_client_error_quark ()