Ignore:
Timestamp:
Oct 7, 2008, 11:47:13 PM (14 years ago)
Author:
Christopher Zorn <tofu@…>
Branch:
wokkel-muc-client-support-24
Convert:
svn:b33ecbfc-034c-dc11-8662-000475d9059e/branches/wokkel-muc-client-support-24@83
Message:

some documentation and additions to the interface, also some more abstraction and tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/iwokkel.py

    r107 r113  
    516516    """
    517517    Multi-User Chat Client
    518     """
    519 
     518
     519    A client interface to XEP-045 : http://xmpp.org/extensions/xep-0045.html
     520
     521    """
     522
     523    def receivedSubject(room, subject):
     524        """
     525        A subject is received when you join a room and when the subject is changed. This
     526        method is triggered by one of those two events.
     527
     528        @param room: The room the subject was accepted for.
     529        @type room: L{muc.Room}
     530
     531        @param subject: The subject of the given room.
     532        @type subject: C{unicode}
     533        """
     534
     535
     536    def receivedHistory(room, user, message, history, frm=None):
     537        """
     538        Past messages from a chat room has been received. This occurs when you join a room.
     539
     540
     541        """
     542
     543   
     544    def disco(entity, type='info'):
     545        """Send disco queries to a XMPP entity
     546
     547        @param entity: A XMPP entity to send the disco request to.
     548        @type entity: C{unicode}
     549
     550        @param type: Optional argument to determine the type of discovery being done.
     551        @type type: C{str}
     552
     553        """
     554
     555       
     556
     557    def configure(room_jid, fields=[]):
     558        """Configure a room. When a user has administration privledges they can configure
     559        a room.
     560
     561        @param room_jid: A XMPP entity for the room.
     562        @type room_jid: L{jid.JID}
     563
     564        @param fields: A list of fields to change or add to the room's configuration.
     565        @type fields: C{list}
     566
     567        """
     568
     569    def getConfigureForm(room_jid):
     570        """
     571        In order to know the fields to change in a room you will need to get the form.
     572       
     573        @param room_jid: The room you want the configuration form from.
     574        @type room_jid: L{jid.JID}
     575
     576        """
     577
     578    def join(server, room, nick):
     579        """
     580        Join a multi-user chat room.
     581
     582        @param server: The server the room is on.
     583        @type server: C{str}
     584
     585        @param room: The room name.
     586        @type room: C{str}
     587       
     588        @param nick: The nick name you want when you join the room.
     589        @type nick: C{str}
     590
     591        """
     592
     593
     594    def leave(room_jid):
     595        """
     596        Leave a multi-user chat room.
     597
     598        @param room_jid: The room you want the configuration form from.
     599        @type room_jid: L{jid.JID}
     600
     601        """
     602
     603    def userJoinedRoom(room, user):
     604        """User has joined the room.
     605
     606        @param room: The room the user joined.
     607        @type  room: L{muc.Room}
     608
     609        @param user: The user that joined the room.
     610        @type  user: L{muc.User}
     611
     612        """
     613   
     614
     615    def groupChat(to, message, children=None):
     616        """Send a groupchat message to a room.
     617
     618        """
     619
     620
     621    def chat(to, message, children=None):
     622        """
     623
     624        """
     625
     626
     627    def password(to, password):
     628        """
     629        """
     630   
     631    def register(to, fields=[]):
     632        """
     633        """
     634
     635
     636    def subject(to, subject):
     637        """
     638        """
     639
     640    def voice(to):
     641        """
     642        """
     643
     644
     645    def history(to, message_list):
     646        """
     647        """
     648
     649    def ban(to, ban_jid, frm, reason=None):
     650        """
     651        """
     652
     653
     654    def kick(to, kick_jid, frm, reason=None):
     655        """
     656        """
     657
Note: See TracChangeset for help on using the changeset viewer.