summary refs log tree commit diff
path: root/libnm-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-glib')
-rw-r--r--libnm-glib/meson.build83
-rw-r--r--libnm-glib/nm-client.c2
-rw-r--r--libnm-glib/nm-object.c4
-rw-r--r--libnm-glib/nm-object.h2
-rw-r--r--libnm-glib/nm-secret-agent.c6
-rw-r--r--libnm-glib/nm-vpn-plugin-utils.c2
-rw-r--r--libnm-glib/tests/meson.build6
7 files changed, 47 insertions, 58 deletions
diff --git a/libnm-glib/meson.build b/libnm-glib/meson.build
index 016aa638..3882d59a 100644
--- a/libnm-glib/meson.build
+++ b/libnm-glib/meson.build
@@ -5,7 +5,7 @@ dbus_binding_tool = find_program('dbus-binding-tool')
 common_deps = [
   dbus_dep,
   dbus_glib_dep,
-  shared_dep
+  shared_nm_utils_base_dep,
 ]
 
 common_cflags = [
@@ -13,13 +13,13 @@ common_cflags = [
 ]
 
 cflags = common_cflags + [
-  '-DG_LOG_DOMAIN="@0@"'.format(libnm_glib_name)
+  '-DG_LOG_DOMAIN="@0@"'.format(libnm_glib_name),
 ]
 
 vpn_headers = files(
   'nm-vpn-plugin.h',
   'nm-vpn-plugin-ui-interface.h',
-  'nm-vpn-plugin-utils.h'
+  'nm-vpn-plugin-utils.h',
 )
 
 headers = files(
@@ -50,14 +50,14 @@ headers = files(
   'nm-secret-agent.h',
   'nm-types.h',
   'nm-vpn-connection.h',
-  'nm-wimax-nsp.h'
+  'nm-wimax-nsp.h',
 )
 
 deprecated_headers = files('libnm_glib.h')
 
 install_headers(
   headers + vpn_headers + deprecated_headers,
-  subdir: libnm_glib_name
+  subdir: libnm_glib_name,
 )
 
 libdeprecated_nm_glib = static_library(
@@ -74,7 +74,7 @@ libdeprecated_nm_glib = static_library(
 sources = files(
   'nm-vpn-plugin.c',
   'nm-vpn-plugin-ui-interface.c',
-  'nm-vpn-plugin-utils.c'
+  'nm-vpn-plugin-utils.c',
 )
 
 glue = 'nm-vpn-plugin-glue.h'
@@ -88,11 +88,9 @@ libnm_glib_vpn_enum = gnome.mkenums(
   c_template: enum_types + '.c.template',
   h_template: enum_types + '.h.template',
   install_header: true,
-  install_dir: libnm_glib_pkgincludedir
+  install_dir: libnm_glib_pkgincludedir,
 )
 
-deps = common_deps + [libnm_util_dep]
-
 linker_script = join_paths(meson.current_source_dir(), 'libnm-glib-vpn.ver')
 
 libnm_glib_vpn = shared_library(
@@ -110,18 +108,18 @@ libnm_glib_vpn = shared_library(
     ),
   ] + libnm_glib_vpn_enum,
   version: libnm_glib_vpn_version,
-  dependencies: deps,
+  dependencies: common_deps + [libnm_util_dep],
   c_args: cflags,
   link_args: [
     '-Wl,--version-script,@0@'.format(linker_script),
   ],
   link_depends: linker_script,
-  install: true
+  install: true,
 )
 
 libnm_glib_vpn_dep = declare_dependency(
   include_directories: libnm_glib_inc,
-  link_with: libnm_glib_vpn
+  link_with: libnm_glib_vpn,
 )
 
 pkg.generate(
@@ -132,10 +130,10 @@ pkg.generate(
   filebase: libnm_glib_vpn_name,
   subdirs: libnm_glib_name,
   requires: 'NetworkManager >= ' + nm_version + ' glib-2.0 dbus-glib-1',
-  variables: 'exec_prefix=${prefix}'
+  variables: 'exec_prefix=${prefix}',
 )
 
-libnm_glib_sources = shared_files_libnm_glib + files(
+libnm_glib_sources = files(
   'nm-access-point.c',
   'nm-active-connection.c',
   'nm-client.c',
@@ -165,7 +163,7 @@ libnm_glib_sources = shared_files_libnm_glib + files(
   'nm-secret-agent.c',
   'nm-types.c',
   'nm-vpn-connection.c',
-  'nm-wimax-nsp.c'
+  'nm-wimax-nsp.c',
 )
 
 glue = 'nm-secret-agent-glue.h'
@@ -174,7 +172,7 @@ nm_secret_agent_glue = custom_target(
   glue,
   input: ifaces_secret_agent_xml,
   output: glue,
-  command: [dbus_binding_tool, '--prefix=nm_secret_agent', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@']
+  command: [dbus_binding_tool, '--prefix=nm_secret_agent', '--mode=glib-server', '--output=@OUTPUT@', '@INPUT@'],
 )
 
 enum_types = 'nm-glib-enum-types'
@@ -186,33 +184,32 @@ libnm_glib_enum = gnome.mkenums(
   c_template: enum_types + '.c.template',
   h_template: enum_types + '.h.template',
   install_header: true,
-  install_dir: libnm_glib_pkgincludedir
+  install_dir: libnm_glib_pkgincludedir,
 )
 
-deps = common_deps + [
-  libnm_util_dep,
-  libudev_dep
-]
-
 linker_script = join_paths(meson.current_source_dir(), 'libnm-glib.ver')
 
 libnm_glib = shared_library(
   'nm-glib',
   sources: libnm_glib_sources + libnm_glib_enum + [nm_secret_agent_glue],
   version: libnm_glib_version,
-  dependencies: deps,
+  dependencies: common_deps + [
+    libnm_util_dep,
+    libudev_dep,
+    shared_nm_utils_udev_dep,
+  ],
   c_args: cflags,
   link_whole: libdeprecated_nm_glib,
   link_args: [
     '-Wl,--version-script,@0@'.format(linker_script),
   ],
   link_depends: linker_script,
-  install: true
+  install: true,
 )
 
 libnm_glib_dep = declare_dependency(
   include_directories: libnm_glib_inc,
-  link_with: libnm_glib
+  link_with: libnm_glib,
 )
 
 pkg.generate(
@@ -223,50 +220,44 @@ pkg.generate(
   filebase: libnm_glib_name,
   subdirs: libnm_glib_name,
   requires: 'libnm-util >= ' + nm_version + ' NetworkManager >= ' + nm_version + ' gobject-2.0 dbus-glib-1',
-  variables: 'exec_prefix=${prefix}'
+  variables: 'exec_prefix=${prefix}',
 )
 
 if enable_introspection
   gir_sources = libnm_glib_sources + headers + libnm_glib_enum
 
-  deps = [
-    dbus_glib_dep,
-    libnm_glib_dep,
-    libnm_util_gir_dep
-  ]
-
-  gir_includes = [
-    'DBusGLib-1.0',
-    'Gio-2.0'
-  ]
-
   libnm_glib_gir = gnome.generate_gir(
     libnm_glib,
     sources: gir_sources,
-    dependencies: deps,
+    dependencies: [
+      dbus_glib_dep,
+      libnm_glib_dep,
+      libnm_util_gir_dep,
+    ],
     nsversion: nm_gir_version,
     namespace: 'NMClient',
     identifier_prefix: nm_id_prefix,
     symbol_prefix: nm_id_prefix.to_lower(),
     export_packages: [libnm_glib_name, libnm_glib_vpn_name],
-    includes: gir_includes,
+    includes: [
+      'DBusGLib-1.0',
+      'Gio-2.0',
+    ],
     extra_args: cflags + [
       '--include-uninstalled=' + libnm_util_gir[0].full_path(),
     ],
-    install: true
+    install: true,
   )
 endif
 
 name = libnm_glib_name + '-test'
 
-deps = common_deps + [libnm_util_dep]
-
 executable(
   name,
   name + '.c',
-  dependencies: deps,
+  dependencies: common_deps + [libnm_util_dep],
   c_args: cflags,
-  link_with: libnm_glib
+  link_with: libnm_glib,
 )
 
 test(
@@ -290,6 +281,6 @@ pkg.generate(
     'exec_prefix=${prefix}',
     'libgnome_serverdir=' + nm_libexecdir,
     'plugindir=' + nm_vpndir,
-    'configdir=' + nm_pkgconfdir
-  ]
+    'configdir=' + nm_pkgconfdir,
+  ],
 )
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index 0da7b0f4..16fee714 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -1840,7 +1840,7 @@ constructed (GObject *object)
 	GError *error = NULL;
 
 	if (!nm_utils_init (&error)) {
-		g_warning ("Couldn't initilize nm-utils/crypto system: %s",
+		g_warning ("Couldn't initialize nm-utils/crypto system: %s",
 		           error->message);
 		g_clear_error (&error);
 	}
diff --git a/libnm-glib/nm-object.c b/libnm-glib/nm-object.c
index e2c96d62..967400e7 100644
--- a/libnm-glib/nm-object.c
+++ b/libnm-glib/nm-object.c
@@ -451,10 +451,10 @@ nm_object_class_init (NMObjectClass *nm_object_class)
 	/**
 	 * NMObject::object-creation-failed:
 	 * @master_object: the object that received the signal
-	 * @error: the error that occured while creating object
+	 * @error: the error that occurred while creating object
 	 * @failed_path: object path of the failed object
 	 *
-	 * Indicates that an error occured while creating an #NMObject object
+	 * Indicates that an error occurred while creating an #NMObject object
 	 * during property handling of @master_object.
 	 *
 	 * Note: Be aware that the signal is private for libnm-glib's internal
diff --git a/libnm-glib/nm-object.h b/libnm-glib/nm-object.h
index 73aa9de5..d37fb683 100644
--- a/libnm-glib/nm-object.h
+++ b/libnm-glib/nm-object.h
@@ -66,7 +66,7 @@ typedef struct {
 	/* 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.
+	 * occurred during creation of an object.
 	 */
 	void (*object_creation_failed) (NMObject *master_object,
 	                                GError *error,
diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c
index 16e3199d..361af6f8 100644
--- a/libnm-glib/nm-secret-agent.c
+++ b/libnm-glib/nm-secret-agent.c
@@ -703,7 +703,7 @@ auto_register_cb (gpointer user_data)
  * @callback: (scope async): a callback, to be invoked when the operation is done
  * @user_data: (closure): caller-specific data to be passed to @callback
  *
- * Asyncronously retrieve secrets belonging to @connection for the
+ * Asynchronously retrieve secrets belonging to @connection for the
  * setting @setting_name.  @flags indicate specific behavior that the secret
  * agent should use when performing the request, for example returning only
  * existing secrets without user interaction, or requesting entirely new
@@ -742,7 +742,7 @@ nm_secret_agent_get_secrets (NMSecretAgent *self,
  * @callback: (scope async): a callback, to be invoked when the operation is done
  * @user_data: (closure): caller-specific data to be passed to @callback
  *
- * Asyncronously ensure that all secrets inside @connection
+ * Asynchronously ensure that all secrets inside @connection
  * are stored to disk.
  */
 void
@@ -1031,7 +1031,7 @@ nm_secret_agent_class_init (NMSecretAgentClass *class)
 	/**
 	 * NMSecretAgent::registration-result:
 	 * @agent: the agent that received the signal
-	 * @error: the error, if any, that occured while registering
+	 * @error: the error, if any, that occurred while registering
 	 *
 	 * Indicates the result of a registration request; if @error is NULL the
 	 * request was successful.
diff --git a/libnm-glib/nm-vpn-plugin-utils.c b/libnm-glib/nm-vpn-plugin-utils.c
index ca652d1b..30949d19 100644
--- a/libnm-glib/nm-vpn-plugin-utils.c
+++ b/libnm-glib/nm-vpn-plugin-utils.c
@@ -20,7 +20,6 @@
 
 #include "nm-default.h"
 
-#include <errno.h>
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -83,7 +82,6 @@ nm_vpn_plugin_utils_read_vpn_details (int fd,
 		ssize_t nr;
 		GHashTable *hash = NULL;
 
-		errno = 0;
 		nr = read (fd, &c, 1);
 		if (nr == -1) {
 			if (errno == EAGAIN) {
diff --git a/libnm-glib/tests/meson.build b/libnm-glib/tests/meson.build
index 3fd37c4f..7d6007cb 100644
--- a/libnm-glib/tests/meson.build
+++ b/libnm-glib/tests/meson.build
@@ -3,12 +3,12 @@ deps = [
   dbus_glib_dep,
   libnm_glib_dep,
   libnm_util_dep,
-  shared_dep
+  shared_nm_utils_base_dep,
 ]
 
 test_units = [
   'test-nm-client',
-  'test-remote-settings-client'
+  'test-remote-settings-client',
 ]
 
 foreach test_unit: test_units
@@ -25,6 +25,6 @@ foreach test_unit: test_units
   test(
     'libnm-glib/' + test_unit,
     test_script,
-    args: test_args + [exe.full_path()]
+    args: test_args + [exe.full_path()],
   )
 endforeach