解析D-Bus服务器的地址
D-Bus 1.13.14
Address parsing
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
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
解析D-Bus服务器的地址的更多相关文章
- asp自动解析网页中的图片地址,并将其保存到本地服务器
程序实现功能:自动将远程页面的文件中的图片下载到本地. 程序代码 <% '将本文保存为 save2local.asp '测试:save2local.asp?url=http://ent.sina ...
- Linux上DNS解析总是选择resolv.conf中第二位的DNS服务器IP地址
问题现象: 在Linux机器上,用户自建了一台DNS服务器.然后改动/etc/resolv.conf将其服务器IP地址添加到第一项.将阿里云的内网DNS放到第二位,然而在测试过程中发现telnet,p ...
- linux dns子域授权 split分离解析 缓存dns服务器
DNS子域授权作用:适用于同一个DNS组织父/子域名的解析工作由不同的dns服务器负责父dns服务器应该有为子域名迭代的能力 上下级区域属于不同的机构管理:.cn与.Anonymous.cn.cn需要 ...
- 免费公共DNS服务器IP地址大全(2017年6月24日)
收集全球各个常用公共DNS服务器 IP地址,欢迎各位朋友评论补充! 国内常用公共DNS 114 DNS: (114.114.114.114: 114.114.115.115) 114DNS安全版 ...
- 服务器ip地址 服务器ip登录方法
服务器是指保存有该网络中所有主机的域名和对应IP地址,并具有将域名转换为IP地址功能的服务器.其中域名必须对应一个IP地址,一个域名可以有多个IP地址,而IP地址不一定有域名. 简单的解释就是:服 ...
- [源码解析] 机器学习参数服务器ps-lite (1) ----- PostOffice
[源码解析] 机器学习参数服务器ps-lite 之(1) ----- PostOffice 目录 [源码解析] 机器学习参数服务器ps-lite 之(1) ----- PostOffice 0x00 ...
- [源码解析] 机器学习参数服务器ps-lite(2) ----- 通信模块Van
[源码解析] 机器学习参数服务器ps-lite(2) ----- 通信模块Van 目录 [源码解析] 机器学习参数服务器ps-lite(2) ----- 通信模块Van 0x00 摘要 0x01 功能 ...
- java获取服务器IP地址及MAC地址的方法
这篇文章主要介绍了java编程实现获取机器IP地址及MAC地址的方法,实例分析了Java分别针对单网卡及多网卡的情况下获取服务器IP地址与MAC地址的相关技巧,需要的朋友可以参考下 本文实例讲述了 ...
- 获取微信服务器IP地址
关键字:微信公众平台 微信服务器 IP地址 如果公众号基于安全等考虑,需要获知微信服务器的IP地址列表,以便进行相关限制,可以通过该接口获得微信服务器IP地址列表. 接口调用请求说明 http请求方式 ...
随机推荐
- Maven 私服你应该不陌生吧,可你会用 Artifactory 搭建吗?
JFrog Artifactory 是一个 Artifacts 仓库管理平台,它支持所有的主流打包格式.构建工具和持续集成(CI)服务器.它将所有二进制内容保存在一个单一位置并提供一个接口,这使得用户 ...
- jdk编译java文件时出现:编码GBK的不可映射字符
出现此问题的几种解决办法: 1.cmd下使用javac编译java文件 如: javac test.java 解决办法:编译时加上encoding选项 javac -encoding UTF-8 te ...
- dom4j——使用dom4j生成xml
使用org.dom4j.Element 创建xml /** * 生成Service.xml文件 * @param tran 交易对象 * @param filePath 文件夹路径 */ public ...
- Verilog代码和FPGA硬件的映射关系(四)
其实在FPGA的开发中理想情况下FPGA之间的数据要通过寄存器输入.输出,这样才能使得延时最小,从而更容易满足建立时间要求.我们在FPGA内部硬件结构中得知,IOB内是有寄存器的,且IOB内的寄存器比 ...
- CSS基础选择器总结
基础选择器 作用 特点 使用情况 用法 标签选择器 可以选出所有相同的标签,比如p 不能差异化选择 较多 p {color:red;} 类选择器 可以选出1个或多个标签 可以根据需求选择 非常多 .n ...
- js解析MarkDown语法
1.问题描述: 我们使用MarkDown编辑器之后,比如我们写的MarkDown的语法是: # 一级标题 ## 二级标题 ### 三级标题 这种语法我们最终要转换成HTML的格式最终要存入数据库 ...
- php日志监控
<?php date_default_timezone_set('Asia/Shanghai'); $time = date('Y-m-d H:i:s',time()); //访问时间 $ip ...
- [Objective-C] 006_Protocol(协议)
学过java的同学都知道Interface(接口),那么在Objective-C中有没有接口呢?其实 Objective-C中用Protocol(协议)来实现的,在Objective-C具体怎么用,我 ...
- centos系统与ubuntu系统的区别
centos和ubuntu简述 CentOS(Community ENTerprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Lin ...
- win10系统下计算器界面变成英文的解决方法
标题: win10系统下计算器界面变成英文的解决方法 作者: 梦幻之心星 347369787@QQ.com 标签: [win10, 计算器, 英文] 目录: 软件 日期: 2019-04-20 目录 ...