1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * Copyright (c) 2003-2012 by AG-Software 											 *
3  * All Rights Reserved.																 *
4  * Contact information for AG-Software is available at http://www.ag-software.de	 *
5  *																					 *
6  * Licence:																			 *
7  * The agsXMPP SDK is released under a dual licence									 *
8  * agsXMPP can be used under either of two licences									 *
9  * 																					 *
10  * A commercial licence which is probably the most appropriate for commercial 		 *
11  * corporate use and closed source projects. 										 *
12  *																					 *
13  * The GNU Public License (GPL) is probably most appropriate for inclusion in		 *
14  * other open source projects.														 *
15  *																					 *
16  * See README.html for details.														 *
17  *																					 *
18  * For general enquiries visit our website at:										 *
19  * http://www.ag-software.de														 *
20  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
21 
22 #region Using directives
23 
24 using System;
25 
26 #endregion
27 
28 namespace agsXMPP.protocol.component
29 {
30     /// <summary>
31     /// Summary description for Presence.
32     /// </summary>
33     public class Presence : agsXMPP.protocol.client.Presence
34     {
35         #region << Constructors >>
Presence()36         public Presence() : base()
37         {
38             this.Namespace = Uri.ACCEPT;
39         }
40 
Presence(agsXMPP.protocol.client.ShowType show, string status)41         public Presence(agsXMPP.protocol.client.ShowType show, string status) : this()
42         {
43             this.Show = show;
44             this.Status = status;
45         }
46 
Presence(agsXMPP.protocol.client.ShowType show, string status, int priority)47         public Presence(agsXMPP.protocol.client.ShowType show, string status, int priority) : this(show, status)
48         {
49             this.Priority = priority;
50         }
51         #endregion
52 
53         /// <summary>
54         /// Error Child Element
55         /// </summary>
56         public new agsXMPP.protocol.component.Error Error
57         {
58             get
59             {
60                 return SelectSingleElement(typeof(agsXMPP.protocol.component.Error)) as agsXMPP.protocol.component.Error;
61 
62             }
63             set
64             {
65                 if (HasTag(typeof(agsXMPP.protocol.component.Error)))
66                     RemoveTag(typeof(agsXMPP.protocol.component.Error));
67 
68                 if (value != null)
69                     this.AddChild(value);
70             }
71         }
72     }
73 }
74