首页 > 其他分享 >glibc GDBusInterfaceVTable

glibc GDBusInterfaceVTable

时间:2023-04-09 14:46:05浏览次数:32  
标签:GDBusInterfaceVTable name glibc object gchar const property method

static const GDBusInterfaceVTable boo_vtable =
{
  NULL, /* _method_call */
  NULL, /* _get_property */
  NULL  /* _set_property */
};
/**
 * GDBusInterfaceVTable:
 * @method_call: Function for handling incoming method calls.
 * @get_property: Function for getting a property.
 * @set_property: Function for setting a property.
 *
 * Virtual table for handling properties and method calls for a D-Bus
 * interface.
 *
 * If you want to handle getting/setting D-Bus properties asynchronously, simply
 * register an object with the <literal>org.freedesktop.DBus.Properties</literal>
 * D-Bus interface using g_dbus_connection_register_object().
 *
 * Since: 2.26
 */
struct _GDBusInterfaceVTable
{
  GDBusInterfaceMethodCallFunc  method_call;
  GDBusInterfaceGetPropertyFunc get_property;
  GDBusInterfaceSetPropertyFunc set_property;

  /*< private >*/
  /* Padding for future expansion - also remember to update
   * gdbusconnection.c:_g_dbus_interface_vtable_copy() when
   * changing this.
   */
  gpointer padding[8];
};

  

/**
 * GDBusInterfaceMethodCallFunc:
 * @connection: A #GDBusConnection.
 * @sender: The unique bus name of the remote caller.
 * @object_path: The object path that the method was invoked on.
 * @interface_name: The D-Bus interface name the method was invoked on.
 * @method_name: The name of the method that was invoked.
 * @parameters: A #GVariant tuple with parameters.
 * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
 *
 * The type of the @method_call function in #GDBusInterfaceVTable.
 *
 * Since: 2.26
 */
typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection       *connection,
                                              const gchar           *sender,
                                              const gchar           *object_path,
                                              const gchar           *interface_name,
                                              const gchar           *method_name,
                                              GVariant              *parameters,
                                              GDBusMethodInvocation *invocation,
                                              gpointer               user_data);

  

/**
 * GDBusInterfaceMethodCallFunc:
 * @connection: A #GDBusConnection.
 * @sender: The unique bus name of the remote caller.
 * @object_path: The object path that the method was invoked on.
 * @interface_name: The D-Bus interface name the method was invoked on.
 * @method_name: The name of the method that was invoked.
 * @parameters: A #GVariant tuple with parameters.
 * @invocation: A #GDBusMethodInvocation object that can be used to return a value or error.
 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
 *
 * The type of the @method_call function in #GDBusInterfaceVTable.
 *
 * Since: 2.26
 */
typedef void (*GDBusInterfaceMethodCallFunc) (GDBusConnection       *connection,
                                              const gchar           *sender,
                                              const gchar           *object_path,
                                              const gchar           *interface_name,
                                              const gchar           *method_name,
                                              GVariant              *parameters,
                                              GDBusMethodInvocation *invocation,
                                              gpointer               user_data);

/**
 * GDBusInterfaceGetPropertyFunc:
 * @connection: A #GDBusConnection.
 * @sender: The unique bus name of the remote caller.
 * @object_path: The object path that the method was invoked on.
 * @interface_name: The D-Bus interface name for the property.
 * @property_name: The name of the property to get the value of.
 * @error: Return location for error.
 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
 *
 * The type of the @get_property function in #GDBusInterfaceVTable.
 *
 * Returns: A #GVariant with the value for @property_name or %NULL if
 *     @error is set. If the returned #GVariant is floating, it is
 *     consumed - otherwise its reference count is decreased by one.
 *
 * Since: 2.26
 */
typedef GVariant *(*GDBusInterfaceGetPropertyFunc) (GDBusConnection       *connection,
                                                    const gchar           *sender,
                                                    const gchar           *object_path,
                                                    const gchar           *interface_name,
                                                    const gchar           *property_name,
                                                    GError               **error,
                                                    gpointer               user_data);

