view src/gaim-send @ 12909:8e3b85fe4a55

[gaim-migrate @ 15262] Make UPnP truly asynchronous. There are probably still a couple socket calls that should be made nonblocking, but I wanted to commit this before it became even bigger. This contains a number of probable leak fixes in the upnp stuff. The UPnP stuff has been updated to use gaim_url_fetch_request() instead of the specific implementation. To make this all work, I had to make gaim_network_listen() and gaim_network_listen_range() also asynchronous - seems to work just fine apart from the UPnP calls seeming to take longer than they should (I'm planning to look into this). I also triggered a STUN and UPnP discovery on startup so that we hopefully have the information when we need it. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 17 Jan 2006 05:48:51 +0000
parents 64fadbf3810f
children ac5bc9a7b603
line wrap: on
line source

#!/bin/bash

METHOD_NAME=$1

if test -z "$METHOD_NAME" 
then
    cat <<EOF 
This program calls gaim API functions using DBus and prints the return value.
If you are not interested in the return value, use gaim-send-async.

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 GaimAccountsFindConnected string: string:prpl-jabber
   $0 GaimAccountsGetAll
   $0 GaimCoreQuit

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

shift
dbus-send --dest=org.gaim.GaimService --print-reply --type=method_call /org/gaim/GaimObject org.gaim.GaimInterface.$METHOD_NAME "$@"

echo