Skip to content

Latest commit

 

History

History
231 lines (133 loc) · 7.22 KB

dbus_proxy.md

File metadata and controls

231 lines (133 loc) · 7.22 KB

Module dbus_proxy

proxy representing a remote D-BUS object.

Copyright (c) 2006-2007 Mikael Magnusson, 2014-2016 Jean Parpaillon

Behaviours: gen_server.

Authors: Mikael Magnusson (mikma@users.sourceforge.net), Jean Parpaillon (jean.parpaillon@free.fr).

Data Types


handler() = mfa() | {function(), any()} | pid()

t() = dbus_proxy()

Function Index

call/2Sync send an arbitrary message.
call/4Sync call a method.
cast/2Async send a message.
cast/4Async call a method.
children/1Get children of an object.
code_change/3
connect_signal/2Connect to every signal (eg for object manager).
connect_signal/4Connect to a particular signal.
connect_signal/6Connect to a particular signal on a particular children object.
handle_call/3
handle_cast/2
handle_info/2
has_interface/2Check if object implements the given interface.
init/1
start_link/2Equivalent to start_link(Conn, Service, <<"/">>).
start_link/3Connect to an object, and introspect it.
start_link/4Connect to an object, with known interfaces.
stop/1Disconnect proxy.
terminate/2

Function Details

call/2


call(Proxy::dbus_proxy(), Msg::dbus_message()) -> {ok, term()} | {error, term()}

Sync send an arbitrary message

call/4


call(Proxy::dbus_proxy(), IfaceName::dbus_name(), MethodName::dbus_name(), Args::term()) -> ok | {ok, term()} | {error, term()}

Sync call a method

cast/2


cast(Proxy::dbus_proxy(), Msg::dbus_message()) -> ok | {error, term()}

Async send a message

cast/4


cast(Proxy::dbus_proxy(), IfaceName::dbus_name(), MethodName::dbus_name(), Args::term()) -> ok

Async call a method

children/1


children(Proxy::dbus_proxy()) -> [binary()]

Get children of an object

code_change/3

code_change(OldVsn, State, Extra) -> any()

connect_signal/2


connect_signal(Proxy::dbus_proxy(), Handler::handler()) -> ok | {error, term()}

Connect to every signal (eg for object manager)

connect_signal/4


connect_signal(Proxy::dbus_proxy(), IfaceName::dbus_name(), SignalName::dbus_name(), Handler::handler()) -> ok | {error, term()}

Connect to a particular signal

connect_signal/6


connect_signal(Proxy::dbus_proxy(), Service::dbus_name(), IfaceName::dbus_name(), SignalName::dbus_name(), Path::binary(), MFA::handler()) -> ok | {error, term()}

Connect to a particular signal on a particular children object

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Request, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

has_interface/2


has_interface(Proxy::dbus_proxy(), InterfaceName::dbus_name()) -> true | false

Check if object implements the given interface

init/1

init(X1) -> any()

start_link/2


start_link(Conn::dbus_connection(), Service::dbus_name()) -> {ok, dbus_proxy()} | {error, term()}

Equivalent to start_link(Conn, Service, <<"/">>).

start_link/3


start_link(Conn::dbus_connection(), Service::dbus_name(), Path::binary()) -> {ok, dbus_proxy()} | {error, term()}

Connect to an object, and introspect it.

start_link/4


start_link(Conn::dbus_connection(), Service::dbus_name(), Path::binary(), Node::dbus_node()) -> {ok, dbus_proxy()} | {error, term()}

Connect to an object, with known interfaces.

stop/1


stop(Proxy::dbus_proxy()) -> ok

Disconnect proxy

terminate/2

terminate(Reason, State) -> any()