[FcitxAddon]
Name=fcitx-dbus
Prefix=DBus
Include0="dbusstuff.h"
Function0=GetConnection
Function1=GetPrivConnection
Function2=WatchName
Function3=UnwatchName
Function4=AttachConnection
Function5=DeattachConnection
Function6=
Self.Type=FcitxDBus*

[GetConnection]
Name=get-connection
Return=DBusConnection*
Res.Exp=$<->conn

[GetPrivConnection]
Name=get-priv-connection
Return=DBusConnection*
Res.Exp=$<->privconn

[WatchName]
Name=watch-name
Return=int
Arg0=const char*
Arg1=void*
Arg2=FcitxDBusWatchNameCallback
Arg3=void*
Arg4=FcitxDestroyNotify
Res.WrapFunc=DBusWatchName
Res.Deref=$@ + 1
Res.DerefType=int

[UnwatchName]
Name=unwatch-name
Arg0=int
Arg0.Deref=$0 - 1
Arg0.DerefType=int
Res.WrapFunc=DBusUnwatchName

[AttachConnection]
Name=attach-connection
Return=boolean
Arg0=DBusConnection *
Res.WrapFunc=DBusAttachConnection

[DeattachConnection]
Name=deattach-connection
Return=void
Arg0=DBusConnection *
Res.WrapFunc=DBusDeattachConnection
