当前位置: 首页>>代码示例>>Python>>正文


Python base.register_plugin函数代码示例

本文整理汇总了Python中sleekxmpp.plugins.base.register_plugin函数的典型用法代码示例。如果您正苦于以下问题:Python register_plugin函数的具体用法?Python register_plugin怎么用?Python register_plugin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了register_plugin函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: load_commands

def load_commands():
    """
    Register the core plugins for the system.
    :return: None
    """
    register_plugin(configure_client_details)
    register_plugin(search_venues)
开发者ID:rerobins,项目名称:rho_foursquare_bot,代码行数:7,代码来源:__init__.py

示例2: load_components

def load_components():
    """
    Register the core plugins for the system.
    :return: None
    """
    register_plugin(knowledge_provider)
    register_plugin(foursquare_lookup)
    register_plugin(knowledge_maintainer)
    register_plugin(search_handler)
开发者ID:rerobins,项目名称:rho_foursquare_bot,代码行数:9,代码来源:__init__.py

示例3: Copyright

"""
    SleekXMPP: The Sleek XMPP Library
    Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of SleekXMPP.

    See the file LICENSE for copying permission.
"""

from sleekxmpp.plugins.base import register_plugin

from sleekxmpp.plugins.xep_0202 import stanza
from sleekxmpp.plugins.xep_0202.stanza import EntityTime
from sleekxmpp.plugins.xep_0202.time import XEP_0202


register_plugin(XEP_0202)


# Retain some backwards compatibility
xep_0202 = XEP_0202
开发者ID:2M1R,项目名称:SleekXMPP,代码行数:20,代码来源:__init__.py

示例4: load_components

def load_components():
    register_plugin(update_service)
开发者ID:rerobins,项目名称:rho_move_bot,代码行数:2,代码来源:__init__.py

示例5: register_plugin

from sleekxmpp.plugins.base import register_plugin
from sleekxmpp.plugins.xep_0122.stanza import FormValidation
from sleekxmpp.plugins.xep_0122.data_validation import XEP_0122


register_plugin(XEP_0122)


# Retain some backwards compatibility
xep_0122 = XEP_0122
开发者ID:mendix,项目名称:SleekXMPP,代码行数:10,代码来源:__init__.py

示例6: time

        method to set the defaults expected by PEP.

        Arguments:
            stanza   -- The PEP update stanza to publish.
            node     -- The node to publish the item to. If not specified,
                        the stanza's namespace will be used.
            id       -- Optionally specify the ID of the item.
            options  -- A form of publish options.
            ifrom    -- Specify the sender's JID.
            block    -- Specify if the send call will block until a response
                        is received, or a timeout occurs. Defaults to True.
            timeout  -- The length of time (in seconds) to wait for a response
                        before exiting the send call if blocking is used.
                        Defaults to sleekxmpp.xmlstream.RESPONSE_TIMEOUT
            callback -- Optional reference to a stream handler function. Will
                        be executed when a reply stanza is received.
        """
        if node is None:
            node = stanza.namespace

        return self.xmpp['xep_0060'].publish(ifrom, node,
                payload=stanza.xml,
                options=options,
                ifrom=ifrom,
                block=block,
                callback=callback,
                timeout=timeout)


register_plugin(XEP_0163)
开发者ID:PADGETS-EU,项目名称:padgets-repo,代码行数:30,代码来源:xep_0163.py

示例7: Copyright

"""
    SleekXMPP: The Sleek XMPP Library
    Copyright (C) 2013 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of SleekXMPP.

    See the file LICENSE for copying permission.
"""

from sleekxmpp.plugins.base import register_plugin

from sleekxmpp.plugins.xep_0079.stanza import (
    AMP,
    Rule,
    InvalidRules,
    UnsupportedConditions,
    UnsupportedActions,
    FailedRules,
    FailedRule,
    AMPFeature,
)
from sleekxmpp.plugins.xep_0079.amp import XEP_0079


register_plugin(XEP_0079)
开发者ID:NickBMetaswitch,项目名称:SleekXMPP,代码行数:24,代码来源:__init__.py

示例8: Copyright

"""
    SleekXMPP: The Sleek XMPP Library
    Copyright (C) 2011  Nathanael C. Fritz
    This file is part of SleekXMPP.

    See the file LICENSE for copying permission.
