Example #1
0
 /// <summary>
 /// Change l'�tat de son status
 /// </summary>
 public void applyStatus()
 {
     if (Jabber.xmpp.Authenticated)
     {
         agsXMPP.protocol.client.Presence p = new agsXMPP.protocol.client.Presence();
         p.From     = Jabber.xmpp.MyJID;
         p.Priority = Jabber.xmpp.Priority;
         p.Type     = Enumerations.PresenceTypeConverter(_status.type);
         if (p.Type == agsXMPP.protocol.client.PresenceType.available)
         {
             p.Show         = Enumerations.StatusTypeConverter(_status.type);
             p.Status       = _status.message;
             p.XDelay       = new agsXMPP.protocol.x.Delay();
             p.XDelay.Stamp = DateTime.Now;
             p.AddChild(Queries.getCapabilities());
             Jabber.xmpp.Show   = p.Show;
             Jabber.xmpp.Status = p.Status;
             p.Nickname         = new agsXMPP.protocol.extensions.nickname.Nickname(Jabber._identity.nickname);
         }
         Jabber.xmpp.Send(p);
     }
 }