summaryrefslogtreecommitdiff
path: root/libnm-core/nm-dbus-utils.c
Commit message (Collapse)AuthorAgeFilesLines
* all: SPDX header conversionLubomir Rintel2019-09-101-15/+1
| | | | | $ find * -type f |xargs perl contrib/scripts/spdx.pl $ git rm contrib/scripts/spdx.pl
* all: drop emacs file variables from source filesThomas Haller2019-06-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | We no longer add these. If you use Emacs, configure it yourself. Also, due to our "smart-tab" usage the editor anyway does a subpar job handling our tabs. However, on the upside every user can choose whatever tab-width he/she prefers. If "smart-tabs" are used properly (like we do), every tab-width will work. No manual changes, just ran commands: F=($(git grep -l -e '-\*-')) sed '1 { /\/\* *-\*- *[mM]ode.*\*\/$/d }' -i "${F[@]}" sed '1,4 { /^\(#\|--\|dnl\) *-\*- [mM]ode/d }' -i "${F[@]}" Check remaining lines with: git grep -e '-\*-' The ultimate purpose of this is to cleanup our files and eventually use SPDX license identifiers. For that, first get rid of the boilerplate lines.
* all: drop unnecessary includes of <errno.h> and <string.h>Thomas Haller2019-02-121-2/+0
| | | | | "nm-macros-interal.h" already includes <errno.h> and <string.h>. No need to include it everywhere else too.
* libnm-core: expose internal _nm_dbus_typecheck_response() helperThomas Haller2018-10-171-26/+63
|
* all: don't use gchar/gshort/gint/glong but C typesThomas Haller2018-07-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We commonly don't use the glib typedefs for char/short/int/long, but their C types directly. $ git grep '\<g\(char\|short\|int\|long\|float\|double\)\>' | wc -l 587 $ git grep '\<\(char\|short\|int\|long\|float\|double\)\>' | wc -l 21114 One could argue that using the glib typedefs is preferable in public API (of our glib based libnm library) or where it clearly is related to glib, like during g_object_set (obj, PROPERTY, (gint) value, NULL); However, that argument does not seem strong, because in practice we don't follow that argument today, and seldomly use the glib typedefs. Also, the style guide for this would be hard to formalize, because "using them where clearly related to a glib" is a very loose suggestion. Also note that glib typedefs will always just be typedefs of the underlying C types. There is no danger of glib changing the meaning of these typedefs (because that would be a major API break of glib). A simple style guide is instead: don't use these typedefs. No manual actions, I only ran the bash script: FILES=($(git ls-files '*.[hc]')) sed -i \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>\( [^ ]\)/\1\2/g' \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\> /\1 /g' \ -e 's/\<g\(char\|short\|int\|long\|float\|double\)\>/\1/g' \ "${FILES[@]}"
* all: remove consecutive empty linesBeniamino Galvani2018-04-301-1/+0
| | | | | | | Normalize coding style by removing consecutive empty lines from C sources and headers. https://github.com/NetworkManager/NetworkManager/pull/108
* secret-agent: don't use generated NMDBusSecretAgent proxyThomas Haller2018-03-121-4/+6
| | | | | | | | | | | | | | | | | The generated code is really just a thin wrapper around direct GDBusProxy calls. GDBusProxy is reasonably convenient to use directly, drop this wrapper. We also don't use a generated wrapper for other cases where NetworkManager acts as a D-Bus client. There is no reason to do it in this case. While the nmdbus_*() functions that we were using are small wrappers, we also created a NMDBusSecretAgent instance, and hence several other functions and symbols are used as well. It's unnecessary. This saves 8552 bytes for NetworkManager binary (2817944 vs. 2809392 bytes for contrib/rpm on x86_64).
* all: cleanup includes and let "nm-default.h" include "config.h"Thomas Haller2016-02-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - All internal source files (except "examples", which are not internal) should include "config.h" first. As also all internal source files should include "nm-default.h", let "config.h" be included by "nm-default.h" and include "nm-default.h" as first in every source file. We already wanted to include "nm-default.h" before other headers because it might contains some fixes (like "nm-glib.h" compatibility) that is required first. - After including "nm-default.h", we optinally allow for including the corresponding header file for the source file at hand. The idea is to ensure that each header file is self contained. - Don't include "config.h" or "nm-default.h" in any header file (except "nm-sd-adapt.h"). Public headers anyway must not include these headers, and internal headers are never included after "nm-default.h", as of the first previous point. - Include all internal headers with quotes instead of angle brackets. In practice it doesn't matter, because in our public headers we must include other headers with angle brackets. As we use our public headers also to compile our interal source files, effectively the result must be the same. Still do it for consistency. - Except for <config.h> itself. Include it with angle brackets as suggested by https://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers
* libnm/trivial: add code comment to _nm_dbus_error_has_name()Thomas Haller2015-08-251-0/+5
|
* all: drop includes to <glib/gi18n.h> for "nm-default.h"Dan Winship2015-08-051-1/+0
| | | | | | | The localization headers are now included via "nm-default.h". Also fixes several places, where we wrongly included <glib/gi18n-lib.h> instead of <glib/gi18n.h>. For example under "clients/" directory.
* all: make use of new header file "nm-default.h"Thomas Haller2015-08-051-1/+1
|
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-241-2/+1
| | | | | | | | | | | | | | | | Rather than randomly including one or more of <glib.h>, <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to nm-glib.h, include <gio/gio.h> from there, and then change all .c files in NM to include "nm-glib.h" rather than including the glib headers directly. (Public headers files still have to include the real glib headers, since nm-glib.h isn't installed...) Also, remove glib includes from header files that are already including a base object header file (which must itself already include the glib headers).
* build: use compat version of g_clear_pointer()Lubomir Rintel2015-06-021-0/+1
| | | | Ubuntu 12.04 has an ancient version of glib, which we nevertheless support.
* libnm-core: add _nm_dbus_error_has_name()Dan Winship2015-04-031-0/+26
| | | | Add a method for checking the D-Bus error name of an error.
* libnm-core: add _nm_dbus_proxy_call_sync(), _nm_dbus_proxy_call_finish()Dan Winship2015-04-031-0/+88
| | | | | | Add versions of g_dbus_proxy_call_sync() and g_dbus_proxy_call_finish() that also typecheck the response and return an error if it is incorrect.
* libnm-core: add _nm_dbus_signal_connect()Dan Winship2015-04-031-0/+176
Add _nm_dbus_signal_connect(), for connecting to D-Bus signals on a GDBusProxy, with typechecking and pre-parsing of the parameters variant.