"""

from sleekxmpp.plugins.base import register_plugin

from sleekxmpp.features.feature_starttls.starttls import FeatureSTARTTLS
from sleekxmpp.features.feature_starttls.stanza import *


register_plugin(FeatureSTARTTLS)


# Retain some backwards compatibility
feature_starttls = FeatureSTARTTLS
开发者ID:2M1R,项目名称:SleekXMPP,代码行数:19,代码来源:__init__.py

示例9: get_cm_displayed

            parent=self.parent()
            xml=ET.Element("{%s}displayed"%self.namespace)
            xml.attrib['id']=value
            parent.append(xml)
    def get_cm_displayed(self):
        parent=self.parent()
        xml=parent.find("{%s}displayed"%self.namespace)
        if xml is not None:
            return xml.attrib.get('id','')
        return ''
    def del_cm_displayed(self):
        self.parent()._del_sub("{%s}displayed"%self.namespace)
        
    

class XEP_0333(BasePlugin):
    
    """
    XEP-0333 Chat Markers
    """
    
    name  = 'xep_0333'
    description = 'XEP-0333: Chat Markers'
    dependencies = set(['xep_0030'])
    def plugin_init(self):
        register_stanza_plugin(Message,Markable)
        register_stanza_plugin(Message,Displayed)
        register_stanza_plugin(Message,Received)
        
register_plugin(XEP_0333)
开发者ID:Christian-X,项目名称:geocaching,代码行数:30,代码来源:xep_0333.py

示例10: D

class D(BasePlugin):
    name = 'd'
    dependencies = set(['c'])


class E(BasePlugin):
    name = 'e'
    dependencies = set(['a', 'd'])

class F(BasePlugin):
    name = 'f'
    dependencies = set(['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 = []
开发者ID:2M1R,项目名称:SleekXMPP,代码行数:30,代码来源:test_plugins.py

示例11: time

        method to set the defaults expected by PEP.

        Arguments:
            node     -- The node to retrieve content from.
            id       -- Optionally specify the ID of the item.
            item_ids -- Specify a group of IDs. If id is also specified, it
                        will be included in item_ids.
            ifrom    -- Specify the sender's JID.
            block    -- Specify if the send call will block until a response
                        is received, or a timeout occurs. Defaults to True.
            timeout  -- The length of time (in seconds) to wait for a response
                        before exiting the send call if blocking is used.
                        Defaults to sleekxmpp.xmlstream.RESPONSE_TIMEOUT
            callback -- Optional reference to a stream handler function. Will
                        be executed when a reply stanza is received.
        """
        if item_ids is None:
            item_ids = []
        if id is not None:
            item_ids.append(id)

        return self.xmpp['xep_0060'].get_items(None, node,
                item_ids=item_ids,
                ifrom=ifrom,
                block=block,
                callback=callback,
                timeout=timeout)


register_plugin(XEP_0222)
开发者ID:ekini,项目名称:SleekXMPP,代码行数:30,代码来源:xep_0222.py

示例12: Copyright

"""
    SleekXMPP: The Sleek XMPP Library
    Copyright (C) 2016 Nathanael C. Fritz, Lance J.T. Stout
    This file is part of SleekXMPP.

    See the file LICENSE for copying permission.
"""

from sleekxmpp.plugins.base import register_plugin

from sleekxmpp.plugins.xep_0352.stanza import Active, Inactive, ClientStateIndication
from sleekxmpp.plugins.xep_0352.csi import XEP_0352


register_plugin(XEP_0352)
开发者ID:mendix,项目名称:SleekXMPP,代码行数:15,代码来源:__init__.py


注:本文中的sleekxmpp.plugins.base.register_plugin函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。