public XmppVCard(XmppJid jid, XmppIQ stream) { Jid = jid; XmppIQ xFN = stream.FindDescendant("FN", ns); if (xFN != null) { FN = xFN.Text; } XmppIQ xPhoto = stream.FindDescendant("PHOTO", ns); if (xPhoto != null) { XmppIQ xPhotoType = xPhoto.FindChild("TYPE", ns); if (xPhotoType != null) { PhotoType = xPhotoType.Text; } XmppIQ xPhotoBin = xPhoto.FindChild("BINVAL", ns); if (xPhotoBin != null) { PhotoBinVal = xPhotoBin.Text; } } }
public override bool Equals(object obj) { if (obj == null || (obj is XmppJid)) { return(false); } XmppJid cJid = obj as XmppJid; return(this.Bare == cJid.Bare && this.Resource == cJid.Resource); }
public string ToStream(XmppJid from, XmppJid to, XmppIqType type, string id, string content) { StringBuilder result = new StringBuilder("<iq "); if (from != null && !string.IsNullOrWhiteSpace(from.Value)) { result.AppendFormat("from=\"{0}\" ", from.Value); } if (to != null && !string.IsNullOrWhiteSpace(to.Value)) { result.AppendFormat("to=\"{0}\" ", to.Value); } result.AppendFormat("id=\"{0}\" ", id); result.AppendFormat("type=\"{0}\">{1}</iq>", XmppIq.TypeToStr(type), content); return(result.ToString()); }
public XmppSubscribeRequestEventArgs(XmppJid jid) { From = jid; }
public XmppChatNotifyEventArgs(XmppJid jid, string thread, XmppChatStatus chatStatus) { From = jid; Thread = thread; ChatStatus = chatStatus; }
public XmppRosterItem(string jid, string sub, string name, string group, string ask) { Jid = new XmppJid(jid); Subscription = sub; Name = name; Group = group; Ask = ask; }