예제 #1
0
        public void OwnerModifyAffiliations(Jid to, Jid from, string node, Affiliate[] affiliates, IqCB cb,
                                            object cbArgs)
        {
            var pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            var affs = new 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 OwnerModifySubscriptionStates(Jid to, Jid from, string node, Subscriber[] subscribers, IqCB cb,
                                                  object cbArgs)
        {
            var pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            var subs = new Subscribers(node);

            subs.AddSubscribers(subscribers);

            pubsubIq.PubSub.Subscribers = subs;

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
예제 #3
0
        public void RequestNodeConfiguration(Jid to, string node, IqCB cb, object cbArgs)
        {
            var pubsubIq = new owner.PubSubIq(IqType.get, to);

            pubsubIq.PubSub.Configure = new owner.Configure(node);

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
예제 #4
0
        public void DeleteNode(Jid to, Jid from, string node, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

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

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb);
            }
        }
예제 #5
0
        public void OwnerRequestSubscribers(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);

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

            pubsubIq.PubSub.Subscribers = new agsXMPP.protocol.extensions.pubsub.owner.Subscribers(node);

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
예제 #6
0
        public void OwnerRequestAffiliations(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);

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

            pubsubIq.PubSub.Affiliates = new owner.Affiliates(node);

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
예제 #7
0
        public void PurgeNode(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            pubsubIq.PubSub.Purge = new owner.Purge(node);

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
            }
        }
예제 #8
0
        public void OwnerModifyAffiliations(Jid to, Jid from, string node, owner.Affiliate[] affiliates, IqHandler cb)
        {
            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);
            }
        }
예제 #9
0
        public void OwnerModifyAffiliation(Jid to, Jid from, string node, Jid affiliate, AffiliationType affiliation, IqCB cb, object cbArgs)
        {
            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, cbArgs);
            }
        }
예제 #10
0
        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, owner.Subscriber[] subscribers, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            owner.Subscribers subs = new owner.Subscribers(node);
            subs.AddSubscribers(subscribers);

            pubsubIq.PubSub.Subscribers = subs;

            if (cb == null)
            {
                m_connection.Send(pubsubIq);
            }
            else
            {
                m_connection.IqGrabber.SendIq(pubsubIq, cb);
            }
        }
예제 #11
0
        public void OwnerRequestAffiliations(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);

            if (from != null)
                pubsubIq.From = from;
            
            pubsubIq.PubSub.Affiliates = new owner.Affiliates(node);

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
예제 #12
0
        public void OwnerModifySubscriptionStates(Jid to, Jid from, string node, owner.Subscriber[] subscribers, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            owner.Subscribers subs = new owner.Subscribers(node);
            subs.AddSubscribers(subscribers);

            pubsubIq.PubSub.Subscribers = subs;

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
예제 #13
0
        public void OwnerRequestSubscribers(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.get, to);

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

            pubsubIq.PubSub.Subscribers = new agsXMPP.protocol.extensions.pubsub.owner.Subscribers(node);

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
예제 #14
0
        public void PurgeNode(Jid to, Jid from, string node, IqCB cb, object cbArgs)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            pubsubIq.PubSub.Purge = new owner.Purge(node);

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
예제 #15
0
        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);
        }
예제 #16
0
        public void RequestNodeConfiguration(Jid to, string node, IqCB cb, object cbArgs)
        {
            var pubsubIq = new owner.PubSubIq(IqType.get, to);
            pubsubIq.PubSub.Configure = new owner.Configure(node);

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb, cbArgs);
        }
예제 #17
0
        public void OwnerModifySubscriptionState(Jid to, Jid from, string node, Jid subscriber, SubscriptionState state, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

            owner.Subscribers subs = new owner.Subscribers(node);
            subs.AddSubscriber(new owner.Subscriber(subscriber, state));

            pubsubIq.PubSub.Subscribers = subs;

            if (cb == null)
                m_connection.Send(pubsubIq);
            else
                m_connection.IqGrabber.SendIq(pubsubIq, cb);
        }
예제 #18
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);
        }
예제 #19
0
        public void DeleteNode(Jid to, Jid from, string node, IqHandler cb)
        {
            owner.PubSubIq pubsubIq = new owner.PubSubIq(IqType.set, to);

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

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

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