annotate libpurple/purple-send @ 25362:65cfc59858cf

propagate from branch 'im.pidgin.pidgin' (head d5bb29138cbe033bbfd8ec689203d73818765327) to branch 'im.pidgin.pidgin.next.minor' (head 35ee8e40db640867e5b9239030cdc326e7f0a005)
author Gary Kramlich <grim@reaperworld.com>
date Sat, 13 Dec 2008 05:45:27 +0000
parents 942bf314fc8a
children cea56d000b16
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22014
942bf314fc8a These don't seem to require bash.
Richard Laager <rlaager@wiktel.com>
parents: 16143
diff changeset
1 #!/bin/sh
15885
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
2
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
3 METHOD_NAME=$1
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
4
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
5 if test -z "$METHOD_NAME"
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
6 then
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
7 cat <<EOF
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
8 This program calls purple API functions using DBus and prints the return value.
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
9 If you are not interested in the return value, use purple-send-async.
15885
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
10
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
11 Usage:
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
12
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
13 $0 method-name type1:parameter1 type2:parameter2 ...
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
14
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
15 This shell script just invokes dbus-send, see man dbus-send for how
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
16 to specify the parameters.
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
17
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
18 Examples:
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
19
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
20 $0 PurpleAccountsFindConnected string: string:prpl-jabber
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
21 $0 PurpleAccountsGetAll
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
22 $0 PurpleCoreQuit
15885
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
23
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
24 Use dbus-viewer to get the list of supported functions and their parameters.
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
25 EOF
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
26 exit 1
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
27 fi
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
28
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
29 shift
16143
598b1b15b199 Trac Ticket #149 from JensenDied
Richard Laager <rlaager@wiktel.com>
parents: 15885
diff changeset
30 dbus-send --dest=im.pidgin.purple.PurpleService --print-reply --type=method_call /im/pidgin/purple/PurpleObject im.pidgin.purple.PurpleInterface.$METHOD_NAME "$@"
15885
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
31
c6e563dfaa7a More s/gaim/pidgin/ and s/gaim/purple/ and make the RPM spec file work a bit
Stu Tomlinson <stu@nosnilmot.com>
parents:
diff changeset
32 echo