Commit Graph

18 Commits

Author SHA1 Message Date
Dan Winship
f4c3e2f643 libnm-util: centralize find_setting_by_name code
Several settings types' verify() functions need to find a particular
setting from the all_settings list that NMConnection passes them. Add
a convenience function for this.
2013-10-24 12:25:08 -04:00
Jiří Klimeš
816ac9ee70 libnm-util: prefix errors with 'setting.property' instead of 'property' only 2013-06-13 10:05:18 +02:00
Jiří Klimeš
df142a5dc4 libnm-util: make property verification errors more descriptive
- fix g_set_error()/g_set_error_literal() usage
- make the error messages translatable
- use g_prefix_error() to prepend property name
2013-03-13 17:47:11 +01:00
Dan Williams
47d8db57b5 trivial: plug some memory leaks
(review+ danw)
2013-02-25 16:07:03 +01:00
Dan Williams
38e3819b4e libnm-util: clean up setting registration
Make setting type registration less icky; instead of having the
connection register all the settings, have the settings themselves
register that information at library load time.  Putting this sort
of thing in G_DEFINE_TYPE_WITH_CODE is apparently more standard
than the home-rolled stuff we had before.  Also document the
priority stuff so when adding new settings, people know what
priority to use.

(cleanups by jklimes)
2012-10-29 15:12:58 -05:00
Dan Winship
6878d20ac4 all: Don't use ctype.h macros
The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use
glib's ASCII-only versions instead.

Also, replace isascii() with g_ascii_isprint(), since isascii()
accepts control characters, which isn't what the code wanted in any of
the places where it was using it.
2012-09-26 12:14:37 -04:00
Jiří Klimeš
0fb4f259e6 libnm-util: fix return values in g_return_val_if_fail() 2012-06-07 11:32:33 +02:00
Dan Winship
839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Dan Williams
86854167d6 libnm-util: add some missing GObject introspection annotations 2011-07-19 11:14:01 -05:00
Dan Williams
7568b78ce1 docs: document Bluetooth setting more fully 2011-07-05 14:18:55 -05:00
Dan Williams
65e6f27276 libnm-util: fix description of bluetooth setting type property
DUN certainly is supported these days...
2011-02-18 11:23:21 -06:00
Dan Williams
8624db249a doc: document bluetooth setting properties 2009-11-11 13:50:01 -08:00
Dan Williams
f43fdd9e15 bluetooth: DUN + no CDMA/GSM means invalid connection, really it does 2009-05-21 17:51:11 -04:00
Dan Williams
c065ebdbfb bluetooth: fix my stupid commit mistake of 7be36a7319
Not Bastien's fault but mine.
2009-05-18 12:18:20 -04:00
Bastien Nocera
7be36a7319 bluetooth: actually set the NMSettingBluetooth name property on init 2009-05-18 11:25:04 -04:00
Dan Williams
3af7068a87 bluetooth: fix confusion about NAP and PAN
NMSettingBluetooth represents the local connection, and thus should
use "PANU" not NAP, because the local adapter will be in PANU mode.
For now, NAP is only relevant when talking about the *remote* device
in NMDeviceBt or NMBluezDevice.
2009-05-14 13:00:22 -04:00
Dan Williams
7d88a87214 bluetooth: NMDeviceBt and associated fixes 2009-05-14 11:01:56 -04:00
Dan Williams
4ab96e8eb6 bluetooth: add NMSettingBluetooth 2009-05-13 12:34:45 -04:00