private void OnClientVersionAvailable(ClientVersion version) { try { ClientVersionAvailable(version); } catch { } }
/// <summary> /// Resultat de la requète getVersion /// </summary> /// <param name="sender">Objet parent</param> /// <param name="iq">Résultat de la requète</param> /// <param name="data">Données supplémentaires</param> private void getVersionResult(object sender, agsXMPP.protocol.client.IQ iq, object data) { if (iq.Type == agsXMPP.protocol.client.IqType.result) { if (iq.Query != null && iq.Query is agsXMPP.protocol.iq.version.Version) { agsXMPP.protocol.iq.version.Version version = iq.Query as agsXMPP.protocol.iq.version.Version; ClientVersion cv = new ClientVersion(); cv.name = (version.Name != null) ? version.Name.Trim() : string.Empty; cv.os = (version.Os != null) ? version.Os.Trim() : string.Empty; cv.version = (version.Ver != null) ? version.Ver.Trim() : string.Empty; OnClientVersionAvailable(cv); if (Jabber.xmpp.IqGrabber != null && viqID != string.Empty) { Jabber.xmpp.IqGrabber.Remove(viqID); } } } }