/**
 * GDBusInterfaceSetPropertyFunc:
 * @connection: A #GDBusConnection.
 * @sender: The unique bus name of the remote caller.
 * @object_path: The object path that the method was invoked on.
 * @interface_name: The D-Bus interface name for the property.
 * @property_name: The name of the property to get the value of.
 * @value: The value to set the property to.
 * @error: Return location for error.
 * @user_data: The @user_data #gpointer passed to g_dbus_connection_register_object().
 *
 * The type of the @set_property function in #GDBusInterfaceVTable.
 *
 * Returns: %TRUE if the property was set to @value, %FALSE if @error is set.
 *
 * Since: 2.26
 */
typedef gboolean  (*GDBusInterfaceSetPropertyFunc) (GDBusConnection       *connection,
                                                    const gchar           *sender,
                                                    const gchar           *object_path,
                                                    const gchar           *interface_name,
                                                    const gchar           *property_name,
                                                    GVariant              *value,
                                                    GError               **error,
                                                    gpointer               user_data);

 

标签:GDBusInterfaceVTable,name,glibc,object,gchar,const,property,method
From: https://www.cnblogs.com/hshy/p/17300299.html

相关文章

  • house_of_snake:一条高版本Glibc IO调用链
    house_of_snake:一条高版本GlibcIO调用链本文首发于[看雪论坛],仅在个人博客记录前言之前听说glibc2.37删除了_IO_obstack_jumps这个vtable。但是在源码里还看到obstack结构体存在,那么glibc2.37真的不能再调用_IO_obstack_jumps的那条链吗?看完本文就知道还可以调用_IO_obstack......
  • glibc gdbus 网络管理
    NetworkManager/ModemManager·GitLab (141条消息)Dbus学习笔记_org.freedesktop.dbus.properties_hanhandan的博客-CSDN博客......
  • Ubuntu切换glibc版本
    Ubuntu切换glibc版本glibc是GNU发布的C语言标准库,不同版本的glibc中函数实现不同,可能导致程序运行结果不同。这里介绍如何切换不同版本的glibc来运行程序首先,要安装patchelf,这是给elf文件打补丁(修改elf文件属性,包括使用的glibc版本)的工具gitclonehttps://github.com/NixOS/pa......
  • linux下安装绿色版(glibc版)mysql-5.7.31
    安装依赖库libaio库#yuminstalllibaio-y上传软件包解压#tar-xfmysql-5.7.31-linux-glibc2.12-x86_64.tar.gz软件的安装第一步:创建一个数据库专用账号mysql(其所属组也......
  • Error downloading packages: glibc-2.17-326.el7_9.i686: [Errno 5]
     001、yum安装软件出现如下报错  002、其中的一个原因是python的版本造成的,即将系统默认调用的python有python2改用了python3,而yum命令兼容的python版本是python......
  • node: /lib64/libm.so.6: version `GLIBC_2.27' not found
    场景cenos7服务器使用nvm安装的node之后,只要使用npm或者node,均会出现以下问题[root@172~]#npm-vnode:/lib64/libm.so.6:version`GLIBC_2.27'notfound(required......
  • 记一次Java崩溃崩溃问题——IPv6 与 glibc的bug
    最近一段时间,项目组的后端和APP端进行联调的时候,会发现测试服务器的后端服务器会经常莫名其妙地崩溃,最后会生成一份崩溃日志(hs_err_pid.log)。日志的大概信息如下:##Afat......
  • arch linux pacman 启动失败`GLIBC_2.34' not found
    pacman报错:pacman:/usr/lib/libc.so.6:version`GLIBC_2.34'notfound(requiredbypacman)解决方法:1下载二进制包:去https://aur.archlinux.org/packages/pacma......
  • glibc升级
    1、检查当前glibc版本[[email protected]]#ldd--versionldd(GNUlibc)2.17Copyright2012FreeSoftwareFoundation,Inc.Thisisfreesoftware;seethesourc......
  • node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
    centos7.9的默认glibc与宝塔或手动安装的node版本运行环境版本不匹配太低具体报错为node:/lib64/libm.so.6:version`GLIBC_2.27'notfound(requiredbynode)no......