sed -i 's/set(\[\(.*\)\])$/{\1}/g' **/*.py
This commit is contained in:
parent
c4285961df
commit
dcacc7d7d5
@ -24,7 +24,7 @@ class Auth(StanzaBase):
|
||||
|
||||
#: Some SASL mechs require sending values as is,
|
||||
#: without converting base64.
|
||||
plain_mechs = set(['X-MESSENGER-OAUTH2'])
|
||||
plain_mechs = {'X-MESSENGER-OAUTH2'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
|
@ -18,7 +18,7 @@ class Success(StanzaBase):
|
||||
|
||||
name = 'success'
|
||||
namespace = 'urn:ietf:params:xml:ns:xmpp-sasl'
|
||||
interfaces = set(['value'])
|
||||
interfaces = {'value'}
|
||||
plugin_attrib = name
|
||||
|
||||
def setup(self, xml):
|
||||
|
@ -13,7 +13,7 @@ class GoogleAuth(ElementBase):
|
||||
name = 'auth'
|
||||
namespace = 'http://www.google.com/talk/protocol/auth'
|
||||
plugin_attrib = 'google'
|
||||
interfaces = set(['client_uses_full_bind_result', 'service'])
|
||||
interfaces = {'client_uses_full_bind_result', 'service'}
|
||||
|
||||
discovery_attr= '{%s}client-uses-full-bind-result' % namespace
|
||||
service_attr= '{%s}service' % namespace
|
||||
|
@ -14,7 +14,7 @@ class NoSave(ElementBase):
|
||||
name = 'x'
|
||||
namespace = 'google:nosave'
|
||||
plugin_attrib = 'google_nosave'
|
||||
interfaces = set(['value'])
|
||||
interfaces = {'value'}
|
||||
|
||||
def get_value(self):
|
||||
return self._get_attr('value', '') == 'enabled'
|
||||
@ -35,7 +35,7 @@ class Item(ElementBase):
|
||||
namespace = 'google:nosave'
|
||||
plugin_attrib = 'item'
|
||||
plugin_multi_attrib = 'items'
|
||||
interfaces = set(['jid', 'source', 'value'])
|
||||
interfaces = {'jid', 'source', 'value'}
|
||||
|
||||
def get_value(self):
|
||||
return self._get_attr('value', '') == 'enabled'
|
||||
|
@ -23,7 +23,7 @@ class XEP_0004(BasePlugin):
|
||||
|
||||
name = 'xep_0004'
|
||||
description = 'XEP-0004: Data Forms'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -24,7 +24,7 @@ class XEP_0009(BasePlugin):
|
||||
|
||||
name = 'xep_0009'
|
||||
description = 'XEP-0009: Jabber-RPC'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -29,7 +29,7 @@ class XEP_0012(BasePlugin):
|
||||
|
||||
name = 'xep_0012'
|
||||
description = 'XEP-0012: Last Activity'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -29,7 +29,7 @@ class XEP_0013(BasePlugin):
|
||||
|
||||
name = 'xep_0013'
|
||||
description = 'XEP-0013: Flexible Offline Message Retrieval'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -14,7 +14,7 @@ class Offline(ElementBase):
|
||||
name = 'offline'
|
||||
namespace = 'http://jabber.org/protocol/offline'
|
||||
plugin_attrib = 'offline'
|
||||
interfaces = set(['fetch', 'purge', 'results'])
|
||||
interfaces = {'fetch', 'purge', 'results'}
|
||||
bool_interfaces = interfaces
|
||||
|
||||
def setup(self, xml=None):
|
||||
@ -39,9 +39,9 @@ class Item(ElementBase):
|
||||
name = 'item'
|
||||
namespace = 'http://jabber.org/protocol/offline'
|
||||
plugin_attrib = 'item'
|
||||
interfaces = set(['action', 'node', 'jid'])
|
||||
interfaces = {'action', 'node', 'jid'}
|
||||
|
||||
actions = set(['view', 'remove'])
|
||||
actions = {'view', 'remove'}
|
||||
|
||||
def get_jid(self):
|
||||
return JID(self._get_attr('jid'))
|
||||
|
@ -17,7 +17,7 @@ class XEP_0016(BasePlugin):
|
||||
|
||||
name = 'xep_0016'
|
||||
description = 'XEP-0016: Privacy Lists'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -18,14 +18,14 @@ class Active(ElementBase):
|
||||
name = 'active'
|
||||
namespace = 'jabber:iq:privacy'
|
||||
plugin_attrib = name
|
||||
interfaces = set(['name'])
|
||||
interfaces = {'name'}
|
||||
|
||||
|
||||
class Default(ElementBase):
|
||||
name = 'default'
|
||||
namespace = 'jabber:iq:privacy'
|
||||
plugin_attrib = name
|
||||
interfaces = set(['name'])
|
||||
interfaces = {'name'}
|
||||
|
||||
|
||||
class List(ElementBase):
|
||||
@ -33,7 +33,7 @@ class List(ElementBase):
|
||||
namespace = 'jabber:iq:privacy'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'lists'
|
||||
interfaces = set(['name'])
|
||||
interfaces = {'name'}
|
||||
|
||||
def add_item(self, value, action, order, itype=None, iq=False,
|
||||
message=False, presence_in=False, presence_out=False):
|
||||
@ -57,7 +57,7 @@ class Item(ElementBase):
|
||||
plugin_multi_attrib = 'items'
|
||||
interfaces = set(['type', 'value', 'action', 'order', 'iq',
|
||||
'message', 'presence_in', 'presence_out'])
|
||||
bool_interfaces = set(['message', 'iq', 'presence_in', 'presence_out'])
|
||||
bool_interfaces = {'message', 'iq', 'presence_in', 'presence_out'}
|
||||
|
||||
type_values = ('', 'jid', 'group', 'subscription')
|
||||
action_values = ('allow', 'deny')
|
||||
|
@ -24,7 +24,7 @@ class XEP_0020(BasePlugin):
|
||||
|
||||
name = 'xep_0020'
|
||||
description = 'XEP-0020: Feature Negotiation'
|
||||
dependencies = set(['xep_0004', 'xep_0030'])
|
||||
dependencies = {'xep_0004', 'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -13,7 +13,7 @@ class Signed(ElementBase):
|
||||
name = 'x'
|
||||
namespace = 'jabber:x:signed'
|
||||
plugin_attrib = 'signed'
|
||||
interfaces = set(['signed'])
|
||||
interfaces = {'signed'}
|
||||
is_extension = True
|
||||
|
||||
def set_signed(self, value):
|
||||
@ -33,7 +33,7 @@ class Encrypted(ElementBase):
|
||||
name = 'x'
|
||||
namespace = 'jabber:x:encrypted'
|
||||
plugin_attrib = 'encrypted'
|
||||
interfaces = set(['encrypted'])
|
||||
interfaces = {'encrypted'}
|
||||
is_extension = True
|
||||
|
||||
def set_encrypted(self, value):
|
||||
|
@ -91,7 +91,7 @@ class DiscoInfo(ElementBase):
|
||||
"""
|
||||
ElementBase.setup(self, xml)
|
||||
|
||||
self._identities = set([id[0:3] for id in self['identities']])
|
||||
self._identities = {id[0:3] for id in self['identities']}
|
||||
self._features = self['features']
|
||||
|
||||
def add_identity(self, category, itype, name=None, lang=None):
|
||||
|
@ -62,7 +62,7 @@ class DiscoItems(ElementBase):
|
||||
xml -- Use an existing XML object for the stanza's values.
|
||||
"""
|
||||
ElementBase.setup(self, xml)
|
||||
self._items = set([item[0:2] for item in self['items']])
|
||||
self._items = {item[0:2] for item in self['items']}
|
||||
|
||||
def add_item(self, jid, node=None, name=None):
|
||||
"""
|
||||
|
@ -22,7 +22,7 @@ class XEP_0033(BasePlugin):
|
||||
|
||||
name = 'xep_0033'
|
||||
description = 'XEP-0033: Extended Stanza Addressing'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -37,7 +37,7 @@ class Address(ElementBase):
|
||||
name = 'address'
|
||||
namespace = 'http://jabber.org/protocol/address'
|
||||
plugin_attrib = 'address'
|
||||
interfaces = set(['type', 'jid', 'node', 'uri', 'desc', 'delivered'])
|
||||
interfaces = {'type', 'jid', 'node', 'uri', 'desc', 'delivered'}
|
||||
|
||||
address_types = {'bcc', 'cc', 'noreply', 'replyroom', 'replyto', 'to'}
|
||||
|
||||
|
@ -117,7 +117,7 @@ class XEP_0045(BasePlugin):
|
||||
|
||||
name = 'xep_0045'
|
||||
description = 'XEP-0045: Multi-User Chat'
|
||||
dependencies = set(['xep_0030', 'xep_0004'])
|
||||
dependencies = {'xep_0030', 'xep_0004'}
|
||||
|
||||
def plugin_init(self):
|
||||
self.rooms = {}
|
||||
|
@ -18,7 +18,7 @@ class XEP_0047(BasePlugin):
|
||||
|
||||
name = 'xep_0047'
|
||||
description = 'XEP-0047: In-band Bytestreams'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'block_size': 4096,
|
||||
|
@ -38,7 +38,7 @@ class Data(ElementBase):
|
||||
namespace = 'http://jabber.org/protocol/ibb'
|
||||
plugin_attrib = 'ibb_data'
|
||||
interfaces = {'seq', 'sid', 'data'}
|
||||
sub_interfaces = set(['data'])
|
||||
sub_interfaces = {'data'}
|
||||
|
||||
def get_seq(self):
|
||||
return int(self._get_attr('seq', '0'))
|
||||
@ -67,4 +67,4 @@ class Close(ElementBase):
|
||||
name = 'close'
|
||||
namespace = 'http://jabber.org/protocol/ibb'
|
||||
plugin_attrib = 'ibb_close'
|
||||
interfaces = set(['sid'])
|
||||
interfaces = {'sid'}
|
||||
|
@ -24,7 +24,7 @@ class XEP_0048(BasePlugin):
|
||||
|
||||
name = 'xep_0048'
|
||||
description = 'XEP-0048: Bookmarks'
|
||||
dependencies = set(['xep_0045', 'xep_0049', 'xep_0060', 'xep_0163', 'xep_0223'])
|
||||
dependencies = {'xep_0045', 'xep_0049', 'xep_0060', 'xep_0163', 'xep_0223'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'auto_join': False,
|
||||
|
@ -40,8 +40,8 @@ class Conference(ElementBase):
|
||||
namespace = 'storage:bookmarks'
|
||||
plugin_attrib = 'conference'
|
||||
plugin_multi_attrib = 'conferences'
|
||||
interfaces = set(['nick', 'password', 'autojoin', 'jid', 'name'])
|
||||
sub_interfaces = set(['nick', 'password'])
|
||||
interfaces = {'nick', 'password', 'autojoin', 'jid', 'name'}
|
||||
sub_interfaces = {'nick', 'password'}
|
||||
|
||||
def get_autojoin(self):
|
||||
value = self._get_attr('autojoin')
|
||||
@ -58,7 +58,7 @@ class URL(ElementBase):
|
||||
namespace = 'storage:bookmarks'
|
||||
plugin_attrib = 'url'
|
||||
plugin_multi_attrib = 'urls'
|
||||
interfaces = set(['url', 'name'])
|
||||
interfaces = {'url', 'name'}
|
||||
|
||||
|
||||
register_stanza_plugin(Bookmarks, Conference, iterable=True)
|
||||
|
@ -23,7 +23,7 @@ class XEP_0049(BasePlugin):
|
||||
|
||||
name = 'xep_0049'
|
||||
description = 'XEP-0049: Private XML Storage'
|
||||
dependencies = set([])
|
||||
dependencies = {}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -74,7 +74,7 @@ class XEP_0050(BasePlugin):
|
||||
|
||||
name = 'xep_0050'
|
||||
description = 'XEP-0050: Ad-Hoc Commands'
|
||||
dependencies = set(['xep_0030', 'xep_0004'])
|
||||
dependencies = {'xep_0030', 'xep_0004'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'session_db': None
|
||||
@ -225,8 +225,8 @@ class XEP_0050(BasePlugin):
|
||||
if len(payload) == 1:
|
||||
payload = payload[0]
|
||||
|
||||
interfaces = set([item.plugin_attrib for item in payload])
|
||||
payload_classes = set([item.__class__ for item in payload])
|
||||
interfaces = {item.plugin_attrib for item in payload}
|
||||
payload_classes = {item.__class__ for item in payload}
|
||||
|
||||
initial_session = {'id': sessionid,
|
||||
'from': iq['from'],
|
||||
|
@ -10,15 +10,15 @@ class VCardTemp(ElementBase):
|
||||
name = 'vCard'
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = 'vcard_temp'
|
||||
interfaces = set(['FN', 'VERSION'])
|
||||
sub_interfaces = set(['FN', 'VERSION'])
|
||||
interfaces = {'FN', 'VERSION'}
|
||||
sub_interfaces = {'FN', 'VERSION'}
|
||||
|
||||
|
||||
class Name(ElementBase):
|
||||
name = 'N'
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
interfaces = set(['FAMILY', 'GIVEN', 'MIDDLE', 'PREFIX', 'SUFFIX'])
|
||||
interfaces = {'FAMILY', 'GIVEN', 'MIDDLE', 'PREFIX', 'SUFFIX'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
def _set_component(self, name, value):
|
||||
@ -72,7 +72,7 @@ class Nickname(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'nicknames'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_nickname(self, value):
|
||||
@ -95,9 +95,9 @@ class Email(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'emails'
|
||||
interfaces = set(['HOME', 'WORK', 'INTERNET', 'PREF', 'X400', 'USERID'])
|
||||
sub_interfaces = set(['USERID'])
|
||||
bool_interfaces = set(['HOME', 'WORK', 'INTERNET', 'PREF', 'X400'])
|
||||
interfaces = {'HOME', 'WORK', 'INTERNET', 'PREF', 'X400', 'USERID'}
|
||||
sub_interfaces = {'USERID'}
|
||||
bool_interfaces = {'HOME', 'WORK', 'INTERNET', 'PREF', 'X400'}
|
||||
|
||||
|
||||
class Address(ElementBase):
|
||||
@ -110,7 +110,7 @@ class Address(ElementBase):
|
||||
'REGION', 'PCODE', 'CTRY'])
|
||||
sub_interfaces = set(['POBOX', 'EXTADD', 'STREET', 'LOCALITY',
|
||||
'REGION', 'PCODE', 'CTRY'])
|
||||
bool_interfaces = set(['HOME', 'WORK', 'DOM', 'INTL', 'PREF'])
|
||||
bool_interfaces = {'HOME', 'WORK', 'DOM', 'INTL', 'PREF'}
|
||||
|
||||
|
||||
class Telephone(ElementBase):
|
||||
@ -121,7 +121,7 @@ class Telephone(ElementBase):
|
||||
interfaces = set(['HOME', 'WORK', 'VOICE', 'FAX', 'PAGER', 'MSG',
|
||||
'CELL', 'VIDEO', 'BBS', 'MODEM', 'ISDN', 'PCS',
|
||||
'PREF', 'NUMBER'])
|
||||
sub_interfaces = set(['NUMBER'])
|
||||
sub_interfaces = {'NUMBER'}
|
||||
bool_interfaces = set(['HOME', 'WORK', 'VOICE', 'FAX', 'PAGER',
|
||||
'MSG', 'CELL', 'VIDEO', 'BBS', 'MODEM',
|
||||
'ISDN', 'PCS', 'PREF'])
|
||||
@ -177,7 +177,7 @@ class Geo(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'geolocations'
|
||||
interfaces = set(['LAT', 'LON'])
|
||||
interfaces = {'LAT', 'LON'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -186,8 +186,8 @@ class Org(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'organizations'
|
||||
interfaces = set(['ORGNAME', 'ORGUNIT', 'orgunits'])
|
||||
sub_interfaces = set(['ORGNAME', 'ORGUNIT'])
|
||||
interfaces = {'ORGNAME', 'ORGUNIT', 'orgunits'}
|
||||
sub_interfaces = {'ORGNAME', 'ORGUNIT'}
|
||||
|
||||
def add_orgunit(self, value):
|
||||
orgunit = ET.Element('{%s}ORGUNIT' % self.namespace)
|
||||
@ -218,7 +218,7 @@ class Photo(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'photos'
|
||||
interfaces = set(['TYPE', 'EXTVAL'])
|
||||
interfaces = {'TYPE', 'EXTVAL'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -227,7 +227,7 @@ class Logo(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'logos'
|
||||
interfaces = set(['TYPE', 'EXTVAL'])
|
||||
interfaces = {'TYPE', 'EXTVAL'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -236,7 +236,7 @@ class Sound(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'sounds'
|
||||
interfaces = set(['PHONETC', 'EXTVAL'])
|
||||
interfaces = {'PHONETC', 'EXTVAL'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -244,7 +244,7 @@ class BinVal(ElementBase):
|
||||
name = 'BINVAL'
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
interfaces = set(['BINVAL'])
|
||||
interfaces = {'BINVAL'}
|
||||
is_extension = True
|
||||
|
||||
def setup(self, xml=None):
|
||||
@ -275,7 +275,7 @@ class Classification(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'classifications'
|
||||
interfaces = set(['PUBLIC', 'PRIVATE', 'CONFIDENTIAL'])
|
||||
interfaces = {'PUBLIC', 'PRIVATE', 'CONFIDENTIAL'}
|
||||
bool_interfaces = interfaces
|
||||
|
||||
|
||||
@ -284,7 +284,7 @@ class Categories(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'categories'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_categories(self, values):
|
||||
@ -314,7 +314,7 @@ class Birthday(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'birthdays'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_bday(self, value):
|
||||
@ -336,7 +336,7 @@ class Rev(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'revision_dates'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_rev(self, value):
|
||||
@ -358,7 +358,7 @@ class Title(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'titles'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_title(self, value):
|
||||
@ -373,7 +373,7 @@ class Role(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'roles'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_role(self, value):
|
||||
@ -388,7 +388,7 @@ class Note(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'notes'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_note(self, value):
|
||||
@ -403,7 +403,7 @@ class Desc(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'descriptions'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_desc(self, value):
|
||||
@ -418,7 +418,7 @@ class URL(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'urls'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_url(self, value):
|
||||
@ -433,7 +433,7 @@ class UID(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'uids'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_uid(self, value):
|
||||
@ -448,7 +448,7 @@ class ProdID(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'product_ids'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_prodid(self, value):
|
||||
@ -463,7 +463,7 @@ class Mailer(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'mailers'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_mailer(self, value):
|
||||
@ -478,7 +478,7 @@ class SortString(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = 'SORT_STRING'
|
||||
plugin_multi_attrib = 'sort_strings'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_sort_string(self, value):
|
||||
@ -493,7 +493,7 @@ class Agent(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'agents'
|
||||
interfaces = set(['EXTVAL'])
|
||||
interfaces = {'EXTVAL'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -502,7 +502,7 @@ class JabberID(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'jids'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_jabberid(self, value):
|
||||
@ -517,7 +517,7 @@ class TimeZone(ElementBase):
|
||||
namespace = 'vcard-temp'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'timezones'
|
||||
interfaces = set([name])
|
||||
interfaces = {name}
|
||||
is_extension = True
|
||||
|
||||
def set_tz(self, value):
|
||||
|
@ -29,7 +29,7 @@ class XEP_0054(BasePlugin):
|
||||
|
||||
name = 'xep_0054'
|
||||
description = 'XEP-0054: vcard-temp'
|
||||
dependencies = set(['xep_0030', 'xep_0082'])
|
||||
dependencies = {'xep_0030', 'xep_0082'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -111,7 +111,7 @@ class XEP_0059(BasePlugin):
|
||||
|
||||
name = 'xep_0059'
|
||||
description = 'XEP-0059: Result Set Management'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -26,7 +26,7 @@ class XEP_0060(BasePlugin):
|
||||
|
||||
name = 'xep_0060'
|
||||
description = 'XEP-0060: Publish-Subscribe'
|
||||
dependencies = set(['xep_0030', 'xep_0004', 'xep_0082', 'xep_0131'])
|
||||
dependencies = {'xep_0030', 'xep_0004', 'xep_0082', 'xep_0131'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -22,7 +22,7 @@ class XEP_0065(BasePlugin):
|
||||
|
||||
name = 'xep_0065'
|
||||
description = "XEP-0065: SOCKS5 Bytestreams"
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
default_config = {
|
||||
'auto_accept': False
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ class Socks5(ElementBase):
|
||||
name = 'query'
|
||||
namespace = 'http://jabber.org/protocol/bytestreams'
|
||||
plugin_attrib = 'socks'
|
||||
interfaces = set(['sid', 'activate'])
|
||||
sub_interfaces = set(['activate'])
|
||||
interfaces = {'sid', 'activate'}
|
||||
sub_interfaces = {'activate'}
|
||||
|
||||
def add_streamhost(self, jid, host, port):
|
||||
sh = StreamHost(parent=self)
|
||||
@ -21,7 +21,7 @@ class StreamHost(ElementBase):
|
||||
namespace = 'http://jabber.org/protocol/bytestreams'
|
||||
plugin_attrib = 'streamhost'
|
||||
plugin_multi_attrib = 'streamhosts'
|
||||
interfaces = set(['host', 'jid', 'port'])
|
||||
interfaces = {'host', 'jid', 'port'}
|
||||
|
||||
def set_jid(self, value):
|
||||
return self._set_attr('jid', str(value))
|
||||
@ -34,7 +34,7 @@ class StreamHostUsed(ElementBase):
|
||||
name = 'streamhost-used'
|
||||
namespace = 'http://jabber.org/protocol/bytestreams'
|
||||
plugin_attrib = 'streamhost_used'
|
||||
interfaces = set(['jid'])
|
||||
interfaces = {'jid'}
|
||||
|
||||
def set_jid(self, value):
|
||||
return self._set_attr('jid', str(value))
|
||||
|
@ -44,7 +44,7 @@ class XEP_0066(BasePlugin):
|
||||
|
||||
name = 'xep_0066'
|
||||
description = 'XEP-0066: Out of Band Data'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -19,8 +19,8 @@ class XHTML_IM(ElementBase):
|
||||
|
||||
namespace = 'http://jabber.org/protocol/xhtml-im'
|
||||
name = 'html'
|
||||
interfaces = set(['body'])
|
||||
lang_interfaces = set(['body'])
|
||||
interfaces = {'body'}
|
||||
lang_interfaces = {'body'}
|
||||
plugin_attrib = name
|
||||
|
||||
def set_body(self, content, lang=None):
|
||||
|
@ -17,7 +17,7 @@ class XEP_0071(BasePlugin):
|
||||
|
||||
name = 'xep_0071'
|
||||
description = 'XEP-0071: XHTML-IM'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -26,7 +26,7 @@ class XEP_0077(BasePlugin):
|
||||
|
||||
name = 'xep_0077'
|
||||
description = 'XEP-0077: In-Band Registration'
|
||||
dependencies = set(['xep_0004', 'xep_0066'])
|
||||
dependencies = {'xep_0004', 'xep_0066'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'create_account': True,
|
||||
|
@ -27,7 +27,7 @@ class XEP_0079(BasePlugin):
|
||||
|
||||
name = 'xep_0079'
|
||||
description = 'XEP-0079: Advanced Message Processing'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -15,7 +15,7 @@ class AMP(ElementBase):
|
||||
namespace = 'http://jabber.org/protocol/amp'
|
||||
name = 'amp'
|
||||
plugin_attrib = 'amp'
|
||||
interfaces = set(['from', 'to', 'status', 'per_hop'])
|
||||
interfaces = {'from', 'to', 'status', 'per_hop'}
|
||||
|
||||
def get_from(self):
|
||||
return JID(self._get_attr('from'))
|
||||
@ -53,7 +53,7 @@ class Rule(ElementBase):
|
||||
name = 'rule'
|
||||
plugin_attrib = name
|
||||
plugin_multi_attrib = 'rules'
|
||||
interfaces = set(['action', 'condition', 'value'])
|
||||
interfaces = {'action', 'condition', 'value'}
|
||||
|
||||
|
||||
class InvalidRules(ElementBase):
|
||||
|
@ -25,7 +25,7 @@ class XEP_0080(BasePlugin):
|
||||
|
||||
name = 'xep_0080'
|
||||
description = 'XEP-0080: User Location'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_end(self):
|
||||
|
@ -24,7 +24,7 @@ class XEP_0084(BasePlugin):
|
||||
|
||||
name = 'xep_0084'
|
||||
description = 'XEP-0084: User Avatar'
|
||||
dependencies = set(['xep_0163', 'xep_0060'])
|
||||
dependencies = {'xep_0163', 'xep_0060'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -16,7 +16,7 @@ class Data(ElementBase):
|
||||
name = 'data'
|
||||
namespace = 'urn:xmpp:avatar:data'
|
||||
plugin_attrib = 'avatar_data'
|
||||
interfaces = set(['value'])
|
||||
interfaces = {'value'}
|
||||
|
||||
def get_value(self):
|
||||
if self.xml.text:
|
||||
@ -63,7 +63,7 @@ class Info(ElementBase):
|
||||
namespace = 'urn:xmpp:avatar:metadata'
|
||||
plugin_attrib = 'info'
|
||||
plugin_multi_attrib = 'items'
|
||||
interfaces = set(['bytes', 'height', 'id', 'type', 'url', 'width'])
|
||||
interfaces = {'bytes', 'height', 'id', 'type', 'url', 'width'}
|
||||
|
||||
|
||||
class Pointer(ElementBase):
|
||||
|
@ -28,7 +28,7 @@ class XEP_0085(BasePlugin):
|
||||
|
||||
name = 'xep_0085'
|
||||
description = 'XEP-0085: Chat State Notifications'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -28,7 +28,7 @@ class XEP_0092(BasePlugin):
|
||||
|
||||
name = 'xep_0092'
|
||||
description = 'XEP-0092: Software Version'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'software_name': 'Slixmpp',
|
||||
|
@ -13,7 +13,7 @@ class SI(ElementBase):
|
||||
name = 'si'
|
||||
namespace = 'http://jabber.org/protocol/si'
|
||||
plugin_attrib = 'si'
|
||||
interfaces = set(['id', 'mime_type', 'profile'])
|
||||
interfaces = {'id', 'mime_type', 'profile'}
|
||||
|
||||
def get_mime_type(self):
|
||||
return self._get_attr('mime-type', 'application/octet-stream')
|
||||
|
@ -31,7 +31,7 @@ class XEP_0095(BasePlugin):
|
||||
|
||||
name = 'xep_0095'
|
||||
description = 'XEP-0095: Stream Initiation'
|
||||
dependencies = set(['xep_0020', 'xep_0030', 'xep_0047', 'xep_0065'])
|
||||
dependencies = {'xep_0020', 'xep_0030', 'xep_0047', 'xep_0065'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -23,7 +23,7 @@ class XEP_0096(BasePlugin):
|
||||
|
||||
name = 'xep_0096'
|
||||
description = 'XEP-0096: SI File Transfer'
|
||||
dependencies = set(['xep_0095'])
|
||||
dependencies = {'xep_0095'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -16,8 +16,8 @@ class File(ElementBase):
|
||||
name = 'file'
|
||||
namespace = 'http://jabber.org/protocol/si/profile/file-transfer'
|
||||
plugin_attrib = 'file'
|
||||
interfaces = set(['name', 'size', 'date', 'hash', 'desc'])
|
||||
sub_interfaces = set(['desc'])
|
||||
interfaces = {'name', 'size', 'date', 'hash', 'desc'}
|
||||
sub_interfaces = {'desc'}
|
||||
|
||||
def set_size(self, value):
|
||||
self._set_attr('size', str(value))
|
||||
@ -36,7 +36,7 @@ class Range(ElementBase):
|
||||
name = 'range'
|
||||
namespace = 'http://jabber.org/protocol/si/profile/file-transfer'
|
||||
plugin_attrib = 'range'
|
||||
interfaces = set(['length', 'offset'])
|
||||
interfaces = {'length', 'offset'}
|
||||
|
||||
def set_length(self, value):
|
||||
self._set_attr('length', str(value))
|
||||
|
@ -14,7 +14,7 @@ class XEP_0106(BasePlugin):
|
||||
|
||||
name = 'xep_0106'
|
||||
description = 'XEP-0106: JID Escaping'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
|
||||
def session_bind(self, jid):
|
||||
self.xmpp['xep_0030'].add_feature(feature='jid\\20escaping')
|
||||
|
@ -14,8 +14,8 @@ class UserMood(ElementBase):
|
||||
name = 'mood'
|
||||
namespace = 'http://jabber.org/protocol/mood'
|
||||
plugin_attrib = 'mood'
|
||||
interfaces = set(['value', 'text'])
|
||||
sub_interfaces = set(['text'])
|
||||
interfaces = {'value', 'text'}
|
||||
sub_interfaces = {'text'}
|
||||
moods = set(['afraid', 'amazed', 'amorous', 'angry', 'annoyed', 'anxious',
|
||||
'aroused', 'ashamed', 'bored', 'brave', 'calm', 'cautious',
|
||||
'cold', 'confident', 'confused', 'contemplative', 'contented',
|
||||
|
@ -27,7 +27,7 @@ class XEP_0107(BasePlugin):
|
||||
|
||||
name = 'xep_0107'
|
||||
description = 'XEP-0107: User Mood'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -14,8 +14,8 @@ class UserActivity(ElementBase):
|
||||
name = 'activity'
|
||||
namespace = 'http://jabber.org/protocol/activity'
|
||||
plugin_attrib = 'activity'
|
||||
interfaces = set(['value', 'text'])
|
||||
sub_interfaces = set(['text'])
|
||||
interfaces = {'value', 'text'}
|
||||
sub_interfaces = {'text'}
|
||||
general = set(['doing_chores', 'drinking', 'eating', 'exercising',
|
||||
'grooming', 'having_appointment', 'inactive', 'relaxing',
|
||||
'talking', 'traveling', 'undefined', 'working'])
|
||||
|
@ -23,7 +23,7 @@ class XEP_0108(BasePlugin):
|
||||
|
||||
name = 'xep_0108'
|
||||
description = 'XEP-0108: User Activity'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_end(self):
|
||||
|
@ -32,7 +32,7 @@ class XEP_0115(BasePlugin):
|
||||
|
||||
name = 'xep_0115'
|
||||
description = 'XEP-0115: Entity Capabilities'
|
||||
dependencies = set(['xep_0030', 'xep_0128', 'xep_0004'])
|
||||
dependencies = {'xep_0030', 'xep_0128', 'xep_0004'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'hash': 'sha-1',
|
||||
|
@ -23,7 +23,7 @@ class XEP_0118(BasePlugin):
|
||||
|
||||
name = 'xep_0118'
|
||||
description = 'XEP-0118: User Tune'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_end(self):
|
||||
|
@ -12,7 +12,7 @@ class XEP_0122(BasePlugin):
|
||||
|
||||
name = 'xep_0122'
|
||||
description = 'XEP-0122: Data Forms Validation'
|
||||
dependencies = set(['xep_0004'])
|
||||
dependencies = {'xep_0004'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -41,7 +41,7 @@ class XEP_0128(BasePlugin):
|
||||
|
||||
name = 'xep_0128'
|
||||
description = 'XEP-0128: Service Discovery Extensions'
|
||||
dependencies = set(['xep_0030', 'xep_0004'])
|
||||
dependencies = {'xep_0030', 'xep_0004'}
|
||||
|
||||
def plugin_init(self):
|
||||
"""Start the XEP-0128 plugin."""
|
||||
|
@ -17,7 +17,7 @@ class XEP_0131(BasePlugin):
|
||||
|
||||
name = 'xep_0131'
|
||||
description = 'XEP-0131: Stanza Headers and Internet Metadata'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'supported_headers': set()
|
||||
|
@ -14,7 +14,7 @@ class Headers(ElementBase):
|
||||
name = 'headers'
|
||||
namespace = 'http://jabber.org/protocol/shim'
|
||||
plugin_attrib = 'headers'
|
||||
interfaces = set(['headers'])
|
||||
interfaces = {'headers'}
|
||||
is_extension = True
|
||||
|
||||
def get_headers(self):
|
||||
|
@ -14,7 +14,7 @@ class XEP_0133(BasePlugin):
|
||||
|
||||
name = 'xep_0133'
|
||||
description = 'XEP-0133: Service Administration'
|
||||
dependencies = set(['xep_0030', 'xep_0004', 'xep_0050'])
|
||||
dependencies = {'xep_0030', 'xep_0004', 'xep_0050'}
|
||||
commands = set(['add-user', 'delete-user', 'disable-user',
|
||||
'reenable-user', 'end-user-session', 'get-user-password',
|
||||
'change-user-password', 'get-user-roster',
|
||||
|
@ -95,7 +95,7 @@ class XEP_0138(BasePlugin):
|
||||
"""
|
||||
name = "xep_0138"
|
||||
description = "XEP-0138: Compression"
|
||||
dependencies = set(["xep_0030"])
|
||||
dependencies = {"xep_0030"}
|
||||
|
||||
def plugin_init(self):
|
||||
self.xep = '0138'
|
||||
|
@ -23,7 +23,7 @@ class XEP_0152(BasePlugin):
|
||||
|
||||
name = 'xep_0152'
|
||||
description = 'XEP-0152: Reachability Addresses'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_end(self):
|
||||
|
@ -21,9 +21,9 @@ class Address(ElementBase):
|
||||
namespace = 'urn:xmpp:reach:0'
|
||||
plugin_attrib = 'address'
|
||||
plugin_multi_attrib = 'addresses'
|
||||
interfaces = set(['uri', 'desc'])
|
||||
lang_interfaces = set(['desc'])
|
||||
sub_interfaces = set(['desc'])
|
||||
interfaces = {'uri', 'desc'}
|
||||
lang_interfaces = {'desc'}
|
||||
sub_interfaces = {'desc'}
|
||||
|
||||
|
||||
register_stanza_plugin(Reachability, Address, iterable=True)
|
||||
|
@ -13,7 +13,7 @@ class VCardTempUpdate(ElementBase):
|
||||
name = 'x'
|
||||
namespace = 'vcard-temp:x:update'
|
||||
plugin_attrib = 'vcard_temp_update'
|
||||
interfaces = set(['photo'])
|
||||
interfaces = {'photo'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
def set_photo(self, value):
|
||||
|
@ -24,7 +24,7 @@ class XEP_0153(BasePlugin):
|
||||
|
||||
name = 'xep_0153'
|
||||
description = 'XEP-0153: vCard-Based Avatars'
|
||||
dependencies = set(['xep_0054'])
|
||||
dependencies = {'xep_0054'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -24,7 +24,7 @@ class XEP_0163(BasePlugin):
|
||||
|
||||
name = 'xep_0163'
|
||||
description = 'XEP-0163: Personal Eventing Protocol (PEP)'
|
||||
dependencies = set(['xep_0030', 'xep_0060', 'xep_0115'])
|
||||
dependencies = {'xep_0030', 'xep_0060', 'xep_0115'}
|
||||
|
||||
def register_pep(self, name, stanza):
|
||||
"""
|
||||
|
@ -28,7 +28,7 @@ class XEP_0172(BasePlugin):
|
||||
|
||||
name = 'xep_0172'
|
||||
description = 'XEP-0172: User Nickname'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -24,7 +24,7 @@ class XEP_0184(BasePlugin):
|
||||
|
||||
name = 'xep_0184'
|
||||
description = 'XEP-0184: Message Delivery Receipts'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'auto_ack': True,
|
||||
|
@ -45,7 +45,7 @@ class Received(ElementBase):
|
||||
namespace = 'urn:xmpp:receipts'
|
||||
name = 'received'
|
||||
plugin_attrib = 'receipt'
|
||||
interfaces = set(['receipt'])
|
||||
interfaces = {'receipt'}
|
||||
sub_interfaces = interfaces
|
||||
is_extension = True
|
||||
|
||||
|
@ -21,7 +21,7 @@ class XEP_0186(BasePlugin):
|
||||
|
||||
name = 'xep_0186'
|
||||
description = 'XEP-0186: Invisible Command'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
|
||||
def plugin_init(self):
|
||||
register_stanza_plugin(Iq, Visible)
|
||||
|
@ -23,7 +23,7 @@ class XEP_0191(BasePlugin):
|
||||
|
||||
name = 'xep_0191'
|
||||
description = 'XEP-0191: Blocking Command'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -13,7 +13,7 @@ class BlockList(ElementBase):
|
||||
name = 'blocklist'
|
||||
namespace = 'urn:xmpp:blocking'
|
||||
plugin_attrib = 'blocklist'
|
||||
interfaces = set(['items'])
|
||||
interfaces = {'items'}
|
||||
|
||||
def get_items(self):
|
||||
result = set()
|
||||
|
@ -23,7 +23,7 @@ class XEP_0196(BasePlugin):
|
||||
|
||||
name = 'xep_0196'
|
||||
description = 'XEP-0196: User Gaming'
|
||||
dependencies = set(['xep_0163'])
|
||||
dependencies = {'xep_0163'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_end(self):
|
||||
|
@ -13,7 +13,7 @@ from slixmpp.xmlstream import ElementBase, StanzaBase
|
||||
class Enable(StanzaBase):
|
||||
name = 'enable'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
interfaces = set(['max', 'resume'])
|
||||
interfaces = {'max', 'resume'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
@ -30,7 +30,7 @@ class Enable(StanzaBase):
|
||||
class Enabled(StanzaBase):
|
||||
name = 'enabled'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
interfaces = set(['id', 'location', 'max', 'resume'])
|
||||
interfaces = {'id', 'location', 'max', 'resume'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
@ -47,7 +47,7 @@ class Enabled(StanzaBase):
|
||||
class Resume(StanzaBase):
|
||||
name = 'resume'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
interfaces = set(['h', 'previd'])
|
||||
interfaces = {'h', 'previd'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
@ -66,7 +66,7 @@ class Resume(StanzaBase):
|
||||
class Resumed(StanzaBase):
|
||||
name = 'resumed'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
interfaces = set(['h', 'previd'])
|
||||
interfaces = {'h', 'previd'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
@ -96,7 +96,7 @@ class StreamManagement(ElementBase):
|
||||
name = 'sm'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
plugin_attrib = name
|
||||
interfaces = set(['required', 'optional'])
|
||||
interfaces = {'required', 'optional'}
|
||||
|
||||
def get_required(self):
|
||||
return self.xml.find('{%s}required' % self.namespace) is not None
|
||||
@ -134,7 +134,7 @@ class RequestAck(StanzaBase):
|
||||
class Ack(StanzaBase):
|
||||
name = 'a'
|
||||
namespace = 'urn:xmpp:sm:3'
|
||||
interfaces = set(['h'])
|
||||
interfaces = {'h'}
|
||||
|
||||
def setup(self, xml):
|
||||
StanzaBase.setup(self, xml)
|
||||
|
@ -50,7 +50,7 @@ class XEP_0199(BasePlugin):
|
||||
|
||||
name = 'xep_0199'
|
||||
description = 'XEP-0199: XMPP Ping'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'keepalive': False,
|
||||
|
@ -28,7 +28,7 @@ class XEP_0202(BasePlugin):
|
||||
|
||||
name = 'xep_0202'
|
||||
description = 'XEP-0202: Entity Time'
|
||||
dependencies = set(['xep_0030', 'xep_0082'])
|
||||
dependencies = {'xep_0030', 'xep_0082'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
#: As a default, respond to time requests with the
|
||||
|
@ -21,7 +21,7 @@ class XEP_0221(BasePlugin):
|
||||
|
||||
name = 'xep_0221'
|
||||
description = 'XEP-0221: Data Forms Media Element'
|
||||
dependencies = set(['xep_0004'])
|
||||
dependencies = {'xep_0004'}
|
||||
|
||||
def plugin_init(self):
|
||||
register_stanza_plugin(FormField, Media)
|
||||
|
@ -13,7 +13,7 @@ class Media(ElementBase):
|
||||
name = 'media'
|
||||
namespace = 'urn:xmpp:media-element'
|
||||
plugin_attrib = 'media'
|
||||
interfaces = set(['height', 'width', 'alt'])
|
||||
interfaces = {'height', 'width', 'alt'}
|
||||
|
||||
def add_uri(self, value, itype):
|
||||
uri = URI()
|
||||
@ -27,7 +27,7 @@ class URI(ElementBase):
|
||||
namespace = 'urn:xmpp:media-element'
|
||||
plugin_attrib = 'uri'
|
||||
plugin_multi_attrib = 'uris'
|
||||
interfaces = set(['type', 'value'])
|
||||
interfaces = {'type', 'value'}
|
||||
|
||||
def get_value(self):
|
||||
return self.xml.text
|
||||
|
@ -23,7 +23,7 @@ class XEP_0222(BasePlugin):
|
||||
|
||||
name = 'xep_0222'
|
||||
description = 'XEP-0222: Persistent Storage of Public Data via PubSub'
|
||||
dependencies = set(['xep_0163', 'xep_0060', 'xep_0004'])
|
||||
dependencies = {'xep_0163', 'xep_0060', 'xep_0004'}
|
||||
|
||||
profile = {'pubsub#persist_items': True,
|
||||
'pubsub#send_last_published_item': 'never'}
|
||||
|
@ -23,7 +23,7 @@ class XEP_0223(BasePlugin):
|
||||
|
||||
name = 'xep_0223'
|
||||
description = 'XEP-0223: Persistent Storage of Private Data via PubSub'
|
||||
dependencies = set(['xep_0163', 'xep_0060', 'xep_0004'])
|
||||
dependencies = {'xep_0163', 'xep_0060', 'xep_0004'}
|
||||
|
||||
profile = {'pubsub#persist_items': True,
|
||||
'pubsub#send_last_published_item': 'never'}
|
||||
|
@ -27,7 +27,7 @@ class XEP_0224(BasePlugin):
|
||||
|
||||
name = 'xep_0224'
|
||||
description = 'XEP-0224: Attention'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -31,7 +31,7 @@ class XEP_0231(BasePlugin):
|
||||
|
||||
name = 'xep_0231'
|
||||
description = 'XEP-0231: Bits of Binary'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
|
||||
def plugin_init(self):
|
||||
self._cids = {}
|
||||
|
@ -19,7 +19,7 @@ class XEP_0235(BasePlugin):
|
||||
|
||||
name = 'xep_0235'
|
||||
description = 'XEP-0235: OAuth Over XMPP'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -28,7 +28,7 @@ class XEP_0249(BasePlugin):
|
||||
|
||||
name = 'xep_0249'
|
||||
description = 'XEP-0249: Direct MUC Invitations'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -23,7 +23,7 @@ class XEP_0256(BasePlugin):
|
||||
|
||||
name = 'xep_0256'
|
||||
description = 'XEP-0256: Last Activity in Presence'
|
||||
dependencies = set(['xep_0012'])
|
||||
dependencies = {'xep_0012'}
|
||||
stanza = stanza
|
||||
default_config = {
|
||||
'auto_last_activity': False
|
||||
|
@ -20,7 +20,7 @@ class XEP_0256(BasePlugin):
|
||||
|
||||
name = 'xep_0256'
|
||||
description = 'XEP-0256: Last Activity in Presence'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -22,7 +22,7 @@ class XEP_0257(BasePlugin):
|
||||
|
||||
name = 'xep_0257'
|
||||
description = 'XEP-0257: Client Certificate Management for SASL EXTERNAL'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -21,13 +21,13 @@ class CertItem(ElementBase):
|
||||
namespace = 'urn:xmpp:saslcert:1'
|
||||
plugin_attrib = 'item'
|
||||
plugin_multi_attrib = 'items'
|
||||
interfaces = set(['name', 'x509cert', 'users'])
|
||||
sub_interfaces = set(['name', 'x509cert'])
|
||||
interfaces = {'name', 'x509cert', 'users'}
|
||||
sub_interfaces = {'name', 'x509cert'}
|
||||
|
||||
def get_users(self):
|
||||
resources = self.xml.findall('{%s}users/{%s}resource' % (
|
||||
self.namespace, self.namespace))
|
||||
return set([res.text for res in resources])
|
||||
return {res.text for res in resources}
|
||||
|
||||
def set_users(self, values):
|
||||
users = self.xml.find('{%s}users' % self.namespace)
|
||||
@ -49,8 +49,8 @@ class AppendCert(ElementBase):
|
||||
name = 'append'
|
||||
namespace = 'urn:xmpp:saslcert:1'
|
||||
plugin_attrib = 'sasl_cert_append'
|
||||
interfaces = set(['name', 'x509cert', 'cert_management'])
|
||||
sub_interfaces = set(['name', 'x509cert'])
|
||||
interfaces = {'name', 'x509cert', 'cert_management'}
|
||||
sub_interfaces = {'name', 'x509cert'}
|
||||
|
||||
def get_cert_management(self):
|
||||
manage = self.xml.find('{%s}no-cert-management' % self.namespace)
|
||||
@ -72,7 +72,7 @@ class DisableCert(ElementBase):
|
||||
name = 'disable'
|
||||
namespace = 'urn:xmpp:saslcert:1'
|
||||
plugin_attrib = 'sasl_cert_disable'
|
||||
interfaces = set(['name'])
|
||||
interfaces = {'name'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ class RevokeCert(ElementBase):
|
||||
name = 'revoke'
|
||||
namespace = 'urn:xmpp:saslcert:1'
|
||||
plugin_attrib = 'sasl_cert_revoke'
|
||||
interfaces = set(['name'])
|
||||
interfaces = {'name'}
|
||||
sub_interfaces = interfaces
|
||||
|
||||
|
||||
|
@ -21,7 +21,7 @@ class XEP_0258(BasePlugin):
|
||||
|
||||
name = 'xep_0258'
|
||||
description = 'XEP-0258: Security Labels in XMPP'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -33,7 +33,7 @@ class DisplayMarking(ElementBase):
|
||||
name = 'displaymarking'
|
||||
namespace = 'urn:xmpp:sec-label:0'
|
||||
plugin_attrib = 'display_marking'
|
||||
interfaces = set(['fgcolor', 'bgcolor', 'value'])
|
||||
interfaces = {'fgcolor', 'bgcolor', 'value'}
|
||||
|
||||
def get_fgcolor(self):
|
||||
return self._get_attr('fgcolor', 'black')
|
||||
@ -62,7 +62,7 @@ class Catalog(ElementBase):
|
||||
name = 'catalog'
|
||||
namespace = 'urn:xmpp:sec-label:catalog:2'
|
||||
plugin_attrib = 'security_label_catalog'
|
||||
interfaces = set(['to', 'from', 'name', 'desc', 'id', 'size', 'restrict'])
|
||||
interfaces = {'to', 'from', 'name', 'desc', 'id', 'size', 'restrict'}
|
||||
|
||||
def get_to(self):
|
||||
return JID(self._get_attr('to'))
|
||||
@ -96,7 +96,7 @@ class CatalogItem(ElementBase):
|
||||
namespace = 'urn:xmpp:sec-label:catalog:2'
|
||||
plugin_attrib = 'item'
|
||||
plugin_multi_attrib = 'items'
|
||||
interfaces = set(['selector', 'default'])
|
||||
interfaces = {'selector', 'default'}
|
||||
|
||||
def get_default(self):
|
||||
value = self._get_attr('default', '')
|
||||
@ -116,7 +116,7 @@ class ESSLabel(ElementBase):
|
||||
name = 'esssecuritylabel'
|
||||
namespace = 'urn:xmpp:sec-label:ess:0'
|
||||
plugin_attrib = 'ess'
|
||||
interfaces = set(['value'])
|
||||
interfaces = {'value'}
|
||||
|
||||
def get_value(self):
|
||||
if self.xml.text:
|
||||
|
@ -19,7 +19,7 @@ class XEP_0279(BasePlugin):
|
||||
|
||||
name = 'xep_0279'
|
||||
description = 'XEP-0279: Server IP Check'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -14,7 +14,7 @@ class IPCheck(ElementBase):
|
||||
name = 'ip'
|
||||
namespace = 'urn:xmpp:sic:0'
|
||||
plugin_attrib = 'ip_check'
|
||||
interfaces = set(['ip_check'])
|
||||
interfaces = {'ip_check'}
|
||||
is_extension = True
|
||||
|
||||
def get_ip_check(self):
|
||||
|
@ -28,7 +28,7 @@ class XEP_0280(BasePlugin):
|
||||
|
||||
name = 'xep_0280'
|
||||
description = 'XEP-0280: Message Carbons'
|
||||
dependencies = set(['xep_0030', 'xep_0297'])
|
||||
dependencies = {'xep_0030', 'xep_0297'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -13,7 +13,7 @@ class ReceivedCarbon(ElementBase):
|
||||
name = 'received'
|
||||
namespace = 'urn:xmpp:carbons:2'
|
||||
plugin_attrib = 'carbon_received'
|
||||
interfaces = set(['carbon_received'])
|
||||
interfaces = {'carbon_received'}
|
||||
is_extension = True
|
||||
|
||||
def get_carbon_received(self):
|
||||
@ -30,7 +30,7 @@ class SentCarbon(ElementBase):
|
||||
name = 'sent'
|
||||
namespace = 'urn:xmpp:carbons:2'
|
||||
plugin_attrib = 'carbon_sent'
|
||||
interfaces = set(['carbon_sent'])
|
||||
interfaces = {'carbon_sent'}
|
||||
is_extension = True
|
||||
|
||||
def get_carbon_sent(self):
|
||||
|
@ -21,7 +21,7 @@ class XEP_0297(BasePlugin):
|
||||
|
||||
name = 'xep_0297'
|
||||
description = 'XEP-0297: Stanza Forwarding'
|
||||
dependencies = set(['xep_0030', 'xep_0203'])
|
||||
dependencies = {'xep_0030', 'xep_0203'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -14,7 +14,7 @@ class Forwarded(ElementBase):
|
||||
name = 'forwarded'
|
||||
namespace = 'urn:xmpp:forward:0'
|
||||
plugin_attrib = 'forwarded'
|
||||
interfaces = set(['stanza'])
|
||||
interfaces = {'stanza'}
|
||||
|
||||
def get_stanza(self):
|
||||
for stanza in self:
|
||||
|
@ -28,7 +28,7 @@ class XEP_0308(BasePlugin):
|
||||
|
||||
name = 'xep_0308'
|
||||
description = 'XEP-0308: Last Message Correction'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -13,4 +13,4 @@ class Replace(ElementBase):
|
||||
name = 'replace'
|
||||
namespace = 'urn:xmpp:message-correct:0'
|
||||
plugin_attrib = 'replace'
|
||||
interfaces = set(['id'])
|
||||
interfaces = {'id'}
|
||||
|
@ -29,7 +29,7 @@ class XEP_0313(BasePlugin):
|
||||
|
||||
name = 'xep_0313'
|
||||
description = 'XEP-0313: Message Archive Management'
|
||||
dependencies = set(['xep_0030', 'xep_0050', 'xep_0059', 'xep_0297'])
|
||||
dependencies = {'xep_0030', 'xep_0050', 'xep_0059', 'xep_0297'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -17,8 +17,8 @@ class MAM(ElementBase):
|
||||
name = 'query'
|
||||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam'
|
||||
interfaces = set(['queryid', 'start', 'end', 'with', 'results'])
|
||||
sub_interfaces = set(['start', 'end', 'with'])
|
||||
interfaces = {'queryid', 'start', 'end', 'with', 'results'}
|
||||
sub_interfaces = {'start', 'end', 'with'}
|
||||
|
||||
def setup(self, xml=None):
|
||||
ElementBase.setup(self, xml)
|
||||
@ -66,8 +66,8 @@ class Preferences(ElementBase):
|
||||
name = 'prefs'
|
||||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam_prefs'
|
||||
interfaces = set(['default', 'always', 'never'])
|
||||
sub_interfaces = set(['always', 'never'])
|
||||
interfaces = {'default', 'always', 'never'}
|
||||
sub_interfaces = {'always', 'never'}
|
||||
|
||||
def get_always(self):
|
||||
results = set()
|
||||
@ -122,7 +122,7 @@ class Result(ElementBase):
|
||||
name = 'result'
|
||||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam_result'
|
||||
interfaces = set(['queryid', 'id'])
|
||||
interfaces = {'queryid', 'id'}
|
||||
|
||||
|
||||
class Archived(ElementBase):
|
||||
@ -130,7 +130,7 @@ class Archived(ElementBase):
|
||||
namespace = 'urn:xmpp:mam:tmp'
|
||||
plugin_attrib = 'mam_archived'
|
||||
plugin_multi_attrib = 'mam_archives'
|
||||
interfaces = set(['by', 'id'])
|
||||
interfaces = {'by', 'id'}
|
||||
|
||||
def get_by(self):
|
||||
return JID(self._get_attr('by'))
|
||||
|
@ -19,7 +19,7 @@ from slixmpp.plugins.xep_0319 import stanza
|
||||
class XEP_0319(BasePlugin):
|
||||
name = 'xep_0319'
|
||||
description = 'XEP-0319: Last User Interaction in Presence'
|
||||
dependencies = set(['xep_0012'])
|
||||
dependencies = {'xep_0012'}
|
||||
stanza = stanza
|
||||
|
||||
def plugin_init(self):
|
||||
|
@ -16,7 +16,7 @@ class Idle(ElementBase):
|
||||
name = 'idle'
|
||||
namespace = 'urn:xmpp:idle:1'
|
||||
plugin_attrib = 'idle'
|
||||
interfaces = set(['since'])
|
||||
interfaces = {'since'}
|
||||
|
||||
def get_since(self):
|
||||
timestamp = self._get_attr('since')
|
||||
|
@ -101,7 +101,7 @@ class XEP_0323(BasePlugin):
|
||||
|
||||
name = 'xep_0323'
|
||||
description = 'XEP-0323 Internet of Things - Sensor Data'
|
||||
dependencies = set(['xep_0030'])
|
||||
dependencies = {'xep_0030'}
|
||||
stanza = stanza
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user