bitween.components.xmpp.share_plugin package

Submodules

bitween.components.xmpp.share_plugin.address_stanza module

class bitween.components.xmpp.share_plugin.address_stanza.AddressStanza(xml=None, parent=None)[source]

Bases: sleekxmpp.xmlstream.stanzabase.ElementBase

substanza for UserSharesStanza, one object represents one share

interfaces = set(['port', 'address'])
name = 'ip_address'
namespace = 'https://xmpp.kwoh.de/protocol/shares'
plugin_attrib = 'ip_address'
plugin_multi_attrib = 'ip_addresses'

bitween.components.xmpp.share_plugin.resource_stanza module

class bitween.components.xmpp.share_plugin.resource_stanza.ResourceStanza(xml=None, parent=None)[source]

Bases: sleekxmpp.xmlstream.stanzabase.ElementBase

substanza for UserSharesStanza, one object represents one share

add_address(ip, port)[source]
add_share(hash, name='', size=0)[source]
interfaces = set(['resource'])
name = 'resource'
namespace = 'https://xmpp.kwoh.de/protocol/shares'
plugin_attrib = 'resource'
plugin_multi_attrib = 'resources'

bitween.components.xmpp.share_plugin.share_item_stanza module

class bitween.components.xmpp.share_plugin.share_item_stanza.ShareItemStanza(xml=None, parent=None)[source]

Bases: sleekxmpp.xmlstream.stanzabase.ElementBase

substanza for UserSharesStanza, one object represents one share

interfaces = set(['hash', 'name', 'size'])
name = 'share_item'
namespace = 'https://xmpp.kwoh.de/protocol/shares'
plugin_attrib = 'share_item'
plugin_multi_attrib = 'share_items'

bitween.components.xmpp.share_plugin.stanza module

class bitween.components.xmpp.share_plugin.stanza.UserSharesStanza(xml=None, parent=None)[source]

Bases: sleekxmpp.xmlstream.stanzabase.ElementBase

add_resource(resource='')[source]
Parameters:
  • ip
  • v – ‘v4’ or ‘v6’
  • port – the port bt is listening on
Returns:

name = 'user_shares'
namespace = 'https://xmpp.kwoh.de/protocol/shares'
plugin_attrib = 'user_shares'

bitween.components.xmpp.share_plugin.user_share module

class bitween.components.xmpp.share_plugin.user_share.UserShares(xmpp, config=None)[source]

Bases: sleekxmpp.plugins.base.BasePlugin

Share Plugin

dependencies = set(['xep_0163'])
description = 'UserShares'
name = 'shares'
static on_shares_publish(msg)[source]

handle incoming files

plugin_end()[source]
Returns:
plugin_init()[source]
publish_shares(handle_infos=None, addresses=None, options=None, ifrom=None, block=True, callback=None, timeout=None)[source]

publish current shares and addresses

Parameters:
  • handle_infos
  • addresses
  • options
  • ifrom
  • block
  • callback
  • timeout
Returns:

stop(ifrom=None, block=True, callback=None, timeout=None)[source]

Clear existing user tune information to stop notifications.

Module contents