xmpp muc room

Jabber用户准备进入一个房间(Multi-User Chat)
用户新建房间
被邀请者接受邀请, 加入房间, 并接收出席信息和历史
Jabber用户新建一个房间并声明对多用户聊天的支持
Join动作: 结果节
 Invite动作: 结果节(s)
SEND: 
<presence to="blued@conference.10-6-2-142/wanzi001">
    <x
        xmlns="http://jabber.org/protocol/muc"/>
    </presence>
服务从现有的房客发送出席信息给新的房客
服务通知所有用户有人获得所有者权限
服务发送所有权通知给所有房客
RECV: 
    <presence
        xmlns="jabber:client" to="blued559897@10-6-2-142/xmpp" from="blued@conference.10-6-2-142/wanzi001">
        <x
            xmlns="http://jabber.org/protocol/muc#user">
            <item jid="blued559897@10-6-2-142/xmpp" affiliation="owner" role="moderator"/>
        </x>
    </presence>
服务警告新房客(该房间)非匿名
 RECV: 
    <message
        xmlns="jabber:client" type="groupchat" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp">
        <body>该房间不是匿名的。</body>
        <x
            xmlns="http://jabber.org/protocol/muc#user">
            <status code="100"/>
        </x>
    </message>
所有者请求配置表单
SEND: 
    <iq type="get" to="blued@conference.10-6-2-142" id="729A1280-BDF8-4DD6-A031-7C4A44D555A8">
        <query
            xmlns="http://jabber.org/protocol/muc#owner"/>
        </iq>
服务发送配置表单
服务发送配置表单给所有者
RECV: 
<iq
            xmlns="jabber:client" type="result" id="729A1280-BDF8-4DD6-A031-7C4A44D555A8" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp">
            <query
                xmlns="http://jabber.org/protocol/muc#owner">
                <x
                    xmlns="jabber:x:data" type="form">
                    <title>房间配置</title>
                    <instructions>已创建房间“blued”。要接受缺省配置,请单击“确定”按钮。或填写以下表单以完成设置:</instructions>
                    <field var="FORM_TYPE" type="hidden">
                        <value>http://jabber.org/protocol/muc#roomconfig</value>
                    </field>
                    <field var="muc#roomconfig_roomname" type="text-single" label="&#x623F;&#x95F4;&#x540D;&#x79F0;">
                        <value>blued</value>
                    </field>
                    <field var="muc#roomconfig_roomdesc" type="text-single" label="&#x63CF;&#x8FF0;">
                        <value>blued</value>
                    </field>
                    <field var="muc#roomconfig_changesubject" type="boolean" label="&#x5141;&#x8BB8;&#x5360;&#x6709;&#x8005;&#x66F4;&#x6539;&#x4E3B;&#x9898;">
                        <value>0</value>
                    </field>
                    <field var="muc#roomconfig_maxusers" type="list-single" label="&#x6700;&#x5927;&#x623F;&#x95F4;&#x5360;&#x6709;&#x8005;&#x4EBA;&#x6570;">
                        <option label="10">
                            <value>10</value>
                        </option>
                        <option label="20">
                            <value>20</value>
                        </option>
                        <option label="30">
                            <value>30</value>
                        </option>
                        <option label="40">
                            <value>40</value>
                        </option>
                        <option label="50">
                            <value>50</value>
                        </option>
                        <option label="&#x65E0;">
                            <value>0</value>
                        </option>
                        <value>50</value>
                    </field>
                    <field var="muc#roomconfig_presencebroadcast" type="list-multi" label="&#x5176; Presence &#x662F; Broadcast &#x7684;&#x89D2;&#x8272;">
                        <option label="&#x4E3B;&#x6301;&#x8005;">
                            <value>moderator</value>
                        </option>
                        <option label="&#x53C2;&#x4E0E;&#x8005;">
                            <value>participant</value>
                        </option>
                        <option label="&#x8BBF;&#x5BA2;">
                            <value>visitor</value>
                        </option>
                        <value>moderator</value>
                        <value>participant</value>
                        <value>visitor</value>
                    </field>
                    <field var="muc#roomconfig_publicroom" type="boolean" label="&#x5217;&#x51FA;&#x76EE;&#x5F55;&#x4E2D;&#x7684;&#x623F;&#x95F4;">
                        <value>1</value>
                    </field>
                    <field var="muc#roomconfig_persistentroom" type="boolean" label="&#x623F;&#x95F4;&#x662F;&#x6301;&#x4E45;&#x7684;">
                        <value>1</value>
                    </field>
                    <field var="muc#roomconfig_moderatedroom" type="boolean" label="&#x623F;&#x95F4;&#x662F;&#x9002;&#x5EA6;&#x7684;">
                        <value>1</value>
                    </field>
                    <field var="muc#roomconfig_membersonly" type="boolean" label="&#x623F;&#x95F4;&#x4EC5;&#x5BF9;&#x6210;&#x5458;&#x5F00;&#x653E;">
                        <value>0</value>
                    </field>
                    <field type="fixed">
                        <value>注意:缺省情况下,只有管理员才可以在仅用于邀请的房间中发送邀请。</value>
                    </field>
                    <field var="muc#roomconfig_allowinvites" type="boolean" label="&#x5141;&#x8BB8;&#x5360;&#x6709;&#x8005;&#x9080;&#x8BF7;&#x5176;&#x4ED6;&#x4EBA;">
                        <value>0</value>
                    </field>
                    <field var="muc#roomconfig_passwordprotectedroom" type="boolean" label="&#x9700;&#x8981;&#x5BC6;&#x7801;&#x624D;&#x80FD;&#x8FDB;&#x5165;&#x623F;&#x95F4;">
                        <value>0</value>
                    </field>
                    <field type="fixed">
                        <value>如果需要密码才能进入房间,则您必须在下面指定密码。</value>
                    </field>
                    <field var="muc#roomconfig_roomsecret" type="text-private" label="&#x5BC6;&#x7801;"/>
                    <field var="muc#roomconfig_whois" type="list-single" label="&#x80FD;&#x591F;&#x53D1;&#x73B0;&#x5360;&#x6709;&#x8005;&#x771F;&#x5B9E; JID &#x7684;&#x89D2;&#x8272;">
                        <option label="&#x4E3B;&#x6301;&#x8005;">
                            <value>moderators</value>
                        </option>
                        <option label="&#x4EFB;&#x4F55;&#x4EBA;">
                            <value>anyone</value>
                        </option>
                        <value>anyone</value>
                    </field>
                    <field var="muc#roomconfig_enablelogging" type="boolean" label="&#x767B;&#x5F55;&#x623F;&#x95F4;&#x5BF9;&#x8BDD;">
                        <value>1</value>
                    </field>
                    <field var="x-muc#roomconfig_reservednick" type="boolean" label="&#x4EC5;&#x5141;&#x8BB8;&#x6CE8;&#x518C;&#x7684;&#x6635;&#x79F0;&#x767B;&#x5F55;">
                        <value>1</value>
                    </field>
                    <field var="x-muc#roomconfig_canchangenick" type="boolean" label="&#x5141;&#x8BB8;&#x4F7F;&#x7528;&#x8005;&#x4FEE;&#x6539;&#x6635;&#x79F0;">
                        <value>1</value>
                    </field>
                    <field type="fixed">
                        <value>允许用户注册房间</value>
                    </field>
                    <field var="x-muc#roomconfig_registration" type="boolean" label="&#x5141;&#x8BB8;&#x7528;&#x6237;&#x6CE8;&#x518C;&#x623F;&#x95F4;">
                        <value>1</value>
                    </field>
                    <field type="fixed">
                        <value>您可以指定该房间的管理员。请在每行提供一个 JID。</value>
                    </field>
                    <field var="muc#roomconfig_roomadmins" type="jid-multi" label="&#x623F;&#x95F4;&#x7BA1;&#x7406;&#x5458;"/>
                    <field type="fixed">
                        <value>您可以指定该房间的其他拥有者。请在每行提供一个 JID。</value>
                    </field>
                    <field var="muc#roomconfig_roomowners" type="jid-multi" label="&#x623F;&#x95F4;&#x62E5;&#x6709;&#x8005;">
                        <value>blued559897@10-6-2-142</value>
                    </field>
                </x>
            </query>
        </iq>
