summary refs log tree commit diff
path: root/src/libnm-base
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-base')
-rw-r--r--src/libnm-base/meson.build1
-rw-r--r--src/libnm-base/nm-base.c11
-rw-r--r--src/libnm-base/nm-base.h16
3 files changed, 28 insertions, 0 deletions
diff --git a/src/libnm-base/meson.build b/src/libnm-base/meson.build
index 1bb61020..f4d977e9 100644
--- a/src/libnm-base/meson.build
+++ b/src/libnm-base/meson.build
@@ -3,6 +3,7 @@
 libnm_base = static_library(
   'nm-base',
   sources: files(
+    'nm-base.c',
     'nm-ethtool-base.c',
     'nm-net-aux.c',
     'nm-priv-helper-utils.c',
diff --git a/src/libnm-base/nm-base.c b/src/libnm-base/nm-base.c
new file mode 100644
index 00000000..f81b285c
--- /dev/null
+++ b/src/libnm-base/nm-base.c
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+#include "libnm-glib-aux/nm-default-glib-i18n-lib.h"
+
+#include "nm-base.h"
+
+/*****************************************************************************/
+
+NM_CACHED_QUARK_FCN("nm-crypto-error-quark", _nm_crypto_error_quark);
+
+/*****************************************************************************/
diff --git a/src/libnm-base/nm-base.h b/src/libnm-base/nm-base.h
index 0363e3b6..ff062a18 100644
--- a/src/libnm-base/nm-base.h
+++ b/src/libnm-base/nm-base.h
@@ -393,4 +393,20 @@ typedef struct {
 
 #define NM_BOND_PORT_QUEUE_ID_DEF 0
 
+/*****************************************************************************/
+
+/* NM_CRYPTO_ERROR is part of public API in libnm (implemented in libnm-core).
+ * We also want to use it without libnm-core. So this "_" variant is the internal
+ * version, with numerically same values -- to be used without libnm-base. */
+
+#define _NM_CRYPTO_ERROR_FAILED            0
+#define _NM_CRYPTO_ERROR_INVALID_DATA      1
+#define _NM_CRYPTO_ERROR_INVALID_PASSWORD  2
+#define _NM_CRYPTO_ERROR_UNKNOWN_CIPHER    3
+#define _NM_CRYPTO_ERROR_DECRYPTION_FAILED 4
+#define _NM_CRYPTO_ERROR_ENCRYPTION_FAILED 5
+
+#define _NM_CRYPTO_ERROR _nm_crypto_error_quark()
+GQuark _nm_crypto_error_quark(void);
+
 #endif /* __NM_LIBNM_BASE_H__ */