view libgaim/gaim-send @ 14874:71149a751439

[gaim-migrate @ 17643] SF Patch #1469315 from R.Ramkumar - andyetitmoves "This is a small patch to make sounds enabled when available an optional feature. The use case is: Sounds being annoying, I would like them only when I am not seeing the comp. When I am on the comp, I have guifications/gaim-osd to inform me of whatever happens, and that happens to be less intrusive (especially when music is on :) )." The patch originally used: "Play sounds:" ("Always", "When available", "When away") I changed them to the strings KingAnt suggested: "Play sounds:" ("Always", "Only when available", "Only when not available") The ones from the patch submitter are not quite as clear, but they're shorter. What does everyone think about this? committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 01 Nov 2006 01:27:16 +0000
parents 60b1bc8dbf37
children
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=net.sf.gaim.GaimService --print-reply --type=method_call /net/sf/gaim/GaimObject net.sf.gaim.GaimInterface.$METHOD_NAME "$@"

echo