Ignore:
Timestamp:
Jan 8, 2012, 9:26:02 AM (9 years ago)
Author:
Ralph Meijer <ralphm@…>
Branch:
default
Message:

Use symbolic constants instead of integers MUC status code.

Instead of using normal constant values for representing MUC status codes,
UserPresence now uses twisted.python.constants to define these. This
makes code better to understand and helps debugging.

If a user presence includes one or more status codes, they are stored in the
mucStatuses attribute, as an instance of Statuses. This replaces the
former statusCodes attribute.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wokkel/iwokkel.py

    r158 r160  
    806806class IMUCClient(Interface):
    807807    """
    808     Multi-User Chat Client
     808    Multi-User Chat Client.
    809809
    810810    A client interface to XEP-045 : http://xmpp.org/extensions/xep-0045.html
    811 
    812811    """
    813812
     
    10281027        @type sender: L{jid.JID}
    10291028        """
     1029
     1030
     1031class IMUCStatuses(Interface):
     1032    """
     1033    Interface for a container of Multi-User Chat status conditions.
     1034    """
     1035
     1036    def __contains__(key):
     1037        """
     1038        Return if a status exists in the container.
     1039        """
     1040
     1041
     1042    def __iter__():
     1043        """
     1044        Return an iterator over the status codes.
     1045        """
     1046
     1047
     1048    def __len__():
     1049        """
     1050        Return the number of status conditions.
     1051        """
Note: See TracChangeset for help on using the changeset viewer.