Address parsing
[D-Bus secret internal implementation details]

Implementation of parsing addresses of D-Bus servers. More...

Data Structures

struct  DBusAddressEntry
 Internals of DBusAddressEntry. More...

Defines

#define _DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE(b)
 TRUE if the byte need not be escaped when found in a dbus address.

Functions

void _dbus_set_bad_address (DBusError *error, const char *address_problem_type, const char *address_problem_field, const char *address_problem_other)
 Sets DBUS_ERROR_BAD_ADDRESS.
dbus_bool_t _dbus_address_append_escaped (DBusString *escaped, const DBusString *unescaped)
 Appends an escaped version of one string to another string, using the D-Bus address escaping mechanism.

Detailed Description

Implementation of parsing addresses of D-Bus servers.


Define Documentation

#define _DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE (  ) 

Value:

(((b) >= 'a' && (b) <= 'z') ||                 \
          ((b) >= 'A' && (b) <= 'Z') ||                 \
          ((b) >= '0' && (b) <= '9') ||                 \
          (b) == '-' ||                                 \
          (b) == '_' ||                                 \
          (b) == '/' ||                                 \
          (b) == '\\' ||                                \
          (b) == '.')
TRUE if the byte need not be escaped when found in a dbus address.

All other bytes are required to be escaped in a valid address.

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

Referenced by _dbus_address_append_escaped().


Function Documentation

dbus_bool_t _dbus_address_append_escaped ( DBusString escaped,
const DBusString unescaped 
)

Appends an escaped version of one string to another string, using the D-Bus address escaping mechanism.

Parameters:
escaped the string to append to
unescaped the string to escape
Returns:
FALSE if no memory

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

References _DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE, _dbus_string_append_byte(), _dbus_string_append_byte_as_hex(), _dbus_string_set_length(), FALSE, and TRUE.

Referenced by _dbus_server_new_for_domain_socket(), _dbus_server_new_for_tcp_socket(), and dbus_address_escape_value().

void _dbus_set_bad_address ( DBusError error,
const char *  address_problem_type,
const char *  address_problem_field,
const char *  address_problem_other 
)

Sets DBUS_ERROR_BAD_ADDRESS.

If address_problem_type and address_problem_field are not NULL, sets an error message about how the field is no good. Otherwise, sets address_problem_other as the error message.

Parameters:
error the error to set
address_problem_type the address type of the bad address or NULL
address_problem_field the missing field of the bad address or NULL
address_problem_other any other error message or NULL

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

References DBUS_ERROR_BAD_ADDRESS, dbus_set_error(), and NULL.

Referenced by _dbus_server_listen_platform_specific(), _dbus_server_listen_socket(), _dbus_transport_open(), _dbus_transport_open_platform_specific(), and _dbus_transport_open_socket().


Generated on Fri Sep 21 18:12:13 2007 for D-Bus by  doxygen 1.5.1