Ignore:
Timestamp:
Aug 12, 2011, 3:57:20 PM (11 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
wokkel-muc-client-support-24
Message:

Redo room configuration.

  • The underlying request object now derives from generic.Request.
  • MUCClient.getConfiguration now returns a wokkel.data_form.Form.
  • MUCClient.configure now takes a simple dictionary of values.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/iwokkel.py

    r141 r148  
    798798
    799799
    800     def configure(room_jid, fields=[]):
    801         """Configure a room. When a user has administration privledges they can configure
    802         a room.
    803 
    804         @param room_jid: A XMPP entity for the room.
    805         @type room_jid: L{jid.JID}
    806 
    807         @param fields: A list of fields to change or add to the room's configuration.
    808         @type fields: C{list}
    809 
    810         """
    811 
    812     def getConfigureForm(room_jid):
    813         """
    814         In order to know the fields to change in a room you will need to get the form.
    815        
    816         @param room_jid: The room you want the configuration form from.
    817         @type room_jid: L{jid.JID}
    818 
    819         """
     800    def configure(roomJID, options):
     801        """
     802        Configure a room.
     803
     804        @param roomJID: The room to configure.
     805        @type roomJID: L{jid.JID}
     806
     807        @param options: A mapping of field names to values, or C{None} to cancel.
     808        @type options: C{dict}
     809        """
     810
     811
     812    def getConfiguration(roomJID):
     813        """
     814        Grab the configuration from the room.
     815
     816        This sends an iq request to the room.
     817
     818        @param roomJID: The bare JID of the room.
     819        @type roomJID: L{jid.JID}
     820
     821        @return: A deferred that fires with the room's configuration form as
     822            a L{data_form.Form} or C{None} if there are no configuration
     823            options available.
     824        """
     825
    820826
    821827    def join(server, room, nick):
Note: See TracChangeset for help on using the changeset viewer.