コード例 #1
0
ファイル: PubSubManager.cs プロジェクト: yh1094632455/agsxmpp
        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

            if (from != null)
            {
                pubsubIq.From = from;
            }

            owner.Affiliates affs = new owner.Affiliates(node);
            affs.AddAffiliates(affiliates);

            pubsubIq.PubSub.Affiliates = affs;

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
コード例 #2
0
        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

            if (from != null)
            {
                pubsubIq.From = from;
            }

            owner.Affiliates aff = new owner.Affiliates(node);
            aff.AddAffiliate(new owner.Affiliate(affiliate, affiliation));

            pubsubIq.PubSub.Affiliates = aff;

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb);
            }
        }
コード例 #3
0
ファイル: PubSubManager.cs プロジェクト: SiteView/ECC8.13
        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

            if (from != null)
                pubsubIq.From = from;

            owner.Affiliates affs = new owner.Affiliates(node);
            affs.AddAffiliates(affiliates);

            pubsubIq.PubSub.Affiliates = affs;

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
コード例 #4
0
ファイル: PubSubManager.cs プロジェクト: kimseng/agsxmpp
        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

            if (from != null)
                pubsubIq.From = from;

            owner.Affiliates aff = new owner.Affiliates(node);
            aff.AddAffiliate(new owner.Affiliate(affiliate, affiliation));

            pubsubIq.PubSub.Affiliates = aff;

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