Example #1
0
        public void OwnerRequestSubscribers(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            var pubsubIq = new Owner.PubSubIq(IQType.Get, to);

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

            pubsubIq.PubSub.Subscribers = new Owner.Subscribers(node);

            if (cb == null)
            {
                this.m_connection.Send(pubsubIq);
            }
            else
            {
                this.m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
Example #2
0
        public void DeleteNode(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            var pubsubIq = new Owner.PubSubIq(IQType.Set, to);

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

            pubsubIq.PubSub.Delete = new Owner.Delete(node);

            if (cb == null)
            {
                this.m_connection.Send(pubsubIq);
            }
            else
            {
                this.m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
Example #3
0
        public void OwnerModifyAffiliations(Jid to, Jid from, string node, Owner.Affiliate[] affiliates, IqCB cb, object cbArgs)
        {
            var pubsubIq = new Owner.PubSubIq(IQType.Set, to);

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

            var affs = new Owner.Affiliates(node);

            affs.AddAffiliates(affiliates);

            pubsubIq.PubSub.Affiliates = affs;

            if (cb == null)
            {
                this.m_connection.Send(pubsubIq);
            }
            else
            {
                this.m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
Example #4
0
        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, Owner.Subscriber[] subscribers, IqCB cb, object cbArgs)
        {
            var pubsubIq = new Owner.PubSubIq(IQType.Set, to);

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

            var subs = new Owner.Subscribers(node);

            subs.AddSubscribers(subscribers);

            pubsubIq.PubSub.Subscribers = subs;

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