NetworkManager/libnm-core/tests
Thomas Haller ec92ecedae libnm: add NMUtilsStrStrDictKey utility
When having a hash-of-hashes where each hash is indexed by a name,
(such as GKeyFile), you can either implement it as a hash-of-hashes
or define your own version of indexes that pack both levels of names
into one key.

This is an implementation of such a key. Use it as:

  GHashTable *hash = g_hash_table_new_full (_nm_utils_strstrdictkey_hash,
                                            _nm_utils_strstrdictkey_equal,
                                            g_free, _destroy_value);

and create keys via:

  NMUtilsStrStrDictKey *k = _nm_utils_strstrdictkey_create (s1, s2);

For lookup you can use static strings (note that the static string
might increase the size of the binary):

  g_hash_table_contains (hash, _nm_utils_strstrdictkey_static ("outer", "inner"))
2015-07-29 22:34:34 +02:00
..
certs keyfile: support writing certificates as blob inside the keyfile 2015-03-12 18:16:58 +01:00
Makefile.am libnm-core: add enum conversion utilities 2015-07-24 14:02:59 +02:00
test-compare.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00
test-crypto.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00
test-general-enums.h libnm-core: add enum conversion utilities 2015-07-24 14:02:59 +02:00
test-general.c libnm: add NMUtilsStrStrDictKey utility 2015-07-29 22:34:34 +02:00
test-keyfile.c libnm: consider ordering for _nm_keyfile_equals() 2015-07-02 15:50:03 +02:00
test-secrets.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00
test-setting-8021x.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00
test-setting-dcb.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00
test-settings-defaults.c all: rename nm-glib-compat.h to nm-glib.h, use everywhere 2015-07-24 13:25:47 -04:00