예제 #1
0
 void connection_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     if (OnAuthorizationError != null)
     {
         OnAuthorizationError();
     }
 }
예제 #2
0
 /// <summary>
 /// Suprimme la notification de ce que j'�coute
 /// </summary>
 public void clearTune()
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/tune");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element tune = new agsXMPP.Xml.Dom.Element("tune");
         tune.Namespace = "http://jabber.org/protocol/tune";
         item.AddChild(tune);
         ps.AddChild(item);
         pb.AddChild(ps);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _tune        = new Tune();
         _tune.artist = string.Empty;
         _tune.length = 0;
         _tune.rating = 1;
         _tune.source = string.Empty;
         _tune.title  = string.Empty;
         _tune.track  = 0;
         _tune.uri    = string.Empty;
     }
 }
예제 #3
0
        private void OnAuthError(object sender, agsXMPP.Xml.Dom.Element rp)
        {
            Debug.WriteLine("Auth Error" + rp);
            var message = string.Format("Authentification failed {0}!", Client.Login);

            _notificationQueue.PushToFront(new InternalClientErrorMessage(message));
            Disconnect();
        }
예제 #4
0
 /// <summary>
 /// Catch any authentication errors.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void client_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     result.ExceptionResult = new Exception(
         string.Format("XPPP Authentication Failed - Remote server response was {0}", e.InnerXml));
     result.Status = ThoughtWorks.CruiseControl.Remote.IntegrationStatus.Exception;
     hasError      = true;
     Log.Error(result.ExceptionResult);
 }
예제 #5
0
        private void addFieldInDataIQ(agsXMPP.protocol.x.data.Data data, string fieldname, string value)
        {
            Field field = new Field();

            field.Var = fieldname;
            agsXMPP.Xml.Dom.Element e = new agsXMPP.Xml.Dom.Element("value", value);
            field.AddChild(e);
            data.AddChild(field);
        }
