Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Haller
e663b88c59 all/trivial: rename STRLEN() macro to NM_STRLEN()
We should not have defines/macros in header files without a nm/NM
prefix. STRLEN() was one of the few offenders.

https://mail.gnome.org/archives/networkmanager-list/2016-February/msg00048.html
2016-02-14 11:34:42 +01:00
Thomas Haller
dc394a6537 macros: add NM_IN_STRSET()
Add macro similar to NM_IN_SET() that checks for C strings.
NULL values are allowed and handled as one would expect.
2016-02-11 17:54:38 +01:00
Thomas Haller
1211b5b631 macros: simplify NM_IN_SET() macro
Also fix NM_IN_SET_SE() to guaranteed return 0 or 1.
2016-02-11 17:54:38 +01:00
Thomas Haller
f427909bf8 shared: add NM_GOBJECT_PROPERTIES_DEFINE()
Helper macros to define GObject property enum,
the obj_properties array, and a _notify() function.

We should move away from invoking property changed notifications by
string, as we already do for signals. This macro simplifies the
implementation of establishes a pattern for naming and usage.
2016-01-19 21:20:36 +01:00
Beniamino Galvani
f96abc8be5 core: always use gulong to store signal handler ids
We inconsistently use gulong,guint,int types to store signal handler
id, but the type returned by g_signal_connect() is a gulong.

This has no practical consequences because a int/guint is enough to
store the value, however it is better to use a consistent type, also
because nm_clear_g_signal_handler() accepts a pointer to the signal id
and thus it must be always called with the same pointer type.
2016-01-06 21:25:55 +01:00
Thomas Haller
c7d4d67d53 include: remove trailing semicolon from _Pragma() call 2015-12-24 11:42:37 +01:00
Thomas Haller
db80ec05ab build: rename directory "include" to "shared"
Up to now, the "include" directory contained (only) header files that were
used project-wide by libs, core, clients, et al.

Since the directory now also contains a non-header file, the "include"
name is misleading. Instead of adding yet another directory that is
project-wide, with non-header-only content, rename the "include"
directory to "shared".
2015-12-24 11:42:37 +01:00