예제 #1
0
        public XMPPClient()
        {
            StreamNegotiationLogic           = new StreamNegotiationLogic(this);
            GenericIQLogic                   = new GenericIQLogic(this);
            RosterLogic                      = new RosterLogic(this);
            PresenceLogic                    = new PresenceLogic(this);
            GenericMessageLogic              = new GenericMessageLogic(this);
            ServiceDiscoveryLogic            = new ServiceDiscoveryLogic(this);
            JingleSessionManager             = new Jingle.JingleSessionManager(this);
            StreamInitiationAndTransferLogic = new StreamInitiationAndTransferLogic(this);
            PersonalEventingLogic            = new PersonalEventingLogic(this);

            lock (LogicLock)
            {
                ActiveServices.Add(StreamNegotiationLogic); /// Handle SASL authentication
                ActiveServices.Add(GenericMessageLogic);
                ActiveServices.Add(GenericIQLogic);         /// Handle pings and other common messages
                ActiveServices.Add(RosterLogic);            /// Handles getting our roster
                ActiveServices.Add(PresenceLogic);
                ActiveServices.Add(ServiceDiscoveryLogic);
                ActiveServices.Add(JingleSessionManager);
                ActiveServices.Add(StreamInitiationAndTransferLogic);
                ActiveServices.Add(PersonalEventingLogic);
            }

            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/disco#items"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/disco#info"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("jabber:x:data"));

            // Jingle features
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:ice-udp:0")); // not sure if we want ICE, makes the simple protocol difficult
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:ice-udp:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:raw-udp:0")); // raw udp much simpler
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:raw-udp:1"));

            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:audio"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:video"));

            /// si features... not sure about these
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/si"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/si/profile/file-transfer"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/ibb"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/bytestreams"));


            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/geoloc"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/geoloc+notify"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/tune"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/tune+notify"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:avatar:data"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:avatar:metadata"));
            //this.OurServiceDiscoveryFeatureList.AddFeature(new feature(""));

            FileTransferManager = new FileTransferManager(this);
        }
예제 #2
0
        public XMPPClient()
        {
            StreamNegotiationLogic = new StreamNegotiationLogic(this);
            GenericIQLogic = new GenericIQLogic(this);
            RosterLogic = new RosterLogic(this);
            PresenceLogic = new PresenceLogic(this);
            GenericMessageLogic = new GenericMessageLogic(this);
            ServiceDiscoveryLogic = new ServiceDiscoveryLogic(this);
            JingleSessionManager = new Jingle.JingleSessionManager(this);
            StreamInitiationAndTransferLogic = new StreamInitiationAndTransferLogic(this);
            PersonalEventingLogic = new PersonalEventingLogic(this);

            lock (LogicLock)
            {
                ActiveServices.Add(StreamNegotiationLogic); /// Handle SASL authentication
                ActiveServices.Add(GenericMessageLogic);
                ActiveServices.Add(GenericIQLogic); /// Handle pings and other common messages
                ActiveServices.Add(RosterLogic); /// Handles getting our roster
                ActiveServices.Add(PresenceLogic);
                ActiveServices.Add(ServiceDiscoveryLogic);
                ActiveServices.Add(JingleSessionManager);
                ActiveServices.Add(StreamInitiationAndTransferLogic);
                ActiveServices.Add(PersonalEventingLogic);
            }

            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/disco#items"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/disco#info"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("jabber:x:data"));

            // Jingle features
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:ice-udp:0")); // not sure if we want ICE, makes the simple protocol difficult
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:ice-udp:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:raw-udp:0")); // raw udp much simpler
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:transports:raw-udp:1"));

            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:1"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:audio"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:jingle:apps:rtp:video"));

            /// si features... not sure about these
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/si"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/si/profile/file-transfer"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/ibb"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/bytestreams"));

            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/geoloc"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/geoloc+notify"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/tune"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("http://jabber.org/protocol/tune+notify"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:avatar:data"));
            this.OurServiceDiscoveryFeatureList.AddFeature(new feature("urn:xmpp:avatar:metadata"));
            //this.OurServiceDiscoveryFeatureList.AddFeature(new feature(""));

            FileTransferManager = new FileTransferManager(this);
        }