예제 #6
0
 /// <summary>
 /// Change la lecture en cours
 /// </summary>
 /// <param name="utune">Informations sur la lecture en cours</param>
 public void setTune(Tune utune)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/tune");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element tune = new agsXMPP.Xml.Dom.Element("tune");
         tune.Namespace = "http://jabber.org/protocol/tune";
         tune.AddChild(new agsXMPP.Xml.Dom.Element("length", Convert.ToString(utune.length, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("rating", Convert.ToString(utune.rating, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("track", Convert.ToString(utune.track, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("artist", (utune.artist != null) ? utune.artist.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("source", (utune.source != null) ? utune.source.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("title", (utune.title != null) ? utune.title.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("uri", (utune.uri != null) ? utune.uri.Trim() : string.Empty));
         item.AddChild(tune);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf   = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x      = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _tune        = new Tune();
         _tune.artist = (utune.artist != null) ? utune.artist.Trim() : string.Empty;
         _tune.length = utune.length;
         _tune.rating = utune.rating;
         _tune.source = (utune.source != null) ? utune.source.Trim() : string.Empty;
         _tune.title  = (utune.title != null) ? utune.title.Trim() : string.Empty;
         _tune.track  = utune.track;
         _tune.uri    = (utune.uri != null) ? utune.uri.Trim() : string.Empty;
     }
 }
예제 #7
0
        public void CreateForm(agsXMPP.protocol.iq.search.Search search)
        {
            /*
             * Send: <iq xmlns="jabber:client" id="agsXMPP_9" type="get" to="users.jabber.org"><query xmlns="jabber:iq:search" />
             * </iq>
             *  Recv: <iq xmlns="jabber:client" to="[email protected]/SharpIM" type="result" id="agsXMPP_9" from="users.jabber.org">
             * <query xmlns="jabber:iq:search">
             * <instructions>Find a contact by entering the search criteria in the given fields. Note: Each field supports wild card searches (%)</instructions>
             * <first />
             * <last />
             * <nick />
             * <email />
             * </query></iq>
             */

            this.SuspendLayout();

            this.panelFields.SuspendLayout();
            this.panelFields.Controls.Clear();

            //lblTitle.Text = xdata.Title;
            lblInstructions.Text = search.Instructions;

            XDataControl_Resize(this, null);

            agsXMPP.Xml.Dom.ElementList list = new agsXMPP.Xml.Dom.ElementList();
            foreach (agsXMPP.Xml.Dom.Node n in search.ChildNodes)
            {
                if (n.NodeType == agsXMPP.Xml.Dom.NodeType.Element)
                {
                    list.Add(n as agsXMPP.Xml.Dom.Element);
                }
            }

            for (int i = list.Count - 1; i >= 0; i--)
            {
                agsXMPP.Xml.Dom.Element el = list.Item(i);
                if (el.TagName == "key")
                {
                    CreateField(CreateDummyHiddenField(el.TagName, el.Value), i);
                }
                else if (el.TagName == "instructions")
                {
                }
                else
                {
                    CreateField(CreateDummyTextField(el.TagName, el.TagName), i);
                }
            }

            this.panelFields.ResumeLayout();

            this.ResumeLayout();
        }
예제 #8
0
파일: Form1.cs 프로젝트: enptcvr/agsXmpp-1
 void xmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     if (InvokeRequired)
     {
         // Windows Forms are not Thread Safe, we need to invoke this :(
         // We're not in the UI thread, so we need to call BeginInvoke
         BeginInvoke(new XmppElementHandler(xmppCon_OnAuthError), new object[] { sender, e });
         return;
     }
     listEvents.Items.Add("OnAuthError");
     listEvents.SelectedIndex = listEvents.Items.Count - 1;
 }
예제 #9
0
        //void Disconnect()
        //{
        //    Util.XmppServices.XmppCon.OnLogin -= new ObjectHandler(XmppCon_OnLogin);
        //    Util.XmppServices.XmppCon.OnAuthError -= new XmppElementHandler(XmppCon_OnAuthError);
        //    Util.XmppServices.XmppCon.OnError -= new ErrorHandler(XmppCon_OnError);

        //    if (Util.XmppServices.XmppCon.XmppConnectionState != XmppConnectionState.Disconnected)
        //        Util.XmppServices.XmppCon.Close();



        //}
        void XmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
        {
            if (InvokeRequired)
            {
                BeginInvoke(new XmppElementHandler(XmppCon_OnAuthError), new object[] { sender, e });
                return;
            }


            MessageBox.Show("Error al autenticar! " + Environment.NewLine + "  password or nombre de usaurio incorrecto.",
                            "Error",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation,
                            MessageBoxDefaultButton.Button1);
        }
예제 #10
0
 /// <summary>
 /// Change son activit�
 /// </summary>
 /// <param name="type">Type de l'activit�</param>
 /// <param name="text">Description</param>
 public void setActivity(Enumerations.ActivityType type, string text)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/activity");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element activity = new agsXMPP.Xml.Dom.Element("activity");
         activity.Namespace = "http://jabber.org/protocol/activity";
         agsXMPP.Xml.Dom.Element activityType = new agsXMPP.Xml.Dom.Element(Enum.GetName(typeof(Enumerations.ActivityType), type));
         activity.AddChild(activityType);
         agsXMPP.Xml.Dom.Element activityText = new agsXMPP.Xml.Dom.Element("text");
         activityText.Value = text;
         activity.AddChild(activityText);
         item.AddChild(activity);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf   = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x      = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _activity      = new Activity();
         _activity.type = type;
         _activity.text = text;
     }
 }
예제 #11
0
        void XmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
        {
            if (InvokeRequired)
            {
                // Windows Forms are not Thread Safe, we need to invoke this :(
                // We're not in the UI thread, so we need to call BeginInvoke
                BeginInvoke(new XmppElementHandler(XmppCon_OnAuthError), new object[] { sender, e });
                return;
            }
            MessageBox.Show("Error al autenticar! " + Environment.NewLine + "  password o nombre de usurio incorrecto.",
                            "Error",
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation,
                            MessageBoxDefaultButton.Button1);

            //Disconnect();

            //if (OnAuthError != null)
            //{
            //    OnAuthError(this, new EventArgs());
            //}
        }
예제 #12
0
 void xmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     this.Log.Info("OnAuthError");
 }
예제 #13
0
 void objXmpp_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     //throw new NotImplementedException();
 }
예제 #14
0
 /// <summary>
 /// Suprimme la notification de ce que j'�coute
 /// </summary>
 public void clearTune()
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/tune");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element tune = new agsXMPP.Xml.Dom.Element("tune");
         tune.Namespace = "http://jabber.org/protocol/tune";
         item.AddChild(tune);
         ps.AddChild(item);
         pb.AddChild(ps);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _tune = new Tune();
         _tune.artist = string.Empty;
         _tune.length = 0;
         _tune.rating = 1;
         _tune.source = string.Empty;
         _tune.title = string.Empty;
         _tune.track = 0;
         _tune.uri = string.Empty;
     }
 }
