File: purple-send-async

package info (click to toggle)
pidgin 2.11.0-0%2Bdeb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 63,220 kB
  • ctags: 32,054
  • sloc: ansic: 326,207; sh: 11,683; makefile: 3,545; python: 1,296; perl: 529; cs: 209; tcl: 96; xml: 10
file content (29 lines) | stat: -rwxr-xr-x 635 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

METHOD_NAME=$1

if test -z "$METHOD_NAME"
then
    cat <<EOF
This program calls purple API functions using DBus.  As opposed to purple-send,
it does not print the return value.

Usage:

   $0 method-name type1:parameter1 type2:parameter2 ...

This shell script just invokes dbus-send, see man dbus-send for how
to specify the parameters.

Examples:

   $0 PurpleCoreQuit

Use dbus-viewer to get the list of supported functions and their parameters.
EOF
    exit 1
fi

shift
dbus-send --dest=im.pidgin.purple.PurpleService --type=method_call /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.$METHOD_NAME "$@"