# Path: pyxmpp/all.py



import sys
import logging
import pyxmpp.jabberd.all
from pyxmpp.all import JID,Iq,Presence,Message,StreamError,FeatureNotImplementedProtocolError
        p=Presence(
            stanza_type=stanza.get_type(),
            to_jid=stanza.get_from(),
            from_jid=stanza.get_to(),
            show=stanza.get_show(),
            status=stanza.get_status()
            );
        self.stream.send(p)
        return True

    def presence_control(self,stanza):
        """Handle subscription control <presence/> stanzas -- acknowledge
        them."""
        p=stanza.make_accept_response()
        self.stream.send(p)
        return True

# PyXMPP uses `logging` module for its debug output
# applications should set it up as needed
logger=logging.getLogger()
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)

if len(sys.argv)<5:
    print "Usage:"
    print "\t%s name secret server port" % (sys.argv[0],)
    print "example:"
    print "\t%s echo.localhost verysecret localhost 5347" % (sys.argv[0],)
    sys.exit(1)


# Path: pyxmpp/all.py



# Path: examples/echocomponent.py
import sys
import logging
import pyxmpp.jabberd.all
from pyxmpp.all import JID,Iq,Presence,Message,StreamError,FeatureNotImplementedProtocolError

        p=Presence(
            stanza_type=stanza.get_type(),
            to_jid=stanza.get_from(),
            from_jid=stanza.get_to(),
            show=stanza.get_show(),
            status=stanza.get_status()
            );
        self.stream.send(p)
        return True

    def presence_control(self,stanza):
        """Handle subscription control <presence/> stanzas -- acknowledge
        them."""
        p=stanza.make_accept_response()
        self.stream.send(p)
        return True

# PyXMPP uses `logging` module for its debug output
# applications should set it up as needed
logger=logging.getLogger()
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.DEBUG)

if len(sys.argv)<5:
    print "Usage:"
    print "\t%s name secret server port" % (sys.argv[0],)
    print "example:"
    print "\t%s echo.localhost verysecret localhost 5347" % (sys.argv[0],)
    sys.exit(1)


print "creating component..."