管理员请求黑名单
 SEND: 
  <iq type="get" to="blued@conference.10-6-2-142" id="2B498D88-1B1D-46AA-8513-DFB049839916">
            <query
                xmlns="http://jabber.org/protocol/muc#admin">
                <item affiliation="outcast"/>
            </query>
        </iq>


 管理员请求成员列表
SEND: 
<iq type="get" to="blued@conference.10-6-2-142" id="25C70C79-A20C-4D51-9312-0238706AF4F1">
            <query
                xmlns="http://jabber.org/protocol/muc#admin">
                <item affiliation="member"/>
            </query>
        </iq>
管理员请求主持人列表
SEND: 
<iq type="get" to="blued@conference.10-6-2-142" id="D1294CFB-FA27-4682-9492-C7052CC62B4F">
            <query
                xmlns="http://jabber.org/protocol/muc#admin">
                <item role="moderator"/>
            </query>
        </iq>
所有者请求即时房间
所有者提交配置表单
所有者取消初始的配置
所有者取消随后的配置
 SEND: 
<iq type="set" to="blued@conference.10-6-2-142" id="4A7ED459-A3F9-43A6-A5D8-D9D3762E6680">
            <query
                xmlns="http://jabber.org/protocol/muc#owner">
                <x
                    xmlns="jabber:x:data" type="submit"/>
                </query>
            </iq>


服务发送成员列表给管理员
 RECV: 
<iq
                xmlns="jabber:client" type="result" id="2B498D88-1B1D-46AA-8513-DFB049839916" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp">
                <query
                    xmlns="http://jabber.org/protocol/muc#admin"/>
                </iq>


服务发送主持人列表给管理员RECV: 
<iq
                    xmlns="jabber:client" type="result" id="25C70C79-A20C-4D51-9312-0238706AF4F1" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp">
                    <query
                        xmlns="http://jabber.org/protocol/muc#admin"/>
                    </iq>
服务发送发言权列表给主持人
服务发送黑名单给管理员
服务发送所有者列表给所有者
服务发送管理员列表给所有者
RECV: 
<iq
                        xmlns="jabber:client" type="result" id="4A7ED459-A3F9-43A6-A5D8-D9D3762E6680" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp"/>


2013-08-23 21:37:56:601 Blued_V2[6457:6ab] MUCViewController: xmppRoom:didConfigure:
2013-08-23 21:37:56.601 Blued_V2[6457:7717] 
<iq
                            xmlns="jabber:client" type="result" id="D1294CFB-FA27-4682-9492-C7052CC62B4F" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp">
                            <query
                                xmlns="http://jabber.org/protocol/muc#admin">
                                <item role="moderator" jid="blued559897@10-6-2-142/xmpp" nick="wanzi001" affiliation="owner"/>
                            </query>
                        </iq>
                        <iq
                            xmlns="jabber:client" type="result" id="4A7ED459-A3F9-43A6-A5D8-D9D3762E6680" from="blued@conference.10-6-2-142" to="blued559897@10-6-2-142/xmpp"/>
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值