Ignore:
Location:
wokkel
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • wokkel/disco.py

    r49 r128  
    409409
    410410
     411class DiscoRequest(xmlstream.IQ):
     412    """
     413    Disco request.
     414
     415    @ivar namespace: Request namespace.
     416    @type namespace: C{str}
     417    @ivar method: Type attribute of the IQ request. Either C{'set'} or C{'get'}
     418    @type method: C{str}
     419    """
     420
     421    def __init__(self, xs, namespace=NS, method='get'):
     422        xmlstream.IQ.__init__(self, xs, method)
     423        self.addElement((namespace, 'query'))
     424
     425
     426
    411427class DiscoHandler(XMPPHandler, IQHandlerMixin):
    412428    """
  • wokkel/iwokkel.py

    r59 r128  
    768768        @rtype: L{defer.Deferred}
    769769        """
     770
     771
     772
     773class IMUCClient(Interface):
     774    """
     775    Multi-User Chat Client
     776
     777    A client interface to XEP-045 : http://xmpp.org/extensions/xep-0045.html
     778
     779    """
     780
     781    def receivedSubject(room, subject):
     782        """
     783        A subject is received when you join a room and when the subject is changed. This
     784        method is triggered by one of those two events.
     785
     786        @param room: The room the subject was accepted for.
     787        @type room: L{muc.Room}
     788
     789        @param subject: The subject of the given room.
     790        @type subject: C{unicode}
     791        """
     792
     793
     794    def receivedHistory(room, user, message, history, frm=None):
     795        """
     796        Past messages from a chat room has been received. This occurs when you join a room.
     797
     798
     799        """
     800
     801   
     802    def disco(entity, type='info'):
     803        """Send disco queries to a XMPP entity
     804
     805        @param entity: A XMPP entity to send the disco request to.
     806        @type entity: C{unicode}
     807
     808        @param type: Optional argument to determine the type of discovery being done.
     809        @type type: C{str}
     810
     811        """
     812
     813       
     814
     815    def configure(room_jid, fields=[]):
     816        """Configure a room. When a user has administration privledges they can configure
     817        a room.
     818
     819        @param room_jid: A XMPP entity for the room.
     820        @type room_jid: L{jid.JID}
     821
     822        @param fields: A list of fields to change or add to the room's configuration.
     823        @type fields: C{list}
     824
     825        """
     826
     827    def getConfigureForm(room_jid):
     828        """
     829        In order to know the fields to change in a room you will need to get the form.
     830       
     831        @param room_jid: The room you want the configuration form from.
     832        @type room_jid: L{jid.JID}
     833
     834        """
     835
     836    def join(server, room, nick):
     837        """
     838        Join a multi-user chat room.
     839
     840        @param server: The server the room is on.
     841        @type server: C{str}
     842
     843        @param room: The room name.
     844        @type room: C{str}
     845       
     846        @param nick: The nick name you want when you join the room.
     847        @type nick: C{str}
     848
     849        """
     850
     851
     852    def leave(room_jid):
     853        """
     854        Leave a multi-user chat room.
     855
     856        @param room_jid: The room you want the configuration form from.
     857        @type room_jid: L{jid.JID}
     858
     859        """
     860
     861    def userJoinedRoom(room, user):
     862        """User has joined the room.
     863
     864        @param room: The room the user joined.
     865        @type  room: L{muc.Room}
     866
     867        @param user: The user that joined the room.
     868        @type  user: L{muc.User}
     869
     870        """
     871   
     872
     873    def groupChat(to, message, children=None):
     874        """Send a groupchat message to a room.
     875
     876        """
     877
     878
     879    def chat(to, message, children=None):
     880        """
     881
     882        """
     883
     884
     885    def password(to, password):
     886        """
     887        """
     888   
     889    def register(to, fields=[]):
     890        """
     891        """
     892
     893
     894    def subject(to, subject):
     895        """
     896        """
     897
     898    def voice(to):
     899        """
     900        """
     901
     902
     903    def history(to, message_list):
     904        """
     905        """
     906
     907    def ban(to, ban_jid, frm, reason=None):
     908        """
     909        """
     910
     911
     912    def kick(to, kick_jid, frm, reason=None):
     913        """
     914        """
Note: See TracChangeset for help on using the changeset viewer.