diff options
author | David Zeuthen <davidz@x61.localdomain> | 2008-12-18 20:55:12 -0500 |
---|---|---|
committer | David Zeuthen <davidz@x61.localdomain> | 2008-12-18 20:55:12 -0500 |
commit | c25ac004efb9eeb79c596c2f2e68a12beac88354 (patch) | |
tree | 8adf1f99b31a26a3ca59c303f46aa6d0a1b623c3 | |
parent | 24b486516ef28776820cd729b32bf4df3f1ca3d9 (diff) |
add docs for EggDBusHashMap
... and now to finally port to this new thing
-rw-r--r-- | docs/eggdbus/eggdbus-sections.txt | 897 | ||||
-rw-r--r-- | src/eggdbus/eggdbushashmap.c | 479 |
2 files changed, 922 insertions, 454 deletions
diff --git a/docs/eggdbus/eggdbus-sections.txt b/docs/eggdbus/eggdbus-sections.txt index 11e5ccf..ef9dbab 100644 --- a/docs/eggdbus/eggdbus-sections.txt +++ b/docs/eggdbus/eggdbus-sections.txt @@ -1,18 +1,119 @@ <SECTION> -<FILE>eggdbusintrospectable</FILE> -EggDBusIntrospectable -EggDBusIntrospectableIface -EGG_DBUS_QUERY_INTERFACE_INTROSPECTABLE -egg_dbus_introspectable_invoke_introspect -egg_dbus_introspectable_invoke_introspect_finish -egg_dbus_introspectable_invoke_introspect_sync -egg_dbus_introspectable_handle_introspect_finish +<FILE>eggdbusvariant</FILE> +<TITLE>EggDBusVariant</TITLE> +EggDBusVariant +egg_dbus_variant_get_variant_signature +egg_dbus_variant_print +egg_dbus_variant_new +egg_dbus_variant_new_for_gvalue +egg_dbus_variant_get_gvalue +egg_dbus_variant_new_for_string +egg_dbus_variant_new_for_object_path +egg_dbus_variant_new_for_signature +egg_dbus_variant_new_for_string_array +egg_dbus_variant_new_for_object_path_array +egg_dbus_variant_new_for_signature_array +egg_dbus_variant_new_for_byte +egg_dbus_variant_new_for_int16 +egg_dbus_variant_new_for_uint16 +egg_dbus_variant_new_for_int32 +egg_dbus_variant_new_for_uint32 +egg_dbus_variant_new_for_int64 +egg_dbus_variant_new_for_uint64 +egg_dbus_variant_new_for_boolean +egg_dbus_variant_new_for_double +egg_dbus_variant_new_for_array +egg_dbus_variant_new_for_list +egg_dbus_variant_new_for_hash_table +egg_dbus_variant_new_for_structure +egg_dbus_variant_set_string +egg_dbus_variant_set_object_path +egg_dbus_variant_set_signature +egg_dbus_variant_set_string_array +egg_dbus_variant_set_object_path_array +egg_dbus_variant_set_signature_array +egg_dbus_variant_set_byte +egg_dbus_variant_set_int16 +egg_dbus_variant_set_uint16 +egg_dbus_variant_set_int32 +egg_dbus_variant_set_uint32 +egg_dbus_variant_set_int64 +egg_dbus_variant_set_uint64 +egg_dbus_variant_set_boolean +egg_dbus_variant_set_double +egg_dbus_variant_set_array +egg_dbus_variant_set_list +egg_dbus_variant_set_hash_table +egg_dbus_variant_set_structure +egg_dbus_variant_get_string +egg_dbus_variant_get_object_path +egg_dbus_variant_get_signature +egg_dbus_variant_get_string_array +egg_dbus_variant_get_object_path_array +egg_dbus_variant_get_signature_array +egg_dbus_variant_get_byte +egg_dbus_variant_get_int16 +egg_dbus_variant_get_uint16 +egg_dbus_variant_get_int32 +egg_dbus_variant_get_uint32 +egg_dbus_variant_get_int64 +egg_dbus_variant_get_uint64 +egg_dbus_variant_get_boolean +egg_dbus_variant_get_double +egg_dbus_variant_get_array +egg_dbus_variant_get_list +egg_dbus_variant_get_hash_table +egg_dbus_variant_get_structure +egg_dbus_variant_is_unset +egg_dbus_variant_is_string +egg_dbus_variant_is_object_path +egg_dbus_variant_is_signature +egg_dbus_variant_is_string_array +egg_dbus_variant_is_object_path_array +egg_dbus_variant_is_signature_array +egg_dbus_variant_is_byte +egg_dbus_variant_is_int16 +egg_dbus_variant_is_uint16 +egg_dbus_variant_is_int32 +egg_dbus_variant_is_uint32 +egg_dbus_variant_is_int64 +egg_dbus_variant_is_uint64 +egg_dbus_variant_is_boolean +egg_dbus_variant_is_double +egg_dbus_variant_is_array +egg_dbus_variant_is_list +egg_dbus_variant_is_hash_table +egg_dbus_variant_is_structure +egg_dbus_variant_new_for_array_with_signature +egg_dbus_variant_new_for_list_with_signature +egg_dbus_variant_new_for_hash_table_with_signature +egg_dbus_variant_set_array_with_signature +egg_dbus_variant_set_list_with_signature +egg_dbus_variant_set_hash_table_with_signature <SUBSECTION Standard> -EGG_DBUS_INTROSPECTABLE -EGG_DBUS_IS_INTROSPECTABLE -EGG_DBUS_TYPE_INTROSPECTABLE -egg_dbus_introspectable_get_type -EGG_DBUS_INTROSPECTABLE_GET_IFACE +EGG_DBUS_VARIANT +EGG_DBUS_IS_VARIANT +EGG_DBUS_TYPE_VARIANT +egg_dbus_variant_get_type +EGG_DBUS_VARIANT_CLASS +EGG_DBUS_IS_VARIANT_CLASS +EGG_DBUS_VARIANT_GET_CLASS +</SECTION> + +<SECTION> +<FILE>eggdbusinterfaceproxy</FILE> +<TITLE>EggDBusInterfaceProxy</TITLE> +EggDBusInterfaceProxy +egg_dbus_interface_proxy_get_object_proxy +egg_dbus_interface_proxy_get_interface_iface +<SUBSECTION Standard> +EGG_DBUS_INTERFACE_PROXY +EGG_DBUS_IS_INTERFACE_PROXY +EGG_DBUS_TYPE_INTERFACE_PROXY +egg_dbus_interface_proxy_get_type +EGG_DBUS_INTERFACE_PROXY_CLASS +EGG_DBUS_IS_INTERFACE_PROXY_CLASS +EGG_DBUS_INTERFACE_PROXY_GET_CLASS </SECTION> <SECTION> @@ -104,96 +205,36 @@ EGG_DBUS_BUS_GET_IFACE </SECTION> <SECTION> -<FILE>eggdbusbusnametracker</FILE> -<TITLE>EggDBusBusNameTracker</TITLE> -EggDBusBusNameTracker -egg_dbus_bus_name_tracker_new -egg_dbus_bus_name_tracker_watch_bus_name -egg_dbus_bus_name_tracker_stop_watching_bus_name -egg_dbus_bus_name_tracker_has_info_for_bus_name -egg_dbus_bus_name_tracker_get_owner_for_bus_name -egg_dbus_bus_name_tracker_get_known_well_known_bus_names_for_unique_bus_name -<SUBSECTION Standard> -EGG_DBUS_BUS_NAME_TRACKER -EGG_DBUS_IS_BUS_NAME_TRACKER -EGG_DBUS_TYPE_BUS_NAME_TRACKER -egg_dbus_bus_name_tracker_get_type -EGG_DBUS_BUS_NAME_TRACKER_CLASS -EGG_DBUS_IS_BUS_NAME_TRACKER_CLASS -EGG_DBUS_BUS_NAME_TRACKER_GET_CLASS -</SECTION> - -<SECTION> -<FILE>eggdbusobjectproxy</FILE> -<TITLE>EggDBusObjectProxy</TITLE> -EggDBusObjectProxy -egg_dbus_object_proxy_get_connection -egg_dbus_object_proxy_get_name -egg_dbus_object_proxy_get_object_path -egg_dbus_object_proxy_get_name_owner -egg_dbus_object_proxy_introspect -egg_dbus_object_proxy_introspect_finish -egg_dbus_object_proxy_introspect_sync -egg_dbus_object_proxy_invalidate_properties -egg_dbus_object_proxy_query_interface -<SUBSECTION Standard> -EGG_DBUS_OBJECT_PROXY -EGG_DBUS_IS_OBJECT_PROXY -EGG_DBUS_TYPE_OBJECT_PROXY -egg_dbus_object_proxy_get_type -EGG_DBUS_OBJECT_PROXY_CLASS -EGG_DBUS_IS_OBJECT_PROXY_CLASS -EGG_DBUS_OBJECT_PROXY_GET_CLASS -</SECTION> - -<SECTION> -<FILE>eggdbusinterface</FILE> -EggDBusInterface -EggDBusInterfaceAnnotationInfo -EggDBusInterfaceArgInfo -EggDBusInterfaceMethodInfo -EggDBusInterfaceSignalInfo -EggDBusInterfacePropertyInfoFlags -EggDBusInterfacePropertyInfo -EggDBusInterfaceInfo -EggDBusInterfaceNodeInfo -EggDBusInterfaceIface -egg_dbus_interface_annotation_info_lookup -egg_dbus_interface_info_lookup_signal_for_g_name -egg_dbus_interface_info_lookup_property_for_name -egg_dbus_interface_info_lookup_property_for_g_name -egg_dbus_interface_new_node_info_from_xml -egg_dbus_interface_node_info_free -egg_dbus_interface_info_to_xml -egg_dbus_interface_node_info_to_xml -egg_dbus_bindings_get_error_domain_types -<SUBSECTION Standard> -EGG_DBUS_INTERFACE -EGG_DBUS_IS_INTERFACE -EGG_DBUS_TYPE_INTERFACE -egg_dbus_interface_get_type -EGG_DBUS_INTERFACE_GET_IFACE -</SECTION> - -<SECTION> -<FILE>eggdbuspeer</FILE> -EggDBusPeer -EggDBusPeerIface -EGG_DBUS_QUERY_INTERFACE_PEER -egg_dbus_peer_invoke_ping -egg_dbus_peer_invoke_ping_finish -egg_dbus_peer_invoke_ping_sync -egg_dbus_peer_invoke_get_machine_id -egg_dbus_peer_invoke_get_machine_id_finish -egg_dbus_peer_invoke_get_machine_id_sync -egg_dbus_peer_handle_ping_finish -egg_dbus_peer_handle_get_machine_id_finish +<FILE>eggdbusconnection</FILE> +<TITLE>EggDBusConnection</TITLE> +EggDBusConnection +EggDBusCallFlags +EggDBusBusType +egg_dbus_connection_get_for_bus +egg_dbus_connection_get_object_proxy +egg_dbus_connection_get_bus +egg_dbus_connection_get_unique_name +egg_dbus_connection_register_interface +egg_dbus_connection_register_interface_valist +egg_dbus_connection_unregister_interface +egg_dbus_connection_unregister_interface_valist +egg_dbus_connection_lookup_interface +egg_dbus_connection_new_message_for_signal +egg_dbus_connection_new_message_for_method_call +egg_dbus_connection_send_message +egg_dbus_connection_send_message_with_reply +egg_dbus_connection_send_message_with_reply_finish +egg_dbus_connection_send_message_with_reply_sync +egg_dbus_connection_pending_call_cancel +egg_dbus_connection_pending_call_block <SUBSECTION Standard> -EGG_DBUS_PEER -EGG_DBUS_IS_PEER -EGG_DBUS_TYPE_PEER -egg_dbus_peer_get_type -EGG_DBUS_PEER_GET_IFACE +EGG_DBUS_CONNECTION +EGG_DBUS_IS_CONNECTION +EGG_DBUS_TYPE_CONNECTION +egg_dbus_connection_get_type +EGG_DBUS_CONNECTION_CLASS +EGG_DBUS_IS_CONNECTION_CLASS +EGG_DBUS_CONNECTION_GET_CLASS </SECTION> <SECTION> @@ -266,51 +307,124 @@ EGG_DBUS_MESSAGE_GET_CLASS </SECTION> <SECTION> -<FILE>eggdbusmethodinvocation</FILE> -<TITLE>EggDBusMethodInvocation</TITLE> -EggDBusMethodInvocation -egg_dbus_method_invocation_new -egg_dbus_method_invocation_get_source_tag -egg_dbus_method_invocation_create_reply_message -egg_dbus_method_invocation_get_connection -egg_dbus_method_invocation_add_destroy_notify -egg_dbus_method_invocation_return_error -egg_dbus_method_invocation_return_error_literal -egg_dbus_method_invocation_return_gerror -egg_dbus_method_invocation_return_dbus_error -egg_dbus_method_invocation_return_dbus_error_literal +<FILE>eggdbuspeer</FILE> +EggDBusPeer +EggDBusPeerIface +EGG_DBUS_QUERY_INTERFACE_PEER +egg_dbus_peer_invoke_ping +egg_dbus_peer_invoke_ping_finish +egg_dbus_peer_invoke_ping_sync +egg_dbus_peer_invoke_get_machine_id +egg_dbus_peer_invoke_get_machine_id_finish +egg_dbus_peer_invoke_get_machine_id_sync +egg_dbus_peer_handle_ping_finish +egg_dbus_peer_handle_get_machine_id_finish <SUBSECTION Standard> -EGG_DBUS_METHOD_INVOCATION -EGG_DBUS_IS_METHOD_INVOCATION -EGG_DBUS_TYPE_METHOD_INVOCATION -egg_dbus_method_invocation_get_type -EGG_DBUS_METHOD_INVOCATION_CLASS -EGG_DBUS_IS_METHOD_INVOCATION_CLASS -EGG_DBUS_METHOD_INVOCATION_GET_CLASS +EGG_DBUS_PEER +EGG_DBUS_IS_PEER +EGG_DBUS_TYPE_PEER +egg_dbus_peer_get_type +EGG_DBUS_PEER_GET_IFACE +</SECTION> + +<SECTION> +<FILE>eggdbusintrospectable</FILE> +EggDBusIntrospectable +EggDBusIntrospectableIface +EGG_DBUS_QUERY_INTERFACE_INTROSPECTABLE +egg_dbus_introspectable_invoke_introspect +egg_dbus_introspectable_invoke_introspect_finish +egg_dbus_introspectable_invoke_introspect_sync +egg_dbus_introspectable_handle_introspect_finish +<SUBSECTION Standard> +EGG_DBUS_INTROSPECTABLE +EGG_DBUS_IS_INTROSPECTABLE +EGG_DBUS_TYPE_INTROSPECTABLE +egg_dbus_introspectable_get_type +EGG_DBUS_INTROSPECTABLE_GET_IFACE +</SECTION> + +<SECTION> +<FILE>eggdbusobjectproxy</FILE> +<TITLE>EggDBusObjectProxy</TITLE> +EggDBusObjectProxy +egg_dbus_object_proxy_get_connection +egg_dbus_object_proxy_get_name +egg_dbus_object_proxy_get_object_path +egg_dbus_object_proxy_get_name_owner +egg_dbus_object_proxy_introspect +egg_dbus_object_proxy_introspect_finish +egg_dbus_object_proxy_introspect_sync +egg_dbus_object_proxy_invalidate_properties +egg_dbus_object_proxy_query_interface +<SUBSECTION Standard> +EGG_DBUS_OBJECT_PROXY +EGG_DBUS_IS_OBJECT_PROXY +EGG_DBUS_TYPE_OBJECT_PROXY +egg_dbus_object_proxy_get_type +EGG_DBUS_OBJECT_PROXY_CLASS +EGG_DBUS_IS_OBJECT_PROXY_CLASS +EGG_DBUS_OBJECT_PROXY_GET_CLASS +</SECTION> + +<SECTION> +<FILE>eggdbusinterface</FILE> +EggDBusInterface +EggDBusInterfaceAnnotationInfo +EggDBusInterfaceArgInfo +EggDBusInterfaceMethodInfo +EggDBusInterfaceSignalInfo +EggDBusInterfacePropertyInfoFlags +EggDBusInterfacePropertyInfo +EggDBusInterfaceInfo +EggDBusInterfaceNodeInfo +EggDBusInterfaceIface +egg_dbus_interface_annotation_info_lookup +egg_dbus_interface_info_lookup_signal_for_g_name +egg_dbus_interface_info_lookup_property_for_name +egg_dbus_interface_info_lookup_property_for_g_name +egg_dbus_interface_new_node_info_from_xml +egg_dbus_interface_node_info_free +egg_dbus_interface_info_to_xml +egg_dbus_interface_node_info_to_xml +egg_dbus_bindings_get_error_domain_types +<SUBSECTION Standard> +EGG_DBUS_INTERFACE +EGG_DBUS_IS_INTERFACE +EGG_DBUS_TYPE_INTERFACE +egg_dbus_interface_get_type +EGG_DBUS_INTERFACE_GET_IFACE </SECTION> <SECTION> <FILE>eggdbushashmap</FILE> -EggDBusHashMapFlags <TITLE>EggDBusHashMap</TITLE> EggDBusHashMap egg_dbus_hash_map_new egg_dbus_hash_map_new_full -egg_dbus_hash_map_size -egg_dbus_hash_map_get_flags +egg_dbus_hash_map_get_size egg_dbus_hash_map_get_key_type egg_dbus_hash_map_get_value_type egg_dbus_hash_map_clear egg_dbus_hash_map_insert egg_dbus_hash_map_contains egg_dbus_hash_map_lookup -egg_dbus_hash_map_lookup_dup +egg_dbus_hash_map_lookup_copy +egg_dbus_hash_map_remove egg_dbus_hash_map_contains_fixed egg_dbus_hash_map_contains_float egg_dbus_hash_map_lookup_fixed egg_dbus_hash_map_lookup_float -egg_dbus_hash_map_lookup_fixed_dup -egg_dbus_hash_map_lookup_float_dup +egg_dbus_hash_map_lookup_fixed_copy +egg_dbus_hash_map_lookup_float_copy +egg_dbus_hash_map_lookup_ptr_fixed +egg_dbus_hash_map_lookup_ptr_float +egg_dbus_hash_map_lookup_fixed_fixed +egg_dbus_hash_map_lookup_fixed_float +egg_dbus_hash_map_lookup_float_fixed +egg_dbus_hash_map_lookup_float_float +egg_dbus_hash_map_remove_fixed +egg_dbus_hash_map_remove_float egg_dbus_hash_map_insert_ptr_fixed egg_dbus_hash_map_insert_ptr_float egg_dbus_hash_map_insert_fixed_ptr @@ -319,14 +433,6 @@ egg_dbus_hash_map_insert_fixed_float egg_dbus_hash_map_insert_float_ptr egg_dbus_hash_map_insert_float_fixed egg_dbus_hash_map_insert_float_float -egg_dbus_hash_map_lookup_ptr_fixed -egg_dbus_hash_map_lookup_ptr_float -egg_dbus_hash_map_lookup_fixed_ptr -egg_dbus_hash_map_lookup_fixed_fixed -egg_dbus_hash_map_lookup_fixed_float -egg_dbus_hash_map_lookup_float_ptr -egg_dbus_hash_map_lookup_float_fixed -egg_dbus_hash_map_lookup_float_float <SUBSECTION Standard> EGG_DBUS_HASH_MAP EGG_DBUS_IS_HASH_MAP @@ -338,132 +444,27 @@ EGG_DBUS_HASH_MAP_GET_CLASS </SECTION> <SECTION> -<FILE>eggdbusvariant</FILE> -<TITLE>EggDBusVariant</TITLE> -EggDBusVariant -egg_dbus_variant_get_variant_signature -egg_dbus_variant_print -egg_dbus_variant_new -egg_dbus_variant_new_for_gvalue -egg_dbus_variant_get_gvalue -egg_dbus_variant_new_for_string -egg_dbus_variant_new_for_object_path -egg_dbus_variant_new_for_signature -egg_dbus_variant_new_for_string_array -egg_dbus_variant_new_for_object_path_array -egg_dbus_variant_new_for_signature_array -egg_dbus_variant_new_for_byte -egg_dbus_variant_new_for_int16 -egg_dbus_variant_new_for_uint16 -egg_dbus_variant_new_for_int32 -egg_dbus_variant_new_for_uint32 -egg_dbus_variant_new_for_int64 -egg_dbus_variant_new_for_uint64 -egg_dbus_variant_new_for_boolean -egg_dbus_variant_new_for_double -egg_dbus_variant_new_for_array -egg_dbus_variant_new_for_list -egg_dbus_variant_new_for_hash_table -egg_dbus_variant_new_for_structure -egg_dbus_variant_set_string -egg_dbus_variant_set_object_path -egg_dbus_variant_set_signature -egg_dbus_variant_set_string_array -egg_dbus_variant_set_object_path_array -egg_dbus_variant_set_signature_array -egg_dbus_variant_set_byte -egg_dbus_variant_set_int16 -egg_dbus_variant_set_uint16 -egg_dbus_variant_set_int32 -egg_dbus_variant_set_uint32 -egg_dbus_variant_set_int64 -egg_dbus_variant_set_uint64 -egg_dbus_variant_set_boolean -egg_dbus_variant_set_double -egg_dbus_variant_set_array -egg_dbus_variant_set_list -egg_dbus_variant_set_hash_table -egg_dbus_variant_set_structure -egg_dbus_variant_get_string -egg_dbus_variant_get_object_path -egg_dbus_variant_get_signature -egg_dbus_variant_get_string_array -egg_dbus_variant_get_object_path_array -egg_dbus_variant_get_signature_array -egg_dbus_variant_get_byte -egg_dbus_variant_get_int16 -egg_dbus_variant_get_uint16 -egg_dbus_variant_get_int32 -egg_dbus_variant_get_uint32 -egg_dbus_variant_get_int64 -egg_dbus_variant_get_uint64 -egg_dbus_variant_get_boolean -egg_dbus_variant_get_double -egg_dbus_variant_get_array -egg_dbus_variant_get_list -egg_dbus_variant_get_hash_table -egg_dbus_variant_get_structure -egg_dbus_variant_is_unset -egg_dbus_variant_is_string -egg_dbus_variant_is_object_path -egg_dbus_variant_is_signature -egg_dbus_variant_is_string_array -egg_dbus_variant_is_object_path_array -egg_dbus_variant_is_signature_array -egg_dbus_variant_is_byte -egg_dbus_variant_is_int16 -egg_dbus_variant_is_uint16 -egg_dbus_variant_is_int32 -egg_dbus_variant_is_uint32 -egg_dbus_variant_is_int64 -egg_dbus_variant_is_uint64 -egg_dbus_variant_is_boolean -egg_dbus_variant_is_double -egg_dbus_variant_is_array -egg_dbus_variant_is_list -egg_dbus_variant_is_hash_table -egg_dbus_variant_is_structure -egg_dbus_variant_new_for_array_with_signature -egg_dbus_variant_new_for_list_with_signature -egg_dbus_variant_new_for_hash_table_with_signature -egg_dbus_variant_set_array_with_signature -egg_dbus_variant_set_list_with_signature -egg_dbus_variant_set_hash_table_with_signature -<SUBSECTION Standard> -EGG_DBUS_VARIANT -EGG_DBUS_IS_VARIANT -EGG_DBUS_TYPE_VARIANT -egg_dbus_variant_get_type -EGG_DBUS_VARIANT_CLASS -EGG_DBUS_IS_VARIANT_CLASS -EGG_DBUS_VARIANT_GET_CLASS -</SECTION> - -<SECTION> -<FILE>eggdbusmisctypes</FILE> -EGG_DBUS_TYPE_INT16 -EGG_DBUS_TYPE_UINT16 -EggDBusParamSpecInt16 -EggDBusParamSpecUInt16 -egg_dbus_param_spec_int16 -egg_dbus_param_spec_uint16 -EGG_DBUS_TYPE_PARAM_INT16 -EGG_DBUS_TYPE_PARAM_UINT16 -EGG_DBUS_IS_PARAM_SPEC_UINT16 -EGG_DBUS_PARAM_SPEC_UINT16 -EGG_DBUS_VALUE_HOLDS_INT16 -EGG_DBUS_VALUE_HOLDS_UINT16 -egg_dbus_value_set_int16 -egg_dbus_value_get_int16 -egg_dbus_value_set_uint16 -egg_dbus_value_get_uint16 -egg_dbus_uint16_get_type -egg_dbus_param_int16_get_type -egg_dbus_param_uint16_get_type +<FILE>eggdbusmethodinvocation</FILE> +<TITLE>EggDBusMethodInvocation</TITLE> +EggDBusMethodInvocation +egg_dbus_method_invocation_new +egg_dbus_method_invocation_get_source_tag +egg_dbus_method_invocation_create_reply_message +egg_dbus_method_invocation_get_connection +egg_dbus_method_invocation_add_destroy_notify +egg_dbus_method_invocation_return_error +egg_dbus_method_invocation_return_error_literal +egg_dbus_method_invocation_return_gerror +egg_dbus_method_invocation_return_dbus_error +egg_dbus_method_invocation_return_dbus_error_literal <SUBSECTION Standard> -EGG_DBUS_PARAM_SPEC_INT16 -EGG_DBUS_IS_PARAM_SPEC_INT16 -egg_dbus_int16_get_type +EGG_DBUS_METHOD_INVOCATION +EGG_DBUS_IS_METHOD_INVOCATION +EGG_DBUS_TYPE_METHOD_INVOCATION +egg_dbus_method_invocation_get_type +EGG_DBUS_METHOD_INVOCATION_CLASS +EGG_DBUS_IS_METHOD_INVOCATION_CLASS +EGG_DBUS_METHOD_INVOCATION_GET_CLASS </SECTION> <SECTION> @@ -507,82 +508,6 @@ EGG_DBUS_ARRAY_SEQ_GET_CLASS </SECTION> <SECTION> -<FILE>eggdbusinterfaceproxy</FILE> -<TITLE>EggDBusInterfaceProxy</TITLE> -EggDBusInterfaceProxy -egg_dbus_interface_proxy_get_object_proxy -egg_dbus_interface_proxy_get_interface_iface -<SUBSECTION Standard> -EGG_DBUS_INTERFACE_PROXY -EGG_DBUS_IS_INTERFACE_PROXY -EGG_DBUS_TYPE_INTERFACE_PROXY -egg_dbus_interface_proxy_get_type -EGG_DBUS_INTERFACE_PROXY_CLASS -EGG_DBUS_IS_INTERFACE_PROXY_CLASS -EGG_DBUS_INTERFACE_PROXY_GET_CLASS -</SECTION> - -<SECTION> -<FILE>eggdbusstructure</FILE> -<TITLE>EggDBusStructure</TITLE> -EggDBusStructure -EGG_DBUS_STRUCTURE_TYPE_CHECK_INSTANCE_CAST -EGG_DBUS_STRUCTURE_TYPE_CHECK_INSTANCE_TYPE -egg_dbus_structure_new -egg_dbus_structure_get_num_elements -egg_dbus_structure_get_element -egg_dbus_structure_get_element_valist -egg_dbus_structure_get_element_as_gvalue -egg_dbus_structure_set_element -egg_dbus_structure_set_element_valist -egg_dbus_structure_set_element_as_gvalue -egg_dbus_structure_get_signature -egg_dbus_structure_get_signature_for_element -egg_dbus_structure_print -<SUBSECTION Standard> -EGG_DBUS_STRUCTURE -EGG_DBUS_IS_STRUCTURE -EGG_DBUS_TYPE_STRUCTURE -egg_dbus_structure_get_type -EGG_DBUS_STRUCTURE_CLASS -EGG_DBUS_IS_STRUCTURE_CLASS -EGG_DBUS_STRUCTURE_GET_CLASS -</SECTION> - -<SECTION> -<FILE>eggdbusconnection</FILE> -<TITLE>EggDBusConnection</TITLE> -EggDBusConnection -EggDBusCallFlags -EggDBusBusType -egg_dbus_connection_get_for_bus -egg_dbus_connection_get_object_proxy -egg_dbus_connection_get_bus -egg_dbus_connection_get_unique_name -egg_dbus_connection_register_interface -egg_dbus_connection_register_interface_valist -egg_dbus_connection_unregister_interface -egg_dbus_connection_unregister_interface_valist -egg_dbus_connection_lookup_interface -egg_dbus_connection_new_message_for_signal -egg_dbus_connection_new_message_for_method_call -egg_dbus_connection_send_message -egg_dbus_connection_send_message_with_reply -egg_dbus_connection_send_message_with_reply_finish -egg_dbus_connection_send_message_with_reply_sync -egg_dbus_connection_pending_call_cancel -egg_dbus_connection_pending_call_block -<SUBSECTION Standard> -EGG_DBUS_CONNECTION -EGG_DBUS_IS_CONNECTION -EGG_DBUS_TYPE_CONNECTION -egg_dbus_connection_get_type -EGG_DBUS_CONNECTION_CLASS -EGG_DBUS_IS_CONNECTION_CLASS -EGG_DBUS_CONNECTION_GET_CLASS -</SECTION> - -<SECTION> <FILE>eggdbusproperties</FILE> EggDBusProperties EggDBusPropertiesIface @@ -609,45 +534,88 @@ EGG_DBUS_PROPERTIES_GET_IFACE </SECTION> <SECTION> -<FILE>eggdbusenumtypes</FILE> -egg_dbus_interface_property_info_flags_get_type -EGG_TYPE_DBUS_INTERFACE_PROPERTY_INFO_FLAGS -egg_dbus_call_flags_get_type -EGG_TYPE_DBUS_CALL_FLAGS -egg_dbus_bus_type_get_type -EGG_TYPE_DBUS_BUS_TYPE -egg_dbus_error_get_type -EGG_TYPE_DBUS_ERROR -egg_dbus_message_type_get_type -EGG_TYPE_DBUS_MESSAGE_TYPE -</SECTION> - -<SECTION> -<FILE>eggdbusstartservicebynamereply</FILE> -egg_dbus_start_service_by_name_reply_get_type -EGG_DBUS_TYPE_START_SERVICE_BY_NAME_REPLY -EggDBusStartServiceByNameReply +<FILE>eggdbusbusnametracker</FILE> +<TITLE>EggDBusBusNameTracker</TITLE> +EggDBusBusNameTracker +egg_dbus_bus_name_tracker_new +egg_dbus_bus_name_tracker_watch_bus_name +egg_dbus_bus_name_tracker_stop_watching_bus_name +egg_dbus_bus_name_tracker_has_info_for_bus_name +egg_dbus_bus_name_tracker_get_owner_for_bus_name +egg_dbus_bus_name_tracker_get_known_well_known_bus_names_for_unique_bus_name +<SUBSECTION Standard> +EGG_DBUS_BUS_NAME_TRACKER +EGG_DBUS_IS_BUS_NAME_TRACKER +EGG_DBUS_TYPE_BUS_NAME_TRACKER +egg_dbus_bus_name_tracker_get_type +EGG_DBUS_BUS_NAME_TRACKER_CLASS +EGG_DBUS_IS_BUS_NAME_TRACKER_CLASS +EGG_DBUS_BUS_NAME_TRACKER_GET_CLASS </SECTION> <SECTION> -<FILE>eggdbussignature</FILE> -EGG_DBUS_TYPE_SIGNATURE -EGG_DBUS_TYPE_SIGNATURE_ARRAY -egg_dbus_signature_get_type -egg_dbus_signature_array_get_type +<FILE>eggdbusstructure</FILE> +<TITLE>EggDBusStructure</TITLE> +EggDBusStructure +EGG_DBUS_STRUCTURE_TYPE_CHECK_INSTANCE_CAST +EGG_DBUS_STRUCTURE_TYPE_CHECK_INSTANCE_TYPE +egg_dbus_structure_new +egg_dbus_structure_get_num_elements +egg_dbus_structure_get_element +egg_dbus_structure_get_element_valist +egg_dbus_structure_get_element_as_gvalue +egg_dbus_structure_set_element +egg_dbus_structure_set_element_valist +egg_dbus_structure_set_element_as_gvalue +egg_dbus_structure_get_signature +egg_dbus_structure_get_signature_for_element +egg_dbus_structure_print +<SUBSECTION Standard> +EGG_DBUS_STRUCTURE +EGG_DBUS_IS_STRUCTURE +EGG_DBUS_TYPE_STRUCTURE +egg_dbus_structure_get_type +EGG_DBUS_STRUCTURE_CLASS +EGG_DBUS_IS_STRUCTURE_CLASS +EGG_DBUS_STRUCTURE_GET_CLASS </SECTION> <SECTION> -<FILE>eggdbusenums</FILE> -EggDBusCallFlags -EggDBusBusType +<FILE>eggdbusmisctypes</FILE> +EGG_DBUS_TYPE_INT16 +EGG_DBUS_TYPE_UINT16 +EggDBusParamSpecInt16 +EggDBusParamSpecUInt16 +egg_dbus_param_spec_int16 +egg_dbus_param_spec_uint16 +EGG_DBUS_TYPE_PARAM_INT16 +EGG_DBUS_TYPE_PARAM_UINT16 +EGG_DBUS_IS_PARAM_SPEC_UINT16 +EGG_DBUS_PARAM_SPEC_UINT16 +EGG_DBUS_VALUE_HOLDS_INT16 +EGG_DBUS_VALUE_HOLDS_UINT16 +egg_dbus_value_set_int16 +egg_dbus_value_get_int16 +egg_dbus_value_set_uint16 +egg_dbus_value_get_uint16 +egg_dbus_uint16_get_type +egg_dbus_param_int16_get_type +egg_dbus_param_uint16_get_type +<SUBSECTION Standard> +EGG_DBUS_PARAM_SPEC_INT16 +EGG_DBUS_IS_PARAM_SPEC_INT16 +egg_dbus_int16_get_type </SECTION> <SECTION> -<FILE>eggdbusrequestnameflags</FILE> -egg_dbus_request_name_flags_get_type -EGG_DBUS_TYPE_REQUEST_NAME_FLAGS -EggDBusRequestNameFlags +<FILE>eggdbusbindingtool</FILE> +get_type_names_for_signature +get_c_marshaller_name_for_args +print_include +print_includes +compute_file_name +get_doc_string +get_summary_doc_string </SECTION> <SECTION> @@ -664,57 +632,101 @@ enum_generate_c_file </SECTION> <SECTION> -<FILE>eggdbuserror</FILE> -EGG_DBUS_ERROR -egg_dbus_error_quark -egg_dbus_error_get_remote_exception -EggDBusError +<FILE>eggdbusstartservicebynamereply</FILE> +egg_dbus_start_service_by_name_reply_get_type +EGG_DBUS_TYPE_START_SERVICE_BY_NAME_REPLY +EggDBusStartServiceByNameReply </SECTION> <SECTION> -<FILE>eggdbusbindingsmarshal</FILE> +<FILE>eggdbustypes</FILE> +EggDBusArray +EggDBusList +EggDBusHashTable +EggDBusConnection +EggDBusObjectProxy +EggDBusInterfaceProxy +EggDBusMessage +EggDBusVariant +EggDBusStructure +EggDBusAnonymousStructure +EggDBusInterface +EggDBusInterfaceIface +EggDBusInterfaceAnnotationInfo +EggDBusInterfaceArgInfo +EggDBusInterfacePropertyInfo +EggDBusInterfaceMethodInfo +EggDBusInterfaceSignalInfo +EggDBusInterfaceInfo +EggDBusInterfaceNodeInfo +EggDBusBus +EggDBusPeer +EggDBusProperties +EggDBusIntrospectable +EggDBusBusNameTracker +EggDBusMethodInvocation +EggDBusParamSpecInt16 +EggDBusParamSpecUInt16 +EggDBusObjectPath +EggDBusObjectPathArray +EggDBusSignature +EggDBusSignatureArray +egg_dbus_structure_type_check_instance_cast +egg_dbus_structure_type_check_instance_type +EggDBusArraySeq +EggDBusHashMap </SECTION> <SECTION> -<FILE>eggdbusreleasenamereply</FILE> -egg_dbus_release_name_reply_get_type -EGG_DBUS_TYPE_RELEASE_NAME_REPLY -EggDBusReleaseNameReply +<FILE>eggdbuserror</FILE> +EGG_DBUS_ERROR +egg_dbus_error_quark +egg_dbus_error_get_remote_exception +EggDBusError </SECTION> <SECTION> -<FILE>eggdbuslist</FILE> -EGG_DBUS_TYPE_LIST -egg_dbus_list_get_type -egg_dbus_list_get_elem_signature -egg_dbus_list_set_elem_signature -egg_dbus_list_free -egg_dbus_list_copy -egg_dbus_list_print +<FILE>eggdbusenumtypes</FILE> +egg_dbus_interface_property_info_flags_get_type +EGG_TYPE_DBUS_INTERFACE_PROPERTY_INFO_FLAGS +egg_dbus_call_flags_get_type +EGG_TYPE_DBUS_CALL_FLAGS +egg_dbus_bus_type_get_type +EGG_TYPE_DBUS_BUS_TYPE +egg_dbus_error_get_type +EGG_TYPE_DBUS_ERROR +egg_dbus_message_type_get_type +EGG_TYPE_DBUS_MESSAGE_TYPE </SECTION> <SECTION> -<FILE>eggdbusprivate</FILE> +<FILE>eggdbus</FILE> </SECTION> <SECTION> -<FILE>eggdbus</FILE> +<FILE>eggdbusreleasenamereply</FILE> +egg_dbus_release_name_reply_get_type +EGG_DBUS_TYPE_RELEASE_NAME_REPLY +EggDBusReleaseNameReply </SECTION> <SECTION> -<FILE>eggdbusbindingtool</FILE> -get_type_names_for_signature -get_c_marshaller_name_for_args -print_include -print_includes -compute_file_name -get_doc_string -get_summary_doc_string +<FILE>eggdbussignature</FILE> +EGG_DBUS_TYPE_SIGNATURE +EGG_DBUS_TYPE_SIGNATURE_ARRAY +egg_dbus_signature_get_type +egg_dbus_signature_array_get_type </SECTION> <SECTION> -<FILE>eggdbusmarshal</FILE> -eggdbus_marshal_VOID__STRING_STRING +<FILE>eggdbusarray</FILE> +EGG_DBUS_TYPE_ARRAY +egg_dbus_array_get_type +egg_dbus_array_get_elem_signature +egg_dbus_array_set_elem_signature +egg_dbus_array_free +egg_dbus_array_copy +egg_dbus_array_print </SECTION> <SECTION> @@ -736,6 +748,25 @@ egg_dbus_double_equal </SECTION> <SECTION> +<FILE>eggdbusobjectpath</FILE> +EGG_DBUS_TYPE_OBJECT_PATH +EGG_DBUS_TYPE_OBJECT_PATH_ARRAY +egg_dbus_object_path_get_type +egg_dbus_object_path_array_get_type +</SECTION> + +<SECTION> +<FILE>eggdbusprivate</FILE> +</SECTION> + +<SECTION> +<FILE>eggdbusrequestnameflags</FILE> +egg_dbus_request_name_flags_get_type +EGG_DBUS_TYPE_REQUEST_NAME_FLAGS +EggDBusRequestNameFlags +</SECTION> + +<SECTION> <FILE>eggdbusrequestnamereply</FILE> egg_dbus_request_name_reply_get_type EGG_DBUS_TYPE_REQUEST_NAME_REPLY @@ -743,11 +774,23 @@ EggDBusRequestNameReply </SECTION> <SECTION> -<FILE>eggdbusobjectpath</FILE> -EGG_DBUS_TYPE_OBJECT_PATH -EGG_DBUS_TYPE_OBJECT_PATH_ARRAY -egg_dbus_object_path_get_type -egg_dbus_object_path_array_get_type +<FILE>eggdbusmarshal</FILE> +eggdbus_marshal_VOID__STRING_STRING +</SECTION> + +<SECTION> +<FILE>eggdbusbindingsmarshal</FILE> +</SECTION> + +<SECTION> +<FILE>eggdbuslist</FILE> +EGG_DBUS_TYPE_LIST +egg_dbus_list_get_type +egg_dbus_list_get_elem_signature +egg_dbus_list_set_elem_signature +egg_dbus_list_free +egg_dbus_list_copy +egg_dbus_list_print </SECTION> <SECTION> @@ -760,53 +803,3 @@ egg_dbus_param_spec_for_signature egg_dbus_get_type_for_signature </SECTION> -<SECTION> -<FILE>eggdbustypes</FILE> -EggDBusArray -EggDBusList -EggDBusHashTable -EggDBusConnection -EggDBusObjectProxy -EggDBusInterfaceProxy -EggDBusMessage -EggDBusVariant -EggDBusStructure -EggDBusAnonymousStructure -EggDBusInterface -EggDBusInterfaceIface -EggDBusInterfaceAnnotationInfo -EggDBusInterfaceArgInfo -EggDBusInterfacePropertyInfo -EggDBusInterfaceMethodInfo -EggDBusInterfaceSignalInfo -EggDBusInterfaceInfo -EggDBusInterfaceNodeInfo -EggDBusBus -EggDBusPeer -EggDBusProperties -EggDBusIntrospectable -EggDBusBusNameTracker -EggDBusMethodInvocation -EggDBusParamSpecInt16 -EggDBusParamSpecUInt16 -EggDBusObjectPath -EggDBusObjectPathArray -EggDBusSignature -EggDBusSignatureArray -egg_dbus_structure_type_check_instance_cast -egg_dbus_structure_type_check_instance_type -EggDBusArraySeq -EggDBusHashMap -</SECTION> - -<SECTION> -<FILE>eggdbusarray</FILE> -EGG_DBUS_TYPE_ARRAY -egg_dbus_array_get_type -egg_dbus_array_get_elem_signature -egg_dbus_array_set_elem_signature -egg_dbus_array_free -egg_dbus_array_copy -egg_dbus_array_print -</SECTION> - diff --git a/src/eggdbus/eggdbushashmap.c b/src/eggdbus/eggdbushashmap.c index a66cd09..43d33aa 100644 --- a/src/eggdbus/eggdbushashmap.c +++ b/src/eggdbus/eggdbushashmap.c @@ -32,9 +32,19 @@ * @title: EggDBusHashMap * @short_description: Hash Maps * + * A map type for that maps keys from one #GType to values of another #GType using hashing. + * See egg_dbus_hash_map_new() for details. + * + * By default, the map takes ownership when inserting key/value pairs meaning that the programmer gives + * up his references. Values looked up from the map are owned by the array. There is also convenience + * API to get a copy of the value, see egg_dbus_hash_map_lookup_copy(). + * + * Note that this class exposes a number of implementation details directly in the class + * instance structure for efficient and convenient access when used from the C programming + * language. Use with caution. For the same reasons, this class also provides a number of + * convenience functions for dealing with fixed-size integral and floating point numbers. */ - typedef struct { gpointer (*key_copy_func) (EggDBusHashMap *hash_map, gconstpointer element); @@ -238,6 +248,19 @@ egg_dbus_hash_map_class_init (EggDBusHashMapClass *klass) /* ---------------------------------------------------------------------------------------------------- */ +/** + * egg_dbus_hash_map_new: + * @key_type: The type of the keys in the map. + * @key_free_func: Function to be used to free keys or %NULL. + * @value_type: The type of the values in the map. + * @value_free_func: Function to be used to free values or %NULL. + * + * Creates a new hash map for mapping keys of type @key_type to values of type @value_type. + * + * See egg_dbus_hash_map_new_full() for a more complicated version of this function. + * + * Returns: A #EggDBusHashMap. Free with g_object_unref(). + **/ EggDBusHashMap * egg_dbus_hash_map_new (GType key_type, GDestroyNotify key_free_func, @@ -255,6 +278,46 @@ egg_dbus_hash_map_new (GType key_type, NULL); } +/** + * egg_dbus_hash_map_new_full: + * @key_type: The type of the keys in the map. + * @key_hash_func: Hash function for keys or %NULL to use the default hash function if one such exists. + * @key_equal_func: Function to compare keys or %NULL to use the default equality function if one such exists. + * @key_free_func: Function to be used to free keys or %NULL. + * @key_copy_func: Function to copy keys or %NULL to use the default copy function if one such exists. + * @value_type: The type of the values in the map. + * @value_free_func: Function to be used to free values or %NULL. + * @value_copy_func: Function to copy values or %NULL to use the default copy function if one such exists. + * @value_equal_func: Function to compare values or %NULL to use the default equality function if one such exists. + * + * Creates a new hash map for mapping keys of type @key_type to values of type @value_type. + * The map will use @key_free_func and @value_free_func to free keys and values respectively. + * If either of these functions are %NULL, it's the responsibility of the owner to make sure + * any keys or values inserted into the map are freed. + * + * If either of @key_hash_func or @key_equal_func is %NULL a default hash or equality function + * will be used if one such exists (for example one exists for #G_TYPE_STRING, #G_TYPE_INT and + * so on). If a hash or equality function wasn't given and no default hash function exists, it + * is a programming error and a warning will be reported using g_error() (causing program + * termination). + * + * If either of @key_copy_func or @value_copy_func is %NULL default copy functions will be used + * if available (for example there is no default copy function for #G_TYPE_POINTER or + * derived types). Note that <emphasis>optional</emphasis> methods such as egg_dbus_hash_map_lookup_copy() + * won't work if there is no value copy function. + * + * Normally the hash map stores pointers to both key and values and the methods taking and + * returning keys or values will also take pointers to keys or values. However, for fixed-size integral + * types that fits in a pointer (such as #G_TYPE_INT or #G_TYPE_BOOLEAN), the key or value is stored + * in the pointer to avoid allocating memory. Typically this is not something you need to care about + * as such implementation details are hidden behind convenience API like egg_dbus_hash_map_insert_fixed_ptr() + * or egg_dbus_hash_map_lookup_fixed(). + * + * Note that it is a programming error to pass a free function for fixed-size types (e.g. integral + * or floating point types); a warning will be reported using g_error() (causing program termination). + * + * Returns: A #EggDBusHashMap. Free with g_object_unref(). + **/ EggDBusHashMap * egg_dbus_hash_map_new_full (GType key_type, GHashFunc key_hash_func, @@ -515,24 +578,54 @@ egg_dbus_hash_map_new_full (GType key_type, return hash_map; } +/** + * egg_dbus_hash_map_get_size: + * @hash_map: A #EggDBusHashMap. + * + * Gets the number of key/value pairs in @hash_map. + * + * Returns: The number of key/value pairs in @hash_map. + **/ guint egg_dbus_hash_map_get_size (EggDBusHashMap *hash_map) { return g_hash_table_size (hash_map->data); } +/** + * egg_dbus_hash_map_get_key_type: + * @hash_map: A #EggDBusHashMap. + * + * Gets the type of the keys in @hash_map. + * + * Returns: The #GType of keys in @hash_map. + **/ GType egg_dbus_hash_map_get_key_type (EggDBusHashMap *hash_map) { return hash_map->key_type; } +/** + * egg_dbus_hash_map_get_value_type: + * @hash_map: A #EggDBusHashMap. + * + * Gets the type of the values in @hash_map. + * + * Returns: The #GType of values in @hash_map. + **/ GType egg_dbus_hash_map_get_value_type (EggDBusHashMap *hash_map) { return hash_map->value_type; } +/** + * egg_dbus_hash_map_clear: + * @hash_map: A #EggDBusHashMap. + * + * Removes all key/value pairs from @hash_map. + **/ void egg_dbus_hash_map_clear (EggDBusHashMap *hash_map) { @@ -541,6 +634,19 @@ egg_dbus_hash_map_clear (EggDBusHashMap *hash_map) hash_map); } +/** + * egg_dbus_hash_map_insert: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * If a @value_free_func was supplied when creating @hash_map, the old value is freed using + * that function. If a @key_free_func was supplied when creating @hash_map, the passed key + * is freed using that function. + **/ void egg_dbus_hash_map_insert (EggDBusHashMap *hash_map, gconstpointer key, @@ -554,6 +660,15 @@ egg_dbus_hash_map_insert (EggDBusHashMap *hash_map, g_hash_table_insert (hash_map->data, (gpointer) key, (gpointer) value); } +/** + * egg_dbus_hash_map_contains: + * @hash_map: A #EggDBusHashMap. + * @key: Key to check for. + * + * Checks if @hash_map contains a value for @key. + * + * Returns: %TRUE only if @hash_map contains a value for @key. + **/ gboolean egg_dbus_hash_map_contains (EggDBusHashMap *hash_map, gconstpointer key) @@ -561,6 +676,21 @@ egg_dbus_hash_map_contains (EggDBusHashMap *hash_map, return g_hash_table_lookup_extended (hash_map->data, key, NULL, NULL); } +/** + * egg_dbus_hash_map_lookup: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value %NULL. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * Note that the returned value is owned by @hash_map and may be invalid if + * later removed from the map. If you want a copy, use egg_dbus_hash_map_lookup_copy() + * instead. + * + * Returns: The value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup (EggDBusHashMap *hash_map, gconstpointer key) @@ -585,6 +715,21 @@ check_have_value_copy_func (EggDBusHashMap *hash_map) return FALSE; } +/** + * egg_dbus_hash_map_lookup_copy: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Like egg_dbus_hash_map_lookup() but returns a copy of the value. + * + * This method is <emphasis>optional</emphasis> as some value types (for example #G_TYPE_POINTER + * and derived types) have no natural copy function and one might not have been set when @hash_map + * was constructed. It is a programming error to call this method on @hash_map if there + * is no value copy function on @hash_map (a warning will be printed using g_error() causing program + * termination). + * + * Returns: A copy of the value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup_copy (EggDBusHashMap *hash_map, gconstpointer key) @@ -602,6 +747,19 @@ egg_dbus_hash_map_lookup_copy (EggDBusHashMap *hash_map, return priv->value_copy_func (hash_map, value); } +/** + * egg_dbus_hash_map_remove: + * @hash_map: A #EggDBusHashMap. + * @key: Key to remove. + * + * Removes a key and it associated value from @hash_map. + * + * If a @value_free_func was supplied when creating @hash_map, the value is freed using + * that function. If a @key_free_func was supplied when creating @hash_map, the key in + * the map is freed using that function. + * + * Returns: %TRUE if @key was removed from @hash_map. + **/ gboolean egg_dbus_hash_map_remove (EggDBusHashMap *hash_map, gconstpointer key) @@ -625,6 +783,18 @@ egg_dbus_hash_map_remove (EggDBusHashMap *hash_map, /* C convenience follows here */ /* ---------------------------------------------------------------------------------------------------- */ +/** + * egg_dbus_hash_map_contains_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to check for. + * + * Checks if @hash_map contains a value for @key. + * + * This is a C convenience function for when the key type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: %TRUE only if @hash_map contains a value for @key. + **/ gboolean egg_dbus_hash_map_contains_fixed (EggDBusHashMap *hash_map, guint64 key) @@ -636,6 +806,18 @@ egg_dbus_hash_map_contains_fixed (EggDBusHashMap *hash_map, return egg_dbus_hash_map_contains (hash_map, &key); } +/** + * egg_dbus_hash_map_contains_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to check for. + * + * Checks if @hash_map contains a value for @key. + * + * This is a C convenience function for when the key type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: %TRUE only if @hash_map contains a value for @key. + **/ gboolean egg_dbus_hash_map_contains_float (EggDBusHashMap *hash_map, gdouble key) @@ -649,6 +831,20 @@ egg_dbus_hash_map_contains_float (EggDBusHashMap *hash_map, /* ---------------------------------------------------------------------------------------------------- */ +/** + * egg_dbus_hash_map_lookup_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value %NULL. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the key type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: The value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup_fixed (EggDBusHashMap *hash_map, guint64 key) @@ -660,6 +856,20 @@ egg_dbus_hash_map_lookup_fixed (EggDBusHashMap *hash_map, return egg_dbus_hash_map_lookup (hash_map, &key); } +/** + * egg_dbus_hash_map_lookup_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value %NULL. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the key type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: The value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup_float (EggDBusHashMap *hash_map, gdouble key) @@ -671,6 +881,24 @@ egg_dbus_hash_map_lookup_float (EggDBusHashMap *hash_map, return egg_dbus_hash_map_lookup (hash_map, &key_float); } +/** + * egg_dbus_hash_map_lookup_fixed_copy: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Like egg_dbus_hash_map_lookup_fixed() but returns a copy of the value. + * + * This method is <emphasis>optional</emphasis> as some value types (for example #G_TYPE_POINTER + * and derived types) have no natural copy function and one might not have been set when @hash_map + * was constructed. It is a programming error to call this method on @hash_map if there + * is no value copy function on @hash_map (a warning will be printed using g_error() causing program + * termination). + * + * This is a C convenience function for when the key type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: A copy of the value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup_fixed_copy (EggDBusHashMap *hash_map, guint64 key) @@ -682,6 +910,24 @@ egg_dbus_hash_map_lookup_fixed_copy (EggDBusHashMap *hash_map, return egg_dbus_hash_map_lookup_copy (hash_map, &key); } +/** + * egg_dbus_hash_map_lookup_float_copy: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Like egg_dbus_hash_map_lookup_float() but returns a copy of the value. + * + * This method is <emphasis>optional</emphasis> as some value types (for example #G_TYPE_POINTER + * and derived types) have no natural copy function and one might not have been set when @hash_map + * was constructed. It is a programming error to call this method on @hash_map if there + * is no value copy function on @hash_map (a warning will be printed using g_error() causing program + * termination). + * + * This is a C convenience function for when the key type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: A copy of the value associated with @key or %NULL. + **/ gpointer egg_dbus_hash_map_lookup_float_copy (EggDBusHashMap *hash_map, gdouble key) @@ -695,6 +941,20 @@ egg_dbus_hash_map_lookup_float_copy (EggDBusHashMap *hash_map, /* ---------------------------------------------------------------------------------------------------- */ +/** + * egg_dbus_hash_map_lookup_ptr_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the value type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: The value associated with @key or 0. + **/ guint64 egg_dbus_hash_map_lookup_ptr_fixed (EggDBusHashMap *hash_map, gconstpointer key) @@ -707,6 +967,20 @@ egg_dbus_hash_map_lookup_ptr_fixed (EggDBusHashMap *hash_map, return val != NULL ? *val : 0; } +/** + * egg_dbus_hash_map_lookup_ptr_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0.0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the value type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: The value associated with @key or 0.0. + **/ gdouble egg_dbus_hash_map_lookup_ptr_float (EggDBusHashMap *hash_map, gconstpointer key) @@ -718,6 +992,20 @@ egg_dbus_hash_map_lookup_ptr_float (EggDBusHashMap *hash_map, return val != NULL ? *((gfloat *) val) : 0.0; } +/** + * egg_dbus_hash_map_lookup_fixed_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when both the key and value types are integral + * types (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: The value associated with @key or 0. + **/ guint64 egg_dbus_hash_map_lookup_fixed_fixed (EggDBusHashMap *hash_map, guint64 key) @@ -730,6 +1018,21 @@ egg_dbus_hash_map_lookup_fixed_fixed (EggDBusHashMap *hash_map, return val != NULL ? *val : 0; } +/** + * egg_dbus_hash_map_lookup_fixed_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0.0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the key type is an integral type + * (#G_TYPE_INT, #G_TYPE_UINT64 and so on) and value type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: The value associated with @key or 0.0. + **/ gdouble egg_dbus_hash_map_lookup_fixed_float (EggDBusHashMap *hash_map, guint64 key) @@ -741,6 +1044,21 @@ egg_dbus_hash_map_lookup_fixed_float (EggDBusHashMap *hash_map, return val != NULL ? *((gfloat *) val) : 0.0; } +/** + * egg_dbus_hash_map_lookup_float_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when the key type is a floating point type + * (#G_TYPE_FLOAT and #G_TYPE_DOUBLE) and the value type is an integral type + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: The value associated with @key or 0. + **/ guint64 egg_dbus_hash_map_lookup_float_fixed (EggDBusHashMap *hash_map, gdouble key) @@ -753,6 +1071,20 @@ egg_dbus_hash_map_lookup_float_fixed (EggDBusHashMap *hash_map, return val != NULL ? *val : 0; } +/** + * egg_dbus_hash_map_lookup_float_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to look up value for. + * + * Looks up the value associated with @key in @hash_map. Note that this function + * cannot distinguish between a key that is not present and one which is present + * but has the value 0.0. If you need this distinction, use egg_dbus_hash_map_contains(). + * + * This is a C convenience function for when both the key and value type are floating point + * types (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: The value associated with @key or 0.0. + **/ gdouble egg_dbus_hash_map_lookup_float_float (EggDBusHashMap *hash_map, gdouble key) @@ -766,6 +1098,21 @@ egg_dbus_hash_map_lookup_float_float (EggDBusHashMap *hash_map, /* ---------------------------------------------------------------------------------------------------- */ +/** + * egg_dbus_hash_map_remove_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to remove. + * + * Removes a key and it associated value from @hash_map. + * + * If a @value_free_func was supplied when creating @hash_map, the value is freed using + * that function. + * + * This is a C convenience function for when the key type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + * + * Returns: %TRUE if @key was removed from @hash_map. + **/ gboolean egg_dbus_hash_map_remove_fixed (EggDBusHashMap *hash_map, guint64 key) @@ -777,6 +1124,21 @@ egg_dbus_hash_map_remove_fixed (EggDBusHashMap *hash_map, return egg_dbus_hash_map_remove (hash_map, &key); } +/** + * egg_dbus_hash_map_remove_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to remove. + * + * Removes a key and it associated value from @hash_map. + * + * If a @value_free_func was supplied when creating @hash_map, the value is freed using + * that function. + * + * This is a C convenience function for when the key type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + * + * Returns: %TRUE if @key was removed from @hash_map. + **/ gboolean egg_dbus_hash_map_remove_float (EggDBusHashMap *hash_map, gdouble key) @@ -834,6 +1196,21 @@ val_float_to_ptr (EggDBusHashMap *hash_map, return g_memdup (&value_gfloat, sizeof (gfloat)); } +/** + * egg_dbus_hash_map_insert_ptr_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * If a @key_free_func was supplied when creating @hash_map, the passed key + * is freed using that function. + * + * This is a C convenience function for when the value type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + **/ void egg_dbus_hash_map_insert_ptr_fixed (EggDBusHashMap *hash_map, gconstpointer key, @@ -842,6 +1219,21 @@ egg_dbus_hash_map_insert_ptr_fixed (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key, val_fixed_to_ptr (hash_map, value)); } +/** + * egg_dbus_hash_map_insert_ptr_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * If a @key_free_func was supplied when creating @hash_map, the passed key + * is freed using that function. + * + * This is a C convenience function for when the value type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + **/ void egg_dbus_hash_map_insert_ptr_float (EggDBusHashMap *hash_map, gconstpointer key, @@ -850,6 +1242,21 @@ egg_dbus_hash_map_insert_ptr_float (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key, val_float_to_ptr (hash_map, value)); } +/** + * egg_dbus_hash_map_insert_fixed_ptr: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * If a @value_free_func was supplied when creating @hash_map, the old value is freed using + * that function. + * + * This is a C convenience function for when the key type is an integral + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + **/ void egg_dbus_hash_map_insert_fixed_ptr (EggDBusHashMap *hash_map, guint64 key, @@ -858,6 +1265,19 @@ egg_dbus_hash_map_insert_fixed_ptr (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key_fixed_to_ptr (hash_map, key), value); } +/** + * egg_dbus_hash_map_insert_fixed_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * + * This is a C convenience function for when both the key and value types are integral + * types (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + **/ void egg_dbus_hash_map_insert_fixed_fixed (EggDBusHashMap *hash_map, guint64 key, @@ -866,6 +1286,20 @@ egg_dbus_hash_map_insert_fixed_fixed (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key_fixed_to_ptr (hash_map, key), val_fixed_to_ptr (hash_map, value)); } +/** + * egg_dbus_hash_map_insert_fixed_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * + * This is a C convenience function for when the key type is an integral type + * (#G_TYPE_INT, #G_TYPE_UINT64 and so on) and value type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + **/ void egg_dbus_hash_map_insert_fixed_float (EggDBusHashMap *hash_map, guint64 key, @@ -874,6 +1308,21 @@ egg_dbus_hash_map_insert_fixed_float (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key_fixed_to_ptr (hash_map, key), val_float_to_ptr (hash_map, value)); } +/** + * egg_dbus_hash_map_insert_float_ptr: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * If a @value_free_func was supplied when creating @hash_map, the old value is freed using + * that function. + * + * This is a C convenience function for when the key type is a floating point + * type (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + **/ void egg_dbus_hash_map_insert_float_ptr (EggDBusHashMap *hash_map, gdouble key, @@ -882,6 +1331,20 @@ egg_dbus_hash_map_insert_float_ptr (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key_float_to_ptr (hash_map, key), value); } +/** + * egg_dbus_hash_map_insert_float_fixed: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * + * This is a C convenience function for when the key type is a floating point type + * (#G_TYPE_FLOAT and #G_TYPE_DOUBLE) and the value type is an integral type + * type (#G_TYPE_INT, #G_TYPE_UINT64 and so on). + **/ void egg_dbus_hash_map_insert_float_fixed (EggDBusHashMap *hash_map, gdouble key, @@ -890,6 +1353,19 @@ egg_dbus_hash_map_insert_float_fixed (EggDBusHashMap *hash_map, egg_dbus_hash_map_insert (hash_map, key_float_to_ptr (hash_map, key), val_fixed_to_ptr (hash_map, value)); } +/** + * egg_dbus_hash_map_insert_float_float: + * @hash_map: A #EggDBusHashMap. + * @key: Key to insert. + * @value: Value to insert. + * + * Inserts a new key and value into @hash_map. + * + * If the key already exists in the @hash_map its current value is replaced with the new value. + * + * This is a C convenience function for when both the key and value type are floating point + * types (#G_TYPE_FLOAT and #G_TYPE_DOUBLE). + **/ void egg_dbus_hash_map_insert_float_float (EggDBusHashMap *hash_map, gdouble key, @@ -899,4 +1375,3 @@ egg_dbus_hash_map_insert_float_float (EggDBusHashMap *hash_map, } /* ---------------------------------------------------------------------------------------------------- */ - |