Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

Address parsing
[D-BUS message system public API]

Parsing addresses of D-BUS servers. More...

Data Structures

struct  DBusAddressEntry

Functions

void dbus_address_entries_free (DBusAddressEntry **entries)
 Frees a NULL-terminated array of address entries.

const char * dbus_address_entry_get_method (DBusAddressEntry *entry)
 Returns the method string of an address entry.

const char * dbus_address_entry_get_value (DBusAddressEntry *entry, const char *key)
 Returns a value from a key of an entry.

dbus_bool_t dbus_parse_address (const char *address, DBusAddressEntry ***entry, int *array_len, DBusError *error)
 Parses an address string of the form:.


Detailed Description

Parsing addresses of D-BUS servers.


Function Documentation

void dbus_address_entries_free DBusAddressEntry **    entries
 

Frees a NULL-terminated array of address entries.

Parameters:
entries the array.

Definition at line 81 of file dbus-address.c.

References dbus_free(), and NULL.

Referenced by _dbus_transport_open(), and dbus_server_listen().

const char* dbus_address_entry_get_method DBusAddressEntry *    entry
 

Returns the method string of an address entry.

Parameters:
entry the entry.
Returns:
a string describing the method. This string must not be freed.

Definition at line 117 of file dbus-address.c.

References _dbus_string_get_const_data().

Referenced by _dbus_transport_open(), and dbus_server_listen().

const char* dbus_address_entry_get_value DBusAddressEntry *    entry,
const char *    key
 

Returns a value from a key of an entry.

Parameters:
entry the entry.
key the key.
Returns:
the key value. This string must not be fred.

Definition at line 130 of file dbus-address.c.

References _dbus_assert, _dbus_list_get_first_link(), _dbus_list_get_next_link, _dbus_string_equal_c_str(), _dbus_string_get_const_data(), DBusList::data, and NULL.

Referenced by _dbus_transport_open(), and dbus_server_listen().

dbus_bool_t dbus_parse_address const char *    address,
DBusAddressEntry ***    entry,
int *    array_len,
DBusError *    error
 

Parses an address string of the form:.

method:key=value,key=value;method:key=value

Todo:
document address format in the specification

need to be able to escape ';' and ',' in the key values, and the parsing needs to handle that.

Parameters:
address the address.
entry return location to an array of entries.
array_len return location for array length.
error address where an error can be returned.
Returns:
TRUE on success, FALSE otherwise.

Definition at line 169 of file dbus-address.c.

References _dbus_list_append(), _dbus_list_clear(), _dbus_list_get_first_link(), _dbus_list_get_length(), _dbus_list_get_next_link, _dbus_string_copy_len(), _dbus_string_find(), _dbus_string_find_to(), _dbus_string_free(), _dbus_string_get_length(), _dbus_string_init(), _dbus_string_init_const(), DBusList::data, dbus_free(), dbus_new, dbus_new0, dbus_set_error(), FALSE, NULL, and TRUE.

Referenced by _dbus_transport_open(), and dbus_server_listen().


Generated on Wed Oct 22 14:05:06 2003 for D-BUS by doxygen1.3-rc3