예제 #1
0
 public static string GetSafeFileName(JabberID contact)
 {
     string safe = contact.full;
     foreach (char lDisallowed in System.IO.Path.GetInvalidFileNameChars()) {
         safe = safe.Replace(lDisallowed.ToString(), "");
     }
     foreach (char lDisallowed in System.IO.Path.GetInvalidPathChars()) {
         safe = safe.Replace(lDisallowed.ToString(), "");
     }
     return safe;
 }
예제 #2
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="jid">Identifiant Jabber</param>
 public Identity(agsXMPP.Jid jid)
 {
     if (jid == null) { return; }
     _jabberID = new JabberID();
     _jabberID.user = (jid.User != null) ? jid.User : string.Empty;
     _jabberID.domain = (jid.Server != null) ? jid.Server : string.Empty;
     _jabberID.resource = (jid.Resource != null) ? jid.Resource : string.Empty;
     _jabberID.bare = (jid.Bare != null) ? jid.Bare : string.Empty;
     _jabberID.full = jid.ToString();
     _name = new Name();
     _name.firstname = string.Empty;
     _name.lastname = string.Empty;
     _name.middle = string.Empty;
     _organization = new Organization();
     _organization.name = string.Empty;
     _organization.unit = string.Empty;
     //this.retrieve();
     //Load();
     Jabber.xmpp.OnIq += new agsXMPP.protocol.client.IqHandler(iqManager);
 }
예제 #3
0
 /// <summary>
 /// Constructeur
 /// </summary>
 /// <param name="jid">Identifiant Jabber</param>
 public Identity(agsXMPP.Jid jid)
 {
     if (jid == null)
     {
         return;
     }
     _jabberID          = new JabberID();
     _jabberID.user     = (jid.User != null) ? jid.User : string.Empty;
     _jabberID.domain   = (jid.Server != null) ? jid.Server : string.Empty;
     _jabberID.resource = (jid.Resource != null) ? jid.Resource : string.Empty;
     _jabberID.bare     = (jid.Bare != null) ? jid.Bare : string.Empty;
     _jabberID.full     = jid.ToString();
     _name              = new Name();
     _name.firstname    = string.Empty;
     _name.lastname     = string.Empty;
     _name.middle       = string.Empty;
     _organization      = new Organization();
     _organization.name = string.Empty;
     _organization.unit = string.Empty;
     load();
     Jabber.xmpp.OnIq += new agsXMPP.protocol.client.IqHandler(iqManager);
 }