Some refactoring

darcs-hash:20070708194231-86b55-484cc22c11e199ca7e91f100f7707ada3d44ed74.gz
This commit is contained in:
David Rousselie
2007-07-08 21:42:31 +02:00
parent 620b500e0b
commit bccd50ea89
11 changed files with 397 additions and 310 deletions

32
src/jmc/jabber/disco.py Normal file
View File

@@ -0,0 +1,32 @@
##
## disco.py
## Login : David Rousselie <dax@happycoders.org>
## Started on Sun Jul 8 20:55:46 2007 David Rousselie
## $Id$
##
## Copyright (C) 2007 David Rousselie
## This program 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; either version 2 of the License, or
## (at your option) any later version.
##
## This program 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 this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
from jcl.jabber.disco import RootDiscoGetInfoHandler
class MailRootDiscoGetInfoHandler(RootDiscoGetInfoHandler):
def handle(self, stanza, lang_class, node, disco_obj, data):
"""Add jabber:iq:gateway support"""
disco_infos = RootDiscoGetInfoHandler.handle(self, stanza, lang_class,
node, disco_obj, data)
disco_infos[0].add_feature("jabber:iq:gateway")
disco_infos[0].add_identity(self.component.name, "headline", "newmail")
return disco_infos