예제 #15
0
 /// <summary>
 /// Change la lecture en cours
 /// </summary>
 /// <param name="utune">Informations sur la lecture en cours</param>
 public void setTune(Tune utune)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/tune");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element tune = new agsXMPP.Xml.Dom.Element("tune");
         tune.Namespace = "http://jabber.org/protocol/tune";
         tune.AddChild(new agsXMPP.Xml.Dom.Element("length", Convert.ToString(utune.length, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("rating", Convert.ToString(utune.rating, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("track", Convert.ToString(utune.track, System.Globalization.CultureInfo.InvariantCulture)));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("artist", (utune.artist != null) ? utune.artist.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("source", (utune.source != null) ? utune.source.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("title", (utune.title != null) ? utune.title.Trim() : string.Empty));
         tune.AddChild(new agsXMPP.Xml.Dom.Element("uri", (utune.uri != null) ? utune.uri.Trim() : string.Empty));
         item.AddChild(tune);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _tune = new Tune();
         _tune.artist = (utune.artist != null) ? utune.artist.Trim() : string.Empty;
         _tune.length = utune.length;
         _tune.rating = utune.rating;
         _tune.source = (utune.source != null) ? utune.source.Trim() : string.Empty;
         _tune.title = (utune.title != null) ? utune.title.Trim() : string.Empty;
         _tune.track = utune.track;
         _tune.uri = (utune.uri != null) ? utune.uri.Trim() : string.Empty;
     }
 }
예제 #16
0
 /// <summary>
 /// D�finit un nouvel emplacement g�ographique
 /// </summary>
 /// <param name="location">Informations compl�te sur l'emplacement</param>
 public void setLocation(Location location)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/geoloc");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element geoloc = new agsXMPP.Xml.Dom.Element("geoloc");
         geoloc.Namespace = "http://jabber.org/protocol/geoloc";
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("alt", Convert.ToString(location.altitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("lat", Convert.ToString(location.latitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("lon", Convert.ToString(location.longitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("bearing", Convert.ToString(location.bearing, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("error", Convert.ToString(location.error, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("speed", Convert.ToString(location.speed, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("area", (location.area != null) ? location.area.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("building", (location.building != null) ? location.building.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("country", (location.country != null) ? location.country.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("datum", (location.datum != null) ? location.datum.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("description", (location.description != null) ? location.description.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("floor", (location.floor != null) ? location.floor.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("locality", (location.locality != null) ? location.locality.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("postalcode", (location.postalcode != null) ? location.postalcode.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("region", (location.region != null) ? location.region.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("room", (location.room != null) ? location.room.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("street", (location.street != null) ? location.street.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("text", (location.text != null) ? location.text.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("timestamp", agsXMPP.util.Time.ISO_8601Date(location.timestamp)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("uri", (location.uri != null) ? location.uri.Trim() : string.Empty));
         item.AddChild(geoloc);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _location = new Location();
         _location.altitude = location.altitude;
         _location.area = (location.area != null) ? location.area.Trim() : string.Empty;
         _location.bearing = location.bearing;
         _location.building = (location.building != null) ? location.building.Trim() : string.Empty;
         _location.country = (location.country != null) ? location.country.Trim() : string.Empty;
         _location.datum = (location.datum != null) ? location.datum.Trim() : string.Empty;
         _location.description = (location.description != null) ? location.description.Trim() : string.Empty;
         _location.error = location.error;
         _location.floor = (location.floor != null) ? location.floor.Trim() : string.Empty;
         _location.latitude = location.latitude;
         _location.locality = (location.locality != null) ? location.locality.Trim() : string.Empty;
         _location.longitude = location.longitude;
         _location.postalcode = (location.postalcode != null) ? location.postalcode.Trim() : string.Empty;
         _location.region = (location.region != null) ? location.region.Trim() : string.Empty;
         _location.room = (location.room != null) ? location.room.Trim() : string.Empty;
         _location.speed = location.speed;
         _location.street = (location.street != null) ? location.street.Trim() : string.Empty;
         _location.text = (location.text != null) ? location.text.Trim() : string.Empty;
         _location.timestamp = location.timestamp;
         _location.uri = (location.uri != null) ? location.uri.Trim() : string.Empty;
     }
 }
예제 #17
0
 /// <summary>
 /// Change son activit�
 /// </summary>
 /// <param name="type">Type de l'activit�</param>
 /// <param name="text">Description</param>
 public void setActivity(Enumerations.ActivityType type, string text)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/activity");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element activity = new agsXMPP.Xml.Dom.Element("activity");
         activity.Namespace = "http://jabber.org/protocol/activity";
         agsXMPP.Xml.Dom.Element activityType = new agsXMPP.Xml.Dom.Element(Enum.GetName(typeof(Enumerations.ActivityType), type));
         activity.AddChild(activityType);
         agsXMPP.Xml.Dom.Element activityText = new agsXMPP.Xml.Dom.Element("text");
         activityText.Value = text;
         activity.AddChild(activityText);
         item.AddChild(activity);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _activity = new Activity();
         _activity.type = type;
         _activity.text = text;
     }
 }
예제 #18
0
 void connection_OnStreamError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     throw new NotImplementedException();
 }
예제 #19
0
 static void comp_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     Console.WriteLine("Authentication error ==> wrong Password\r\n");
 }
예제 #20
0
 /// <summary>
 /// Происходит при ошибке авторизации
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void HandlerOnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     MessageBox.Show("Ошибка авторизации. При частом её повторении помолитесь и попробуйте еще разок.");
     Exit_Click(null, null);
 }
예제 #21
0
 void xmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     Log.Error("OnAuthError");
 }
예제 #22
0
 //验证出错
 void objXmpp_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     lib.LogError("objXmpp_OnAuthError | 请检查登录帐号是否注册验证服务器");
 }
예제 #23
0
 private void OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     logger.Error("Authentication Error: {0}", e.InnerXml);
 }
예제 #24
0
 private void OnStreamError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     logger.Error("Stream Error {0}", e.InnerXml);
 }
예제 #25
0
 void xmppCon_OnAuthError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     osae.AddToLog("OnAuthError", true);
 }
예제 #26
0
 void objXmpp_OnRegisterError(object sender, agsXMPP.Xml.Dom.Element e)
 {
     Console.WriteLine(e.ToString());
     objXmpp.Close();
 }
예제 #27
0
        /// <summary>
        /// XMPP
        /// </summary>
        /// <param name="sender">Objet parent</param>
        /// <param name="el">Element</param>
        private void ElementError(object sender, agsXMPP.Xml.Dom.Element el)
        {
            if (el.HasTag("error", true))
            {
                agsXMPP.Xml.Dom.Element e = el.SelectSingleElement("error", true);
                int code = 0;
                if (e.HasAttribute("code"))
                {
                    code = Convert.ToInt32(e.Attribute("code"));
                }
                switch (code)
                {
                case 302:
                    OnErrorRaised(Enums.ErrorType.Query, "Request redirected.");
                    break;

                case 400:
                    OnErrorRaised(Enums.ErrorType.Query, "Bad Request.");
                    break;

                case 401:
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account not authorized.");
                    break;

                case 402:
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account incorrect.");
                    break;

                case 403:
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account denied.");
                    break;

                case 404:
                    OnErrorRaised(Enums.ErrorType.Warning, "Request discontinued.");
                    break;

                case 405:
                    OnErrorRaised(Enums.ErrorType.Warning, "Request prohibited.");
                    break;

                case 406:
                    OnErrorRaised(Enums.ErrorType.Query, "Request not authorized.");
                    break;

                case 407:
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account not registered.");
                    break;

                case 408:
                    OnErrorRaised(Enums.ErrorType.Server, "Server Timeout.");
                    break;

                case 409:
                    OnErrorRaised(Enums.ErrorType.Warning, "Conflicting request.");
                    break;

                case 500:
                    OnErrorRaised(Enums.ErrorType.Server, "Internal error.");
                    break;

                case 501:
                    OnErrorRaised(Enums.ErrorType.Warning, "Request not implemented.");
                    break;

                case 502:
                    OnErrorRaised(Enums.ErrorType.Server, "Distant error.");
                    break;

                case 503:
                    OnErrorRaised(Enums.ErrorType.Warning, "Service temporarily not available.");
                    break;

                case 504:
                    OnErrorRaised(Enums.ErrorType.Server, "Distant time limit reached.");
                    break;

                case 510:
                    OnErrorRaised(Enums.ErrorType.Warning, "Disconnected.");
                    break;

                default:
                    OnErrorRaised(Enums.ErrorType.Client, "General error.");
                    break;
                }
            }
            else
            {
                if (el.HasTag("bad-request", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Request incorrect.");
                }
                else if (el.HasTag("conflict", true))
                {
                    OnErrorRaised(Enums.ErrorType.Warning, "Conflicting request.");
                }
                else if (el.HasTag("feature-not-implemented", true))
                {
                    OnErrorRaised(Enums.ErrorType.Warning, "Request not implemented.");
                }
                else if (el.HasTag("forbidden", true))
                {
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account not authorized.");
                }
                else if (el.HasTag("gone", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Request redirected.");
                }
                else if (el.HasTag("internal-server-error", true))
                {
                    OnErrorRaised(Enums.ErrorType.Server, "Internal error.");
                }
                else if (el.HasTag("item-not-found", true))
                {
                    OnErrorRaised(Enums.ErrorType.Warning, "Request discontinued.");
                }
                else if (el.HasTag("jid-malformed", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Jabber ID incorrect.");
                }
                else if (el.HasTag("not-acceptable", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Request not accepted.");
                }
                else if (el.HasTag("not-allowed", true))
                {
                    OnErrorRaised(Enums.ErrorType.Server, "Operation not allowed");
                }
                else if (el.HasTag("not-authorized", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Request not authorized.");
                }
                else if (el.HasTag("payment-required", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Finalisation requise.");
                }
                else if (el.HasTag("recipient-unavailable", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Recipient unavailable.");
                }
                else if (el.HasTag("redirect", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Request redirected.");
                }
                else if (el.HasTag("registration-required", true))
                {
                    OnErrorRaised(Enums.ErrorType.Authentification, "Account not registered.");
                }
                else if (el.HasTag("remote-server-not-found", true))
                {
                    OnErrorRaised(Enums.ErrorType.Server, "Distant error.");
                }
                else if (el.HasTag("remote-server-timeout", true))
                {
                    OnErrorRaised(Enums.ErrorType.Server, "Server Timeout.");
                }
                else if (el.HasTag("resource-constraint", true))
                {
                    OnErrorRaised(Enums.ErrorType.Authentification, "Resource invalid.");
                }
                else if (el.HasTag("service-unavailable", true))
                {
                    OnErrorRaised(Enums.ErrorType.Warning, "Service temporary not available");
                }
                else if (el.HasTag("subscription-required", true))
                {
                    OnErrorRaised(Enums.ErrorType.Client, "Abonnement required.");
                }
                else if (el.HasTag("undefined-condition", true))
                {
                    OnErrorRaised(Enums.ErrorType.Client, "Condition undefined.");
                }
                else if (el.HasTag("unexpected-request", true))
                {
                    OnErrorRaised(Enums.ErrorType.Query, "Bad Request.");
                }
            }
        }
예제 #28
0
 private void addFieldInDataIQ(agsXMPP.protocol.x.data.Data data, string fieldname, string value)
 {
     Field field = new Field();
     field.Var = fieldname;
     agsXMPP.Xml.Dom.Element e = new agsXMPP.Xml.Dom.Element("value", value);
     field.AddChild(e);
     data.AddChild(field);
 }
예제 #29
0
 /// <summary>
 /// D�finit un nouvel emplacement g�ographique
 /// </summary>
 /// <param name="location">Informations compl�te sur l'emplacement</param>
 public void setLocation(Location location)
 {
     if (Jabber.xmpp.Authenticated && Jabber._pepCapable)
     {
         agsXMPP.protocol.client.IQ iq = new agsXMPP.protocol.client.IQ();
         iq.Type = agsXMPP.protocol.client.IqType.set;
         iq.GenerateId();
         agsXMPP.Xml.Dom.Element pb = new agsXMPP.Xml.Dom.Element("pubsub");
         pb.Namespace = "http://jabber.org/protocol/pubsub";
         agsXMPP.Xml.Dom.Element ps = new agsXMPP.Xml.Dom.Element("publish");
         ps.Attributes.Add("node", "http://jabber.org/protocol/geoloc");
         agsXMPP.Xml.Dom.Element item = new agsXMPP.Xml.Dom.Element("item");
         item.Attributes.Add("id", "current");
         agsXMPP.Xml.Dom.Element geoloc = new agsXMPP.Xml.Dom.Element("geoloc");
         geoloc.Namespace = "http://jabber.org/protocol/geoloc";
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("alt", Convert.ToString(location.altitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("lat", Convert.ToString(location.latitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("lon", Convert.ToString(location.longitude, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("bearing", Convert.ToString(location.bearing, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("error", Convert.ToString(location.error, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("speed", Convert.ToString(location.speed, System.Globalization.CultureInfo.InvariantCulture)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("area", (location.area != null) ? location.area.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("building", (location.building != null) ? location.building.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("country", (location.country != null) ? location.country.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("datum", (location.datum != null) ? location.datum.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("description", (location.description != null) ? location.description.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("floor", (location.floor != null) ? location.floor.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("locality", (location.locality != null) ? location.locality.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("postalcode", (location.postalcode != null) ? location.postalcode.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("region", (location.region != null) ? location.region.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("room", (location.room != null) ? location.room.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("street", (location.street != null) ? location.street.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("text", (location.text != null) ? location.text.Trim() : string.Empty));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("timestamp", agsXMPP.util.Time.ISO_8601Date(location.timestamp)));
         geoloc.AddChild(new agsXMPP.Xml.Dom.Element("uri", (location.uri != null) ? location.uri.Trim() : string.Empty));
         item.AddChild(geoloc);
         ps.AddChild(item);
         pb.AddChild(ps);
         agsXMPP.Xml.Dom.Element conf   = new agsXMPP.Xml.Dom.Element("configure");
         agsXMPP.Xml.Dom.Element x      = new agsXMPP.Xml.Dom.Element("x");
         agsXMPP.Xml.Dom.Element field1 = new agsXMPP.Xml.Dom.Element("field");
         field1.Attributes.Add("type", "hidden");
         field1.Attributes.Add("var", "FORM_TYPE");
         agsXMPP.Xml.Dom.Element value1 = new agsXMPP.Xml.Dom.Element("value");
         value1.Value = "http://jabber.org/protocol/pubsub#node_config";
         field1.AddChild(value1);
         x.AddChild(field1);
         agsXMPP.Xml.Dom.Element field2 = new agsXMPP.Xml.Dom.Element("field");
         field2.Attributes.Add("var", "pubsub#access_model");
         agsXMPP.Xml.Dom.Element value2 = new agsXMPP.Xml.Dom.Element("value");
         value2.Value = "presence";
         field2.AddChild(value2);
         x.AddChild(field2);
         conf.AddChild(x);
         pb.AddChild(conf);
         iq.AddChild(pb);
         Jabber.xmpp.Send(iq);
         _location             = new Location();
         _location.altitude    = location.altitude;
         _location.area        = (location.area != null) ? location.area.Trim() : string.Empty;
         _location.bearing     = location.bearing;
         _location.building    = (location.building != null) ? location.building.Trim() : string.Empty;
         _location.country     = (location.country != null) ? location.country.Trim() : string.Empty;
         _location.datum       = (location.datum != null) ? location.datum.Trim() : string.Empty;
         _location.description = (location.description != null) ? location.description.Trim() : string.Empty;
         _location.error       = location.error;
         _location.floor       = (location.floor != null) ? location.floor.Trim() : string.Empty;
         _location.latitude    = location.latitude;
         _location.locality    = (location.locality != null) ? location.locality.Trim() : string.Empty;
         _location.longitude   = location.longitude;
         _location.postalcode  = (location.postalcode != null) ? location.postalcode.Trim() : string.Empty;
         _location.region      = (location.region != null) ? location.region.Trim() : string.Empty;
         _location.room        = (location.room != null) ? location.room.Trim() : string.Empty;
         _location.speed       = location.speed;
         _location.street      = (location.street != null) ? location.street.Trim() : string.Empty;
         _location.text        = (location.text != null) ? location.text.Trim() : string.Empty;
         _location.timestamp   = location.timestamp;
         _location.uri         = (location.uri != null) ? location.uri.Trim() : string.Empty;
     }
 }
예제 #30
0
        /// <summary>
        /// XMPP
        /// </summary>
        /// <param name="sender">Objet parent</param>
        /// <param name="el">Element</param>
        private void ElementError(object sender, agsXMPP.Xml.Dom.Element el)
        {
            if (el.HasTag("error", true))
            {
                agsXMPP.Xml.Dom.Element e = el.SelectSingleElement("error", true);
                int code = 0;
                if (e.HasAttribute("code"))
                {
                    code = Convert.ToInt32(e.Attribute("code"));
                }
                switch (code)
                {
                case 302:
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande redirig�.");
                    break;

                case 400:
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande incorrecte.");
                    break;

                case 401:
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte non autauris�.");
                    break;

                case 402:
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte incorrect.");
                    break;

                case 403:
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte refus�.");
                    break;

                case 404:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande inconnue.");
                    break;

                case 405:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande interdite.");
                    break;

                case 406:
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande non autoris�e.");
                    break;

                case 407:
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte non enregistr�.");
                    break;

                case 408:
                    OnErrorRaised(Enumerations.ErrorType.Server, "Temps limite atteint.");
                    break;

                case 409:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande en conflit.");
                    break;

                case 500:
                    OnErrorRaised(Enumerations.ErrorType.Server, "Erreur interne.");
                    break;

                case 501:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande non impl�ment�e.");
                    break;

                case 502:
                    OnErrorRaised(Enumerations.ErrorType.Server, "Erreur distante.");
                    break;

                case 503:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Service temporairement innaccessible.");
                    break;

                case 504:
                    OnErrorRaised(Enumerations.ErrorType.Server, "Temps limite distant atteint.");
                    break;

                case 510:
                    OnErrorRaised(Enumerations.ErrorType.Warning, "D�connect�.");
                    break;

                default:
                    OnErrorRaised(Enumerations.ErrorType.Client, "Erreur g�n�rale.");
                    break;
                }
            }
            else
            {
                if (el.HasTag("bad-request", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande incorrecte.");
                }
                else if (el.HasTag("conflict", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande en conflit.");
                }
                else if (el.HasTag("feature-not-implemented", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Demande non impl�ment�e.");
                }
                else if (el.HasTag("forbidden", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte non autoris�.");
                }
                else if (el.HasTag("gone", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande redirig�e");
                }
                else if (el.HasTag("internal-server-error", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Server, "Erreur interne.");
                }
                else if (el.HasTag("item-not-found", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Warning, "El�ment inconnu.");
                }
                else if (el.HasTag("jid-malformed", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Jabber ID incorrect.");
                }
                else if (el.HasTag("not-acceptable", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande non accept�e.");
                }
                else if (el.HasTag("not-allowed", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Server, "Op�ration non autoris�e.");
                }
                else if (el.HasTag("not-authorized", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande non autoris�e.");
                }
                else if (el.HasTag("payment-required", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Finalisation requise.");
                }
                else if (el.HasTag("recipient-unavailable", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Destinataire non disponible.");
                }
                else if (el.HasTag("redirect", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande redirig�.");
                }
                else if (el.HasTag("registration-required", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Compte non enregistr�.");
                }
                else if (el.HasTag("remote-server-not-found", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Server, "Erreur distante.");
                }
                else if (el.HasTag("remote-server-timeout", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Server, "Temps limite distant atteint.");
                }
                else if (el.HasTag("resource-constraint", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Authentification, "Ressource valide requise.");
                }
                else if (el.HasTag("service-unavailable", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Warning, "Service temporairement innaccessible.");
                }
                else if (el.HasTag("subscription-required", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Client, "Abonnement requis.");
                }
                else if (el.HasTag("undefined-condition", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Client, "Condition inconnue.");
                }
                else if (el.HasTag("unexpected-request", true))
                {
                    OnErrorRaised(Enumerations.ErrorType.Query, "Demande incorrecte.");
                }
            }
        }