Changeset 149:83ba20efd1de for wokkel
- Timestamp:
- Aug 12, 2011, 4:12:54 PM (11 years ago)
- Branch:
- wokkel-muc-client-support-24
- Location:
- wokkel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
wokkel/iwokkel.py
r148 r149 825 825 826 826 827 def join(server, room, nick): 828 """ 829 Join a multi-user chat room. 830 831 @param server: The server the room is on. 832 @type server: C{str} 833 834 @param room: The room name. 835 @type room: C{str} 836 837 @param nick: The nick name you want when you join the room. 838 @type nick: C{str} 839 840 """ 841 842 843 def leave(room_jid): 844 """ 845 Leave a multi-user chat room. 846 847 @param room_jid: The room you want the configuration form from. 848 @type room_jid: L{jid.JID} 849 850 """ 827 def join(service, roomIdentifier, nick, history=None): 828 """ 829 Join a MUC room by sending presence to it. 830 831 @param server: The server where the room is located. 832 @type server: C{unicode} 833 834 @param room: The room name the entity is joining. 835 @type room: C{unicode} 836 837 @param nick: The nick name for the entitity joining the room. 838 @type nick: C{unicode} 839 840 @param history: The maximum number of history stanzas you would like. 841 842 @return: A deferred that fires when the entity is in the room or an 843 error has occurred. 844 """ 845 846 847 def nick(roomJID, nick): 848 """ 849 Change an entity's nick name in a MUC room. 850 851 See: http://xmpp.org/extensions/xep-0045.html#changenick 852 853 @param roomJID: The JID of the room, i.e. without a resource. 854 @type roomJID: L{jid.JID} 855 856 @param nick: The new nick name within the room. 857 @type nick: C{unicode} 858 """ 859 860 861 def leave(roomJID): 862 """ 863 Leave a MUC room. 864 865 See: http://xmpp.org/extensions/xep-0045.html#exit 866 867 @param roomJID: The Room JID of the room to leave. 868 @type roomJID: L{jid.JID} 869 """ 870 851 871 852 872 def userJoinedRoom(room, user): 853 """User has joined the room. 873 """ 874 User has joined a MUC room. 875 876 This method will need to be modified inorder for clients to 877 do something when this event occurs. 854 878 855 879 @param room: The room the user joined. … … 858 882 @param user: The user that joined the room. 859 883 @type user: L{muc.User} 860 861 """ 862 863 864 def groupChat(to, message, children=None): 865 """Send a groupchat message to a room. 866 867 """ 868 869 870 def chat(to, message, children=None): 871 """ 872 873 """ 874 875 876 def password(to, password): 877 """ 878 """ 879 880 def register(to, fields=[]): 881 """ 882 """ 883 884 885 def subject(to, subject): 886 """ 887 """ 888 889 def voice(to): 890 """ 891 """ 892 893 894 def history(to, message_list): 895 """ 896 """ 897 898 def ban(to, ban_jid, frm, reason=None): 899 """ 900 """ 901 902 903 def kick(to, kick_jid, frm, reason=None): 904 """ 905 """ 884 """ 885 886 887 def groupChat(roomJID, body, children=None): 888 """ 889 Send a groupchat message. 890 """ 891 892 893 def chat(occupantJID, body, children=None): 894 """ 895 Send a private chat message to a user in a MUC room. 896 897 See: http://xmpp.org/extensions/xep-0045.html#privatemessage 898 899 @param occupantJID: The Room JID of the other user. 900 @type occupantJID: L{jid.JID} 901 """ 902 903 904 def password(roomJID, password): 905 """ 906 Send a password to a room so the entity can join. 907 908 See: http://xmpp.org/extensions/xep-0045.html#enter-pw 909 910 @param roomJID: The bare JID of the room. 911 @type roomJID: L{jid.JID} 912 913 @param password: The MUC room password. 914 @type password: C{unicode} 915 """ 916 917 918 def register(roomJID, fields=[]): 919 """ 920 Send a request to register for a room. 921 922 @param roomJID: The bare JID of the room. 923 @type roomJID: L{jid.JID} 924 925 @param fields: The fields you need to register. 926 @type fields: L{list} of L{dataform.Field} 927 """ 928 929 930 931 def subject(roomJID, subject): 932 """ 933 Change the subject of a MUC room. 934 935 See: http://xmpp.org/extensions/xep-0045.html#subject-mod 936 937 @param roomJID: The bare JID of the room. 938 @type roomJID: L{jid.JID} 939 940 @param subject: The subject you want to set. 941 @type subject: C{unicode} 942 """ 943 944 945 def voice(roomJID): 946 """ 947 Request voice for a moderated room. 948 949 @param roomJID: The room jabber/xmpp entity id. 950 @type roomJID: L{jid.JID} 951 """ 952 953 954 def history(roomJID, messages): 955 """ 956 Send history to create a MUC based on a one on one chat. 957 958 See: http://xmpp.org/extensions/xep-0045.html#continue 959 960 @param roomJID: The room jabber/xmpp entity id. 961 @type roomJID: L{jid.JID} 962 963 @param messages: The history to send to the room as an ordered list of 964 message, represented by a dictionary with the keys 965 C{'stanza'}, holding the original stanza a 966 L{domish.Element}, and C{'timestamp'} with the 967 timestamp. 968 @type messages: L{list} of L{domish.Element} 969 """ 970 971 972 def ban(roomJID, entity, reason=None, sender=None): 973 """ 974 Ban a user from a MUC room. 975 976 @param roomJID: The bare JID of the room. 977 @type roomJID: L{jid.JID} 978 979 @param entity: The bare JID of the entity to be banned. 980 @type entity: L{jid.JID} 981 982 @param reason: The reason for banning the entity. 983 @type reason: C{unicode} 984 985 @param sender: The entity sending the request. 986 @type sender: L{jid.JID} 987 """ 988 989 990 def kick(roomJID, entityOrNick, reason=None, sender=None): 991 """ 992 Kick a user from a MUC room. 993 994 @param roomJID: The bare JID of the room. 995 @type roomJID: L{jid.JID} 996 997 @param entityOrNick: The occupant to be banned. 998 @type entityOrNick: L{jid.JID} or C{unicode} 999 1000 @param reason: The reason given for the kick. 1001 @type reason: C{unicode} 1002 1003 @param sender: The entity sending the request. 1004 @type sender: L{jid.JID} 1005 """ -
wokkel/muc.py
r148 r149 1403 1403 def grantModerator(self, roomJID, nick, reason=None, sender=None): 1404 1404 """ 1405 Grant moderator privile dges to a MUC room.1405 Grant moderator privileges to a MUC room. 1406 1406 1407 1407 @param roomJID: The bare JID of the room. … … 1428 1428 @type roomJID: L{jid.JID} 1429 1429 1430 @param entity: The room jabber/xmpp entity id.1430 @param entity: The bare JID of the entity to be banned. 1431 1431 @type entity: L{jid.JID} 1432 1432
Note: See TracChangeset
for help on using the changeset viewer.