Exemplo n.º 1
0
        private void ChangeRole(Role role, Jid room, string nickname, string reason, IqCB cb, object cbArg)
        {
            AdminIq aIq = new AdminIq();
            aIq.To = room;
            aIq.Type = IqType.set;

            XMPPProtocol.Protocol.x.muc.iq.admin.Item itm = new XMPPProtocol.Protocol.x.muc.iq.admin.Item();
            itm.Role = role;
            itm.Nickname = nickname;

            if (reason != null)
                itm.Reason = reason;

            aIq.Query.AddItem(itm);

            if (cb == null)
                m_connection.Send(aIq);
            else
                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
        }
Exemplo n.º 2
0
        public void ModifyList(Jid room, XMPPProtocol.Protocol.x.muc.iq.admin.Item[] items, IqCB cb, object cbArg)
        {
            AdminIq aIq = new AdminIq();
            aIq.To = room;
            aIq.Type = IqType.set;

            foreach (XMPPProtocol.Protocol.x.muc.iq.admin.Item itm in items)
            {
                aIq.Query.AddItem(itm);
            }

            if (cb == null)
                m_connection.Send(aIq);
            else
                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
        }
Exemplo n.º 3
0
        public void RequestList(Role role, Jid room, IqCB cb, object cbArg)
        {
            AdminIq aIq = new AdminIq();
            aIq.To = room;
            aIq.Type = IqType.get;

            aIq.Query.AddItem(new XMPPProtocol.Protocol.x.muc.iq.admin.Item(role));

            if (cb == null)
                m_connection.Send(aIq);
            else
                m_connection.IqGrabber.SendIq(aIq, cb, cbArg);
        }