/// <summary> /// Sets the presence. /// </summary> /// <param name = "newPresence">The new presence state.</param> /// <param name = "status">The status.</param> /// <param name = "priority">The priority.</param> public IXmppSession SetPresence(XmppPresenceState newPresence, string status, int priority) { CheckSessionState(); Presence.SetPresence(newPresence, status); return(this); }
/// <summary> /// Sets the presence state with the given state, status message and priority /// </summary> /// <param name = "showAs"></param> /// <param name = "statusMessage"></param> /// <param name = "priority"></param> public void SetPresence(XmppPresenceState showAs, string statusMessage, int priority) { var presence = new Presence(); var status = new Status(); status.Value = statusMessage; presence.Id = XmppIdentifierGenerator.Generate(); presence.Items.Add((ShowType)showAs); presence.Items.Add(status); session.Send(presence); }
/// <summary> /// Sets the presence. /// </summary> /// <param name = "newPresence">The new presence state.</param> /// <param name = "status">The status.</param> public IXmppSession SetPresence(XmppPresenceState newPresence, string status) { switch (newPresence) { case XmppPresenceState.Invisible: throw new NotImplementedException(); case XmppPresenceState.Offline: Close(); break; default: SetPresence(newPresence, status, 0); break; } return(this); }
/// <summary> /// Sets the presence state with the given state, status message and priority /// </summary> /// <param name = "showAs"></param> /// <param name = "statusMessage"></param> /// <param name = "priority"></param> public void SetPresence(XmppPresenceState showAs, string statusMessage, int priority) { var presence = new Presence(); var status = new Status(); status.Value = statusMessage; presence.Id = XmppIdentifierGenerator.Generate(); presence.Items.Add((ShowType) showAs); presence.Items.Add(status); session.Send(presence); }
/// <summary> /// Sets the presence state with the given state and status message /// </summary> /// <param name = "showAs"></param> /// <param name = "statusMessage"></param> public void SetPresence(XmppPresenceState showAs, string statusMessage) { SetPresence(showAs, statusMessage, 0); }
/// <summary> /// Sets the presense state. /// </summary> /// <param name = "presenceState"></param> public void SetPresence(XmppPresenceState presenceState) { SetPresence(presenceState, null); }
/// <summary> /// Initializes a new instance of the <see cref = "">XmppContactPresence</see> /// </summary> /// <param name = "session"></param> internal XmppContactPresence(XmppSession session) { this.session = session; presenceStatus = XmppPresenceState.Offline; }
/// <summary> /// Sets the presence. /// </summary> /// <param name="newPresence">The new presence state.</param> /// <param name="status">The status.</param> /// <param name="priority">The priority.</param> public IXmppSession SetPresence(XmppPresenceState newPresence, string status, int priority) { this.CheckSessionState(); this.Presence.SetPresence(newPresence, status); return this; }
/// <summary> /// Sets the presence. /// </summary> /// <param name="newPresence">The new presence state.</param> /// <param name="status">The status.</param> public IXmppSession SetPresence(XmppPresenceState newPresence, string status) { switch (newPresence) { case XmppPresenceState.Invisible: throw new NotImplementedException(); case XmppPresenceState.Offline: this.Close(); break; default: this.SetPresence(newPresence, status, 0); break; } return this; }
/// <summary> /// Sets the presence. /// </summary> /// <param name="showAs">The show as.</param> public IXmppSession SetPresence(XmppPresenceState newPresence) { this.SetPresence(newPresence, null); return this; }
/// <summary> /// Initializes a new instance of the <see cref="">XmppContactPresence</see> /// </summary> /// <param name="session"></param> internal XmppContactPresence(XmppSession session) { this.session = session; this.presenceStatus = XmppPresenceState.Offline; }
/// <summary> /// Sets the presence state with the given state and status message /// </summary> /// <param name = "showAs"></param> /// <param name = "statusMessage"></param> public void SetPresence(XmppPresenceState showAs, string statusMessage) { SetPresence(showAs, statusMessage, 0); }
/// <summary> /// Sets the presense state. /// </summary> /// <param name = "presenceState"></param> public void SetPresence(XmppPresenceState presenceState) { SetPresence(presenceState, null); }
/// <summary> /// Sets the presence. /// </summary> /// <param name = "showAs">The show as.</param> public IXmppSession SetPresence(XmppPresenceState newPresence) { SetPresence(newPresence, null); return(this); }