changeset a98e1d445d62 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=a98e1d445d62 description: Delete gajim-remote-plugin.Fixes #6115
diffstat:
src/gajim-remote-plugin.py | 620 --------------------------------------------- 1 files changed, 0 insertions(+), 620 deletions(-)
diffs (truncated from 624 to 300 lines):
diff -r 72272e2ae478 -r a98e1d445d62 src/gajim-remote-plugin.py --- a/src/gajim-remote-plugin.py Fri Feb 18 17:04:27 2011 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,620 +0,0 @@ -#!/usr/bin/env python -## -## Copyright (C) 2005-2006 Dimitur Kirov <dkirov AT gmail.com> -## Nikos Kouremenos <kourem AT gmail.com> -## Copyright (C) 2005-2010 Yann Leboulanger <asterix AT lagaule.org> -## Copyright (C) 2006 Junglecow <junglecow AT gmail.com> -## Travis Shirk <travis AT pobox.com> -## Copyright (C) 2006-2008 Jean-Marie Traissard <jim AT lapin.org> -## Copyright (C) 2007 Julien Pivotto <roidelapluie AT gmail.com> -## -## This file is part of Gajim. -## -## Gajim is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published -## by the Free Software Foundation; version 3 only. -## -## Gajim is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Gajim. If not, see http://www.gnu.org/licenses/. -## - -# gajim-remote help will show you the D-BUS API of Gajim - -import sys -import os -import locale -import urllib -import signal -signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application - -from common import exceptions -from common import i18n # This installs _() function - -try: - PREFERRED_ENCODING = locale.getpreferredencoding() -except Exception: - PREFERRED_ENCODING = 'UTF-8' - -def send_error(error_message): - '''Writes error message to stderr and exits''' - print >> sys.stderr, error_message.encode(PREFERRED_ENCODING) - sys.exit(1) - -try: - if sys.platform == 'darwin': - import osx.dbus - osx.dbus.load(False) - import dbus - import dbus.service - import dbus.glib -except: - print str(exceptions.DbusNotSupported()) - sys.exit(1) - -OBJ_PATH = '/org/gajim/dbusplugin/RemoteObject' -INTERFACE = 'org.gajim.dbusplugin.RemoteInterface' -SERVICE = 'org.gajim.dbusplugin' -BASENAME = 'gajim-remote-plugin' - - -class GajimRemote: - - def __init__(self): - self.argv_len = len(sys.argv) - # define commands dict. Prototype : - # { - # 'command': [comment, [list of arguments] ] - # } - # - # each argument is defined as a tuple: - # (argument name, help on argument, is mandatory) - # - self.commands = { - 'help': [ - _('Shows a help on specific command'), - [ - #User gets help for the command, specified by this parameter - (_('command'), - _('show help on command'), False) - ] - ], - 'toggle_roster_appearance': [ - _('Shows or hides the roster window'), - [] - ], - 'show_next_pending_event': [ - _('Pops up a window with the next pending event'), - [] - ], - 'list_contacts': [ - _('Prints a list of all contacts in the roster. Each contact ' - 'appears on a separate line'), - [ - (_('account'), _('show only contacts of the given account'), - False) - ] - - ], - 'list_accounts': [ - _('Prints a list of registered accounts'), - [] - ], - 'change_status': [ - _('Changes the status of account or accounts'), - [ -#offline, online, chat, away, xa, dnd, invisible should not be translated - (_('status'), _('one of: offline, online, chat, away, xa, dnd, invisible. If not set, use account's previous status'), False), - (_('message'), _('status message'), False), - (_('account'), _('change status of account "account". ' - 'If not specified, try to change status of all accounts that have ' - '"sync with global status" option set'), False) - ] - ], - 'set_priority': [ - _('Changes the priority of account or accounts'), - [ - (_('priority'), _('priority you want to give to the account'), - True), - (_('account'), _('change the priority of the given account. ' - 'If not specified, change status of all accounts that have' - ' "sync with global status" option set'), False) - ] - ], - 'open_chat': [ - _('Shows the chat dialog so that you can send messages to a contact'), - [ - ('jid', _('JID of the contact that you want to chat with'), - True), - (_('account'), _('if specified, contact is taken from the ' - 'contact list of this account'), False), - (_('message'), - _('message content. The account must be specified or ""'), - False) - ] - ], - 'send_chat_message': [ - _('Sends new chat message to a contact in the roster. Both OpenPGP key ' - 'and account are optional. If you want to set only 'account', ' - 'without 'OpenPGP key', just set 'OpenPGP key' to ''.'), - [ - ('jid', _('JID of the contact that will receive the message'), True), - (_('message'), _('message contents'), True), - (_('pgp key'), _('if specified, the message will be encrypted ' - 'using this public key'), False), - (_('account'), _('if specified, the message will be sent ' - 'using this account'), False), - ] - ], - 'send_single_message': [ - _('Sends new single message to a contact in the roster. Both OpenPGP key ' - 'and account are optional. If you want to set only 'account', ' - 'without 'OpenPGP key', just set 'OpenPGP key' to ''.'), - [ - ('jid', _('JID of the contact that will receive the message'), True), - (_('subject'), _('message subject'), True), - (_('message'), _('message contents'), True), - (_('pgp key'), _('if specified, the message will be encrypted ' - 'using this public key'), False), - (_('account'), _('if specified, the message will be sent ' - 'using this account'), False), - ] - ], - 'send_groupchat_message': [ - _('Sends new message to a groupchat you've joined.'), - [ - ('room_jid', _('JID of the room that will receive the message'), True), - (_('message'), _('message contents'), True), - (_('account'), _('if specified, the message will be sent ' - 'using this account'), False), - ] - ], - 'contact_info': [ - _('Gets detailed info on a contact'), - [ - ('jid', _('JID of the contact'), True) - ] - ], - 'account_info': [ - _('Gets detailed info on a account'), - [ - ('account', _('Name of the account'), True) - ] - ], - 'send_file': [ - _('Sends file to a contact'), - [ - (_('file'), _('File path'), True), - ('jid', _('JID of the contact'), True), - (_('account'), _('if specified, file will be sent using this ' - 'account'), False) - ] - ], - 'prefs_list': [ - _('Lists all preferences and their values'), - [ ] - ], - 'prefs_put': [ - _('Sets value of 'key' to 'value'.'), - [ - (_('key=value'), _(''key' is the name of the preference, ' - ''value' is the value to set it to'), True) - ] - ], - 'prefs_del': [ - _('Deletes a preference item'), - [ - (_('key'), _('name of the preference to be deleted'), True) - ] - ], - 'prefs_store': [ - _('Writes the current state of Gajim preferences to the .config ' - 'file'), - [ ] - ], - 'remove_contact': [ - _('Removes contact from roster'), - [ - ('jid', _('JID of the contact'), True), - (_('account'), _('if specified, contact is taken from the ' - 'contact list of this account'), False) - - ] - ], - 'add_contact': [ - _('Adds contact to roster'), - [ - (_('jid'), _('JID of the contact'), True), - (_('account'), _('Adds new contact to this account'), False) - ] - ], - - 'get_status': [ - _('Returns current status (the global one unless account is specified)'), - [ - (_('account'), '', False) - ] - ], - - 'get_status_message': [ - _('Returns current status message (the global one unless account is specified)'), - [ - (_('account'), '', False) - ] - ], - - 'get_unread_msgs_number': [ - _('Returns number of unread messages'), - [ ] - ], - 'start_chat': [ - _('Opens 'Start Chat' dialog'), - [ - (_('account'), _('Starts chat, using this account'), True) - ] - ], - 'send_xml': [ - _('Sends custom XML'), - [ - ('xml', _('XML to send'), True), - ('account', _('Account in which the xml will be sent; ' - 'if not specified, xml will be sent to all accounts'), - False) - ] - ], - 'change_avatar': [ - _('Change the avatar'), - [ - ('picture', _('Picture to use'), True), - ('account', _('Account in which the avatar will be set; ' - 'if not specified, the avatar will be set for all accounts'), - False) - ] - ], - 'handle_uri': [ - _('Handle a xmpp:/ uri'), - [ - (_('uri'), _('URI to handle'), True), - (_('account'), _('Account in which you want to handle it'), - False), - (_('message'), _('Message content'), False) - ] - ], - 'join_room': [ - _('Join a MUC room'), - [ - (_('room'), _('Room JID'), True), - (_('nick'), _('Nickname to use'), False), - (_('password'), _('Password to enter the room'), False), - (_('account'), _('Account from which you want to enter the ' - 'room'), False) - ] - ],