How to use the slixmpp.plugins.base.register_plugin function in slixmpp

To help you get started, we’ve selected a few slixmpp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poezio / slixmpp / tests / test_plugins.py View on Github external
name = 'd'
    dependencies = {'c'}


class E(BasePlugin):
    name = 'e'
    dependencies = {'a', 'd'}

class F(BasePlugin):
    name = 'f'
    dependencies = {'a', 'b'}


register_plugin(A)
register_plugin(B)
register_plugin(C)
register_plugin(D)
register_plugin(E)
register_plugin(F)


class TestPlugins(unittest.TestCase):


    def test_enable(self):
        """Enable a single plugin."""
        p = PluginManager(None)

        events = []

        def init(self):
            events.append('init')
github poezio / slixmpp / tests / test_plugins.py View on Github external
class E(BasePlugin):
    name = 'e'
    dependencies = {'a', 'd'}

class F(BasePlugin):
    name = 'f'
    dependencies = {'a', 'b'}


register_plugin(A)
register_plugin(B)
register_plugin(C)
register_plugin(D)
register_plugin(E)
register_plugin(F)


class TestPlugins(unittest.TestCase):


    def test_enable(self):
        """Enable a single plugin."""
        p = PluginManager(None)

        events = []

        def init(self):
            events.append('init')

        A.plugin_init = init
github poezio / slixmpp / tests / test_plugins.py View on Github external
class D(BasePlugin):
    name = 'd'
    dependencies = {'c'}


class E(BasePlugin):
    name = 'e'
    dependencies = {'a', 'd'}

class F(BasePlugin):
    name = 'f'
    dependencies = {'a', 'b'}


register_plugin(A)
register_plugin(B)
register_plugin(C)
register_plugin(D)
register_plugin(E)
register_plugin(F)


class TestPlugins(unittest.TestCase):


    def test_enable(self):
        """Enable a single plugin."""
        p = PluginManager(None)

        events = []
github poezio / slixmpp / slixmpp / plugins / xep_0033 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0033 import stanza
from slixmpp.plugins.xep_0033.stanza import Addresses, Address
from slixmpp.plugins.xep_0033.addresses import XEP_0033


register_plugin(XEP_0033)
github poezio / slixmpp / slixmpp / plugins / xep_0335 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2018 Maxime “pep” Buquet
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0335 import stanza
from slixmpp.plugins.xep_0335.stanza import JSON_Container
from slixmpp.plugins.xep_0335.json_containers import XEP_0335

register_plugin(XEP_0335)
github poezio / slixmpp / slixmpp / plugins / xep_0184 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2012 Erik Reuterborg Larsson, Nathanael C. Fritz
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0184.stanza import Request, Received
from slixmpp.plugins.xep_0184.receipt import XEP_0184


register_plugin(XEP_0184)
github poezio / slixmpp / slixmpp / plugins / xep_0092 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2010 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0092 import stanza
from slixmpp.plugins.xep_0092.stanza import Version
from slixmpp.plugins.xep_0092.version import XEP_0092


register_plugin(XEP_0092)
github poezio / slixmpp / slixmpp / plugins / xep_0224 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0224 import stanza
from slixmpp.plugins.xep_0224.stanza import Attention
from slixmpp.plugins.xep_0224.attention import XEP_0224


register_plugin(XEP_0224)
github poezio / slixmpp / slixmpp / plugins / google / __init__.py View on Github external
'google_settings',
        'google_nosave',
        'google_auth'
    ])

    def __getitem__(self, attr):
        if attr in ('settings', 'nosave', 'auth'):
            return self.xmpp['google_%s' % attr]
        elif attr == 'gmail':
            return self.xmpp['gmail']
        else:
            raise KeyError(attr)


register_plugin(Gmail)
register_plugin(GoogleAuth)
register_plugin(GoogleSettings)
register_plugin(GoogleNoSave)
register_plugin(Google)
github poezio / slixmpp / slixmpp / plugins / xep_0004 / __init__.py View on Github external
"""
    Slixmpp: The Slick XMPP Library
    Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of Slixmpp.

    See the file LICENSE for copying permission.
"""

from slixmpp.plugins.base import register_plugin

from slixmpp.plugins.xep_0004.stanza import Form
from slixmpp.plugins.xep_0004.stanza import FormField, FieldOption
from slixmpp.plugins.xep_0004.dataforms import XEP_0004


register_plugin(XEP_0004)