首页 > 其他分享 >g_dbus_connection_register_object

g_dbus_connection_register_object

时间:2023-04-16 18:24:27浏览次数:28  
标签:info object freedesktop dbus register connection interface org DBus

/**
* g_dbus_connection_register_object:
* @connection: A #GDBusConnection.
* @object_path: The object path to register at.
* @interface_info: Introspection data for the interface.
* @vtable: A #GDBusInterfaceVTable to call into or %NULL.
* @user_data: Data to pass to functions in @vtable.
* @user_data_free_func: Function to call when the object path is unregistered.
* @error: Return location for error or %NULL.
*
* Registers callbacks for exported objects at @object_path with the
* D-Bus interface that is described in @interface_info.
*
* Calls to functions in @vtable (and @user_data_free_func) will
* happen in the <link linkend="g-main-context-push-thread-default">thread-default main
* loop</link> of the thread you are calling this method from.
*
* Note that all #GVariant values passed to functions in @vtable will match
* the signature given in @interface_info - if a remote caller passes
* incorrect values, the <literal>org.freedesktop.DBus.Error.InvalidArgs</literal>
* is returned to the remote caller.
*
* Additionally, if the remote caller attempts to invoke methods or
* access properties not mentioned in @interface_info the
* <literal>org.freedesktop.DBus.Error.UnknownMethod</literal> resp.
* <literal>org.freedesktop.DBus.Error.InvalidArgs</literal> errors
* are returned to the caller.
*
* It is considered a programming error if the
* #GDBusInterfaceGetPropertyFunc function in @vtable returns a
* #GVariant of incorrect type.
*
* If an existing callback is already registered at @object_path and
* @interface_name, then @error is set to #G_IO_ERROR_EXISTS.
*
* GDBus automatically implements the standard D-Bus interfaces
* org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
* and org.freedesktop.Peer, so you don't have to implement those for
* the objects you export. You <emphasis>can</emphasis> implement
* org.freedesktop.DBus.Properties yourself, e.g. to handle getting
* and setting of properties asynchronously.
*
* Note that the reference count on @interface_info will be
* incremented by 1 (unless allocated statically, e.g. if the
* reference count is -1, see g_dbus_interface_info_ref()) for as long
* as the object is exported. Also note that @vtable will be copied.
*
* See <xref linkend="gdbus-server"/> for an example of how to use this method.
*
* Returns: 0 if @error is set, otherwise a registration id (never 0)
* that can be used with g_dbus_connection_unregister_object() .
*
* Since: 2.26

标签:info,object,freedesktop,dbus,register,connection,interface,org,DBus
From: https://www.cnblogs.com/hshy/p/17323752.html

相关文章

  • MODBUS常用功能码
    1简述Modbus寄存器分为四种,如表1.1所示:表1.1 寄存器分类寄存器种类数据类型访问类型功能码PLC地址寄存器地址线圈寄存器位读写01H05H0FH00001-099990000H-FFFFH离散输入寄存器位只读02H10001-199990000H-FFFFH输入寄存器字只读04H30001-399990......
  • Dynamic 导入插件解决方案包,提示: Assembly must be registered in isolation 错误
    错误信息如下:<s:Envelopexmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstringxml:lang="zh-CN">Actionfailedforassembly'AccountManage,V......
  • The transaction associated with this command is not the connection‘s active
    1、出现问题原因接口接收入参为数组类型,遍历数组操作时,事务写在了循环里,待下一次循环时事务非此连接的事务导致出现如题错误,接口传参数组形式如下:[{"id":1,"infos":[{"id":"1","name":"小华",......
  • Java连接RabbitMQ报错:An unexpected connection driver error occured(偶尔能连上)
    1、查看rabbitMq的状态。输入命令:rabbitmqctlstatus,发现没有报错,但是rabbit中的host是root,并不是ip地址,所以连接不上。 2、运行命令:echo【ip地址】root>>/etc/hosts。将RabbitMQ服务所在的IP地址添加到/etc/hosts中。 ......
  • The Network Adapter could not establish the connection
    1、oracle配置oracle9i2中把C:\oracle\ora92\network\admin目录下的listener.ora和tnsnames.ora(注意:连接远程计算机中oracle数据库的配置中的host不可修改。)File: C:\oracle\ora92\network\admin\listener.oraLISTENER=(DESCRIPTION_LIST=(DESCRIP......
  • php对接Modbus设备详细讲解
    1、下载ModbusMaster类库文件下载地址1:https://github.com/sergejey/majordomo-modbus  //功能码比较全,无案例下载地址2:https://github.com/krakorj/phpmodbus //类库功能码少,有案例工具:1.  ModbusSlave: 从机端模拟软件,这里测试可以把他作为服务端,PHP为客户端就是取......
  • S7-1200 Modbus RTU 通信概述
    S7-1200ModbusRTU通信概述Modbus具有两种串行传输模式:分别为ASCII和RTU。Modbus是一种单主站的主从通信模式,Modbus网络上只能有一个主站存在,主站在Modbus网络上没有地址,每个从站必须有唯一的地址,从站的地址范围为0-247,其中0为广播地址,从站的实际地址范围为1-247。Modbus......
  • org.dom4j.DocumentException: Connection timed out: connect Nested exception: Con
    今天用dom4j解析xml文件时遇到了一个问题org.dom4j.DocumentException:Connectiontimedout:connectNestedexception:Connectiontimedout:connect atorg.dom4j.io.SAXReader.read(SAXReader.java:484) atorg.dom4j.io.SAXReader.read(SAXReader.java:321) atcom......
  • Android开发startActivityForResult()弃用,推荐使用registerForActivityResult()方法
    SecondActivity中publicclassSecondActivityextendsAppCompatActivity{privatestaticfinalStringTAG="SecondActivity";@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);......
  • GnuTLS recv error (-110): The TLS connection was non-properly terminated问题的解
    1. sudoapt-getupdate2.sudoapt-getinstallbuild-essentialfakerootdpkg-dev3.sudoapt-getbuild-depgit4.mkdir~/git-openssl5.cd~/git-openssl6apt-getsourcegit ......