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 using System;
23 using System.Text;
24 
25 using agsXMPP.Xml.Dom;
26 
27 namespace agsXMPP.protocol.extensions.pubsub.@event
28 {
29     public class Event : Element
30     {
31         public Event()
32         {
33             this.TagName    = "event";
34             this.Namespace  = Uri.PUBSUB_EVENT;
35         }
36 
37 
38         public Delete Delete
39         {
40             get
41             {
42                 return SelectSingleElement(typeof(Delete)) as Delete;
43 
44             }
45             set
46             {
47                 if (HasTag(typeof(Delete)))
48                     RemoveTag(typeof(Delete));
49 
50                 if (value != null)
51                     this.AddChild(value);
52             }
53         }
54 
55         public Purge Purge
56         {
57             get
58             {
59                 return SelectSingleElement(typeof(Purge)) as Purge;
60 
61             }
62             set
63             {
64                 if (HasTag(typeof(Purge)))
65                     RemoveTag(typeof(Purge));
66 
67                 if (value != null)
68                     this.AddChild(value);
69             }
70         }
71 
72         public Items Items
73         {
74             get
75             {
76                 return SelectSingleElement(typeof(Items)) as Items;
77             }
78             set
79             {
80                 if (HasTag(typeof(Items)))
81                     RemoveTag(typeof(Items));
82 
83                 if (value != null)
84                     this.AddChild(value);
85             }
86         }
87     }
88 }
89