D-Bus 1.13.14

Typedefs | Functions

Address parsing

D-Bus low-level public API

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

Typedefs
typedef struct DBusAddressEntry DBusAddressEntry
Opaque type representing one of the semicolon-separated items in an address.
Functions
void dbus_address_entries_free (DBusAddressEntry **entries)
Frees a NULL-terminated array of address entries. More...
const char * dbus_address_entry_get_method (DBusAddressEntry *entry)
Returns the method string of an address entry. More...
const char * dbus_address_entry_get_value (DBusAddressEntry *entry, const char *key)
Returns a value from a key of an entry. More...
dbus_bool_t dbus_parse_address (const char *address, DBusAddressEntry ***entry_result, int *array_len, DBusError *error)
Parses an address string of the form: More...
char * dbus_address_escape_value (const char *value)
Escapes the given string as a value in a key=value pair for a D-Bus address. More...
char * dbus_address_unescape_value (const char *value, DBusError *error)
Unescapes the given string as a value in a key=value pair for a D-Bus address. More...

Detailed Description

Parsing addresses of D-Bus servers.

解析D-Bus服务器的地址。

Function Documentation

dbus_address_entries_free()

DBUS_EXPORT void dbus_address_entries_free ( DBusAddressEntry ** entries )

Frees a NULL-terminated array of address entries.

释放以NULL结尾的地址项数组。

  • Parameters

    ​ entries the array.

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

References dbus_free(), and NULL.

dbus_address_entry_get_method()

const DBUS_EXPORT char * dbus_address_entry_get_method ( DBusAddressEntry * entry )

Returns the method string of an address entry.

For example, given the address entry "tcp:host=example.com" it would return the string "tcp"

返回地址项的方法字符串。

例如,给定地址项目“ tcp:host = example.com”,它将返回字符串“ tcp”

  • Parameters

    ​ entry the entry.

  • Returns

    a string describing the method. This string must not be freed.

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

References DBusAddressEntry::method.

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

dbus_address_entry_get_value()

const DBUS_EXPORT char * dbus_address_entry_get_value ( DBusAddressEntry * entry,
const char * key
)

Returns a value from a key of an entry.

For example, given the address "tcp:host=example.com,port=8073" if you asked for the key "host" you would get the value "example.com"

The returned value is already unescaped.

从条目的键返回对应的值。

例如,给定地址“ tcp:host = example.com,port = 8073”,如果您要求键“ host”,则将获得值“ example.com”

返回的值已经被转义。

  • Parameters

    ​ entry the entry.

    ​ key the key.

  • Returns

    the key value. This string must not be freed.

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

References _dbus_assert, _dbus_list_get_first_link(), _dbus_list_get_next_link, _dbus_string_equal_c_str(), DBusList::data, DBusAddressEntry::keys, NULL, and DBusAddressEntry::values.

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

dbus_address_escape_value()

DBUS_EXPORT char * dbus_address_escape_value ( const char * value )

Escapes the given string as a value in a key=value pair for a D-Bus address.

将给定的字符串转义为D-Bus地址的键=值对中的值。

  • Parameters

    ​ value the unescaped value

  • Returns

    newly-allocated escaped value or NULL if no memory

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

References _dbus_address_append_escaped(), _dbus_string_free(), _dbus_string_init(), _dbus_string_init_const(), _dbus_string_steal_data(), and NULL.

dbus_address_unescape_value()

DBUS_EXPORT char * dbus_address_unescape_value ( const char * value,
DBusError * error
)

Unescapes the given string as a value in a key=value pair for a D-Bus address.

Note that dbus_address_entry_get_value() returns an already-unescaped value.

将给定的字符串取消转义为D-Bus地址的key = value对中的值。

请注意,dbus_address_entry_get_value()返回一个已经转义的值。

  • Parameters

    ​ value the escaped value

    ​ error error to set if the unescaping fails

  • Returns

    newly-allocated unescaped value or NULL if no memory

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

References _dbus_string_init(), _dbus_string_init_const(), and NULL.

dbus_parse_address()

DBUS_EXPORT dbus_bool_t dbus_parse_address ( const char * address,
DBusAddressEntry *** entry_result,
int * array_len,
DBusError * error
)

Parses an address string of the form:

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

See the D-Bus specification for complete docs on the format.

When connecting to an address, the first address entries in the semicolon-separated list should be tried first.

解析以下形式的地址字符串:

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

有关格式的完整文档,请参见D-Bus规范。

连接到地址时,应首先尝试以分号分隔的列表中的第一个地址条目。

  • Parameters

    address the address.
    entry_result 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 366 of file dbus-address.c.

References _dbus_string_init_const(), DBUS_ERROR_BAD_ADDRESS, dbus_set_error(), and NULL.

Referenced by dbus_server_listen().


Generated by 1.8.16

最新文章

  1. 干掉命令行窗口下MySql乱码
  2. DynamicsCRM中的自动保存
  3. Kernel Methods (4) Kernel SVM
  4. 需求文档2_The Battle of Polytopia
  5. Django抛错不存在(DoesNotExist)
  6. while ((ch = getchar()) != EOF)中ch定义为char还是int型?cin、scanf等如何结束键盘输入
  7. 获取最外层View
  8. Matlab plotyy函数的使用及问题总结
  9. 应付发票审批 Hold and Release Names
  10. Perl中的单行凝视和多行凝视
  11. Run Keyword And Ignore Error,Run Keyword And Return Status,Run Keyword And Continue On Failure,Run Keyword And Expect Error,Wait Until Keyword Succeeds用法
  12. python smtplib发email
  13. Internet Explorer 安全区域注册表项说明
  14. Storm WordCount
  15. vue项目中引用jquery
  16. Awesome Tools
  17. php上传大文件失败处理
  18. jq通过对象获取其ID值
  19. csdn 不登录浏览全文 chrome 浏览器
  20. vs2015安装出问题

热门文章

  1. JS 把数字转换成字母
  2. 关于Android的真机测试
  3. 计算两点间的距离(hdu2001)
  4. Flexible 应用
  5. [计划任务 - dos]制作任务工具
  6. [工具推荐]004.EXE签名工具SignTool使用教程
  7. Python 每日一练(2)
  8. Rocket - debug - TLDebugModuleInner - Abstract Command Decoding & Generation
  9. Rocket - interrupts - Crossing
  10. AUTOSAR-软件规范文档阅读