diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-02-20 14:42:13 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2015-02-20 20:49:36 +0000 |
commit | 6bcf34d4c24d7c690aff01269d8575289f901728 (patch) | |
tree | 394ccb5b33991f5be195f02ae8279c3bfd6cca4d /dbus/dbus-hash.h | |
parent | dbd731491b19df3df4edf597ea7b646b76576b07 (diff) | |
download | dbus-6bcf34d4c24d7c690aff01269d8575289f901728.tar.gz |
Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or tests
The rules are:
* symbols in libdbus-1 with neither decoration are private to libdbus-1
* symbols in libdbus-1 with DBUS_EXPORT are public API
* symbols in libdbus-1 with DBUS_PRIVATE_EXPORT are private to the
dbus source package, but may be used by other programs in the dbus
source tree, including tests
* symbols in libdbus-internal must not have DBUS_EXPORT or
DBUS_PRIVATE_EXPORT, and should be used by as few things as possible
Thanks to Ralf Habacker for his contributions to this rather
large commit.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=83115
Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
Diffstat (limited to 'dbus/dbus-hash.h')
-rw-r--r-- | dbus/dbus-hash.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dbus/dbus-hash.h b/dbus/dbus-hash.h index 5aa183c4..723d2676 100644 --- a/dbus/dbus-hash.h +++ b/dbus/dbus-hash.h @@ -71,47 +71,66 @@ typedef enum DBUS_HASH_UINTPTR /**< Hash keys are integer capable to hold a pointer. */ } DBusHashType; +DBUS_PRIVATE_EXPORT DBusHashTable* _dbus_hash_table_new (DBusHashType type, DBusFreeFunction key_free_function, DBusFreeFunction value_free_function); DBusHashTable* _dbus_hash_table_ref (DBusHashTable *table); +DBUS_PRIVATE_EXPORT void _dbus_hash_table_unref (DBusHashTable *table); void _dbus_hash_table_remove_all (DBusHashTable *table); +DBUS_PRIVATE_EXPORT void _dbus_hash_iter_init (DBusHashTable *table, DBusHashIter *iter); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_iter_next (DBusHashIter *iter); +DBUS_PRIVATE_EXPORT void _dbus_hash_iter_remove_entry (DBusHashIter *iter); +DBUS_PRIVATE_EXPORT void* _dbus_hash_iter_get_value (DBusHashIter *iter); void _dbus_hash_iter_set_value (DBusHashIter *iter, void *value); +DBUS_PRIVATE_EXPORT int _dbus_hash_iter_get_int_key (DBusHashIter *iter); +DBUS_PRIVATE_EXPORT const char* _dbus_hash_iter_get_string_key (DBusHashIter *iter); +DBUS_PRIVATE_EXPORT uintptr_t _dbus_hash_iter_get_uintptr_key (DBusHashIter *iter); dbus_bool_t _dbus_hash_iter_lookup (DBusHashTable *table, void *key, dbus_bool_t create_if_not_found, DBusHashIter *iter); +DBUS_PRIVATE_EXPORT void* _dbus_hash_table_lookup_string (DBusHashTable *table, const char *key); +DBUS_PRIVATE_EXPORT void* _dbus_hash_table_lookup_int (DBusHashTable *table, int key); +DBUS_PRIVATE_EXPORT void* _dbus_hash_table_lookup_uintptr (DBusHashTable *table, uintptr_t key); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_remove_string (DBusHashTable *table, const char *key); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_remove_int (DBusHashTable *table, int key); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_remove_uintptr (DBusHashTable *table, uintptr_t key); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_insert_string (DBusHashTable *table, char *key, void *value); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_insert_int (DBusHashTable *table, int key, void *value); +DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_hash_table_insert_uintptr (DBusHashTable *table, uintptr_t key, void *value); +DBUS_PRIVATE_EXPORT int _dbus_hash_table_get_n_entries (DBusHashTable *table); /* Preallocation */ @@ -119,9 +138,12 @@ int _dbus_hash_table_get_n_entries (DBusHashTable *table); /** A preallocated hash entry */ typedef struct DBusPreallocatedHash DBusPreallocatedHash; +DBUS_PRIVATE_EXPORT DBusPreallocatedHash *_dbus_hash_table_preallocate_entry (DBusHashTable *table); +DBUS_PRIVATE_EXPORT void _dbus_hash_table_free_preallocated_entry (DBusHashTable *table, DBusPreallocatedHash *preallocated); +DBUS_PRIVATE_EXPORT void _dbus_hash_table_insert_string_preallocated (DBusHashTable *table, DBusPreallocatedHash *preallocated, char *key, |