summaryrefslogtreecommitdiff
path: root/dbus/dbus-hash.h
Commit message (Collapse)AuthorAgeFilesLines
* Add SPDX license marker for the AFL-2.1 OR GPL-2.0-or-later licenseRalf Habacker2023-01-041-0/+2
| | | | | | | | | The full license texts are not added because they were already added in a previous commit. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> see #394
* build: Assume stdint.h is providedSimon McVittie2022-07-191-2/+0
| | | | | | | We now require a (mostly-)C99 compiler, meaning we can rely on having Standard C stdint.h. Signed-off-by: Simon McVittie <smcv@collabora.com>
* test: Unembed hash test from libdbus and move it into test/Simon McVittie2019-01-211-0/+1
| | | | | | | | This required exposing one additional internal symbol: _dbus_hash_table_ref(). I think that's a reasonable trade-off for not compiling this test into the library. Signed-off-by: Simon McVittie <smcv@collabora.com>
* trivial: Remove trailing whitespace from copyright noticesSimon McVittie2018-12-171-3/+3
| | | | | | | | | | | | | | We don't usually mass-remove trailing whitespace from the actual source code because it would complicate cherry-picking bug fixes to older branches, but that reasoning doesn't really apply to the comments containing copyright and licensing notices. Removing trailing whitespace makes it much easier to move code around: we have a commit hook that rejects commits containing trailing whitespace, but that commit hook counts moving a file as a delete + add pair, so it objects to moving code that contains trailing whitespace. Signed-off-by: Simon McVittie <smcv@collabora.com>
* containers: Enforce max_containers_per_userSimon McVittie2017-12-121-0/+2
| | | | | | Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101354
* Implement dbus_clear_connection(), etc.Simon McVittie2017-07-301-0/+6
| | | | | | | | | | These are inspired by GLib's g_clear_pointer() and g_clear_object(), which in turn is descended from CPython's Py_CLEAR_OBJECT. They should make our code a lot less repetitive. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=101895
* Add new functions _dbus_hash_table_to_array() and ↵Ralf Habacker2016-02-121-0/+8
| | | | | | | | | _dbus_hash_table_from_array() from related activation code. These functions are required for dbus-run-session. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=92899 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Turn DBusSocket into a type-safe struct, preventing inappropriate conversionSimon McVittie2015-05-121-4/+7
| | | | | | | Fix the remaining platform-specific code to look at the struct's appropriate platform-specific member. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
* DBusMainLoop, DBusSocketSet: work in terms of DBusPollableSimon McVittie2015-05-121-0/+50
| | | | | | | | | This requires generic support for keying hash tables by DBusPollable: there are already implementations for int and uintptr_t keys, but not for "int or uintptr_t depending on platform", which is what DBusPollable now means. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89444
* Add DBUS_PRIVATE_EXPORT decoration to symbols used by dbus-daemon or testsSimon McVittie2015-02-201-0/+22
| | | | | | | | | | | | | | | | | | 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>
* DBUS_HASH_TWO_STRINGS, DBUS_HASH_POINTER: remove, unusedSimon McVittie2012-02-101-17/+0
| | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39759 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Lennart Poettering <lennart@poettering.net>
* fix {u}intptr_t usage on wince with msvcRomain Pokrzywka2010-05-051-2/+3
|
* Don't truncate pointers on Windows x64 platformFridrich Štrba2010-05-031-8/+16
|
* Bug 21161 - Update the FSF addressTobias Mueller2009-07-101-1/+1
| | | | | | No comment. Signed-off-by: Colin Walters <walters@verbum.org>
* 2007-07-13 Havoc Pennington <hp@redhat.com>Havoc Pennington2007-07-141-1/+1
| | | | * Add indent-tabs-mode: nil to all file headers.
* 2006-10-21 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-10-211-0/+2
| | | | | * Documentation! Whee! Doxygen now 100% silent. If you make it angry again, you will be punished.
* 2006-10-21 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-10-211-0/+6
| | | | | | | * Clean up Doxygen group markers for public API so Doxygen finds everything (not comprehensively fixed for private API). Means all remaining Doxygen warnings are just about missing docs and thus pretty simple to resolve.
* 2006-10-19 Havoc Pennington <hp@redhat.com>Havoc Pennington2006-10-201-0/+1
| | | | * Fix a pile of Doxygen warnings and missing docs
* * s/D-BUS/D-Bus/gJohn (J5) Palmieri2006-08-031-1/+1
|
* * bus/bus.c: (bus_context_reload_config): Flush the user database cache onSjoerd Simons2006-03-061-0/+1
| | | | | | | | | | | config reload. * bus/dbus-daemon.1.in: Also note that SIGHUP flushes the user/group information caches * dbus/dbus-hash.c: (_dbus_hash_table_remove_all): * dbus/dbus-hash.h: Add function to remove all entries from a hash table * dbus/dbus-userdb.c: (_dbus_user_database_flush): * dbus/dbus-userdb.h: Add function to flush all user/group information caches.
* remove the ; after DBUS_(BEGIN|END)_DECLS (bug #974)Olivier Andrieu2004-09-091-2/+2
|
* 2004-08-09 Havoc Pennington <hp@redhat.com>Havoc Pennington2004-08-101-1/+1
| | | | | * COPYING: switch to Academic Free License version 2.1 instead of 2.0, to resolve complaints about patent termination clause.
* 2003-12-02 Richard Hult <richard@imendio.com>Richard Hult2003-12-021-1/+1
| | | | | * Update AFL version to 2.0 throughout the source files to reflect the update that was done a while ago.
* 2003-11-26 Mikael Hallendal <micke@imendio.com>Mikael Hallendal2003-11-271-1/+1
| | | | | | * bus/*.[ch]: * dbus/*.[ch]: * glib/*.[ch]: Made ref functions return the pointer
* 2003-09-07 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-09-071-9/+9
| | | | * Make Doxygen contented.
* 2003-08-17 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-08-181-54/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't compile yet, but syncing up so I can hack on it from work. What are branches for if not broken code? ;-) * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER, DBUS_HEADER_FIELD_ERROR_NAME * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use for the interface+member pairs (string_hash): change to use g_str_hash algorithm (find_direct_function, find_string_function): refactor these to share most code. * dbus/dbus-message.c: port all of this over to support interface/member fields instead of name field * dbus/dbus-object-registry.c: port over * dbus/dbus-string.c (_dbus_string_validate_interface): rename from _dbus_string_validate_name * bus/dbus-daemon-1.1: change file format for the <deny>/<allow> stuff to match new message naming scheme * bus/policy.c: port over * bus/config-parser.c: parse new format
* 2003-04-10 Havoc Pennington <hp@redhat.com>Havoc Pennington2003-04-111-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dbus/dbus-connection.c (dbus_connection_flush): don't spin on the connection if it's disconnected * bus/activation.c (bus_activation_service_created): use new transaction features to roll back removal of pending activation if we don't successfully create the service after all. Don't remove pending activation if the function fails. * dbus/dbus-list.c (_dbus_list_insert_before_link) (_dbus_list_insert_after_link): new code to facilitate services.c fixes * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated): new functionality, so we can preallocate the ability to insert into a hash table. * bus/connection.c (bus_transaction_add_cancel_hook): new function allowing us to put custom hooks in a transaction to be used for cancelling said transaction * doc/dbus-specification.sgml: add some discussion of secondary service owners, and disallow zero-length service names * bus/services.c (bus_registry_acquire_service): new function, splits out part of bus_driver_handle_acquire_service() and fixes a bug where we didn't remove the service doing the acquiring from the secondary queue if we failed to remove the current owner from the front of the queue.
* 2003-03-23 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-03-231-44/+52
| | | | | | | | | | * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny policies code * dbus/dbus-hash.h: add ULONG hash keys * dbus/dbus-sysdeps.c (_dbus_get_groups): new (_dbus_get_group_id): new function
* 2003-01-05 Havoc Pennington <hp@pobox.com>Havoc Pennington2003-01-061-27/+34
| | | | | | | | | | | | | | | | | | * bus/connection.c: implement routines for handling connections, first thing is keeping a list of owned services on each connection and setting up watches etc. * bus/services.c: implement a mapping from service names to lists of connections * dbus/dbus-hash.c: add DBUS_HASH_POINTER * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions to use static mutexes for global data * dbus/dbus-connection.c (dbus_connection_set_data): add new collection of functions to set/get application-specific data on the DBusConnection.
* 2002-11-23 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-231-2/+2
| | | | | | | | | | | | | | | | | | * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN _DBUS_INT_MAX * dbus/dbus-test.c (main): add list test, and include dbus-test.h as intended * dbus/dbus-hash.c (_dbus_hash_table_remove_string) (_dbus_hash_table_remove_int): return value indicates whether the entry existed to remove * dbus/dbus-list.c: add linked list utility class, with docs and tests * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket array sometimes.
* 2002-11-23 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-231-2/+2
| | | | | | | | | | * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/ DBUS_END_DECLS to nothing, that should fix this once and for all * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES * dbus/dbus-message.c, dbus/dbus-hash.c: add some missing @brief
* 2002-11-23 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-231-2/+2
| | | | | | | | | | * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS to avoid confusing Doxygen * dbus/dbus-hash.c: @} not }@ * dbus/dbus-message.c (struct DBusMessage): split out internals docs
* 2002-11-23 Havoc Pennington <hp@pobox.com>Havoc Pennington2002-11-231-32/+42
| | | | | | | | | | | | | | | | | | | | | * configure.in: pile on more warning flags if using gcc * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have to document static functions * configure.in: add summary to end of configure so it looks nice and attractive * dbus/dbus-hash.c: finish implementation and write unit tests and docs * configure.in: add --enable-tests to enable unit tests * dbus/dbus-test.c: test program to run unit tests for all files in dbus/*, initially runs a test for dbus-hash.c * dbus/dbus-internals.h: file to hold some internal utility stuff
* 2002-11-22 Havoc Pennington <hp@redhat.com>Havoc Pennington2002-11-221-0/+89
| | | | | | | * dbus/dbus-hash.c: copy in Tcl hash table, not yet "ported" away from Tcl * dbus/dbus-types.h: header for types such as dbus_bool_t
* 2002-11-22 Havoc Pennington <hp@redhat.com>Havoc Pennington2002-11-221-0/+0
* dbus/dbus.h: fixups for doc warnings * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up macros (QUIET): make it quiet so we can see warnings * dbus/dbus-memory.c: teach D-BUS to allocate and free memory