mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-27 17:30:42 +01:00
core: add NM_UTILS_ERROR
This commit is contained in:
parent
383997306d
commit
9a127cd424
2 changed files with 23 additions and 0 deletions
|
|
@ -59,6 +59,8 @@
|
|||
#define CLOCK_BOOTTIME 7
|
||||
#endif
|
||||
|
||||
G_DEFINE_QUARK (nm-utils-error-quark, nm_utils_error)
|
||||
|
||||
G_STATIC_ASSERT (sizeof (NMUtilsTestFlags) <= sizeof (int));
|
||||
int _nm_utils_testing = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -232,4 +232,25 @@ gboolean nm_utils_get_testing_initialized (void);
|
|||
NMUtilsTestFlags nm_utils_get_testing (void);
|
||||
void _nm_utils_set_testing (NMUtilsTestFlags flags);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* NMUtilsError:
|
||||
* @NM_UTILS_ERROR_UNKNOWN: unknown or unclassified error
|
||||
* @NM_UTILS_ERROR_CANCELLED_DISPOSING: when disposing an object that has
|
||||
* pending aynchronous operations, the operation is cancelled with this
|
||||
* error reason. Depending on the usage, this might indicate a bug because
|
||||
* usually the target object should stay alive as long as there are pending
|
||||
* operations.
|
||||
*/
|
||||
typedef enum {
|
||||
NM_UTILS_ERROR_UNKNOWN = 0, /*< nick=Unknown >*/
|
||||
NM_UTILS_ERROR_CANCELLED_DISPOSING, /*< nick=CancelledDisposing >*/
|
||||
} NMUtilsError;
|
||||
|
||||
#define NM_UTILS_ERROR (nm_utils_error_quark ())
|
||||
GQuark nm_utils_error_quark (void);
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#endif /* __NETWORKMANAGER_UTILS_H__ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue