~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to src/core/SimiasClient/.svn/text-base/IProcEventTypes.cs.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 |
3
 
 | Copyright (c) 2007 Novell, Inc.
4
 
 | All Rights Reserved.
5
 
 |
6
 
 | This program is free software; you can redistribute it and/or
7
 
 | modify it under the terms of version 2 of the GNU General Public License as
8
 
 | published by the Free Software Foundation.
9
 
 |
10
 
 | This program is distributed in the hope that it will be useful,
11
 
 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 | GNU General Public License for more details.
14
 
 |
15
 
 | You should have received a copy of the GNU General Public License
16
 
 | along with this program; if not, contact Novell, Inc.
17
 
 |
18
 
 | To contact Novell about this file by physical or electronic mail,
19
 
 | you may find current contact information at www.novell.com 
20
 
 |
21
 
 | Author: Mike Lasky
22
 
 |***************************************************************************/
23
 
 
24
 
using System;
25
 
 
26
 
namespace Simias.Client.Event
27
 
{
28
 
        /// <summary>
29
 
        /// Actions that indicate what to do with the simias events.
30
 
        /// </summary>
31
 
        public enum IProcEventAction
32
 
        {
33
 
                /// <summary>
34
 
                /// Add Node object created event.
35
 
                /// </summary>
36
 
                AddNodeCreated,
37
 
 
38
 
                /// <summary>
39
 
                /// Add Node object changed event.
40
 
                /// </summary>
41
 
                AddNodeChanged,
42
 
 
43
 
                /// <summary>
44
 
                /// AddNode object deleted event.
45
 
                /// </summary>
46
 
                AddNodeDeleted,
47
 
 
48
 
                /// <summary>
49
 
                /// Add Collection synchronization events.
50
 
                /// </summary>
51
 
                AddCollectionSync,
52
 
 
53
 
                /// <summary>
54
 
                /// Add File synchronization events.
55
 
                /// </summary>
56
 
                AddFileSync,
57
 
 
58
 
                /// <summary>
59
 
                /// Add Notify message events.
60
 
                /// </summary>
61
 
                AddNotifyMessage,
62
 
 
63
 
                /// <summary>
64
 
                /// Remove Node object created event.
65
 
                /// </summary>
66
 
                RemoveNodeCreated,
67
 
 
68
 
                /// <summary>
69
 
                /// Remove Node object changed event.
70
 
                /// </summary>
71
 
                RemoveNodeChanged,
72
 
 
73
 
                /// <summary>
74
 
                /// Remove Node object deleted event.
75
 
                /// </summary>
76
 
                RemoveNodeDeleted,
77
 
 
78
 
                /// <summary>
79
 
                /// Remove Collection synchronization event.
80
 
                /// </summary>
81
 
                RemoveCollectionSync,
82
 
 
83
 
                /// <summary>
84
 
                /// Remove File synchronization event.
85
 
                /// </summary>
86
 
                RemoveFileSync,
87
 
 
88
 
                /// <summary>
89
 
                /// Remove Notify message event.
90
 
                /// </summary>
91
 
                RemoveNotifyMessage
92
 
};
93
 
 
94
 
        /// <summary>
95
 
        /// Used to specify to indicate only certain types of events. These filters
96
 
        /// only apply to Simias "node" events. Sync events cannot be filtered.
97
 
        /// </summary>
98
 
        public enum IProcFilterType
99
 
        {
100
 
                /// <summary>
101
 
                /// Subscribe to all changes in the specified collection.
102
 
                /// </summary>
103
 
                Collection,
104
 
 
105
 
                /// <summary>
106
 
                /// Subscribe to all changes to the specified node.
107
 
                /// </summary>
108
 
                NodeID,
109
 
 
110
 
                /// <summary>
111
 
                /// Subscribe to all changes to nodes of the specified type.
112
 
                /// </summary>
113
 
                NodeType
114
 
        };
115
 
 
116
 
        /// <summary>
117
 
        /// Describes the event filters for Simias nodes.
118
 
        /// </summary>
119
 
        public class IProcEventFilter
120
 
        {
121
 
                #region Class Members
122
 
                /// <summary>
123
 
                /// Type of event filter.
124
 
                /// </summary>
125
 
                private IProcFilterType type;
126
 
 
127
 
                /// <summary>
128
 
                /// Data that is used to filter the events.
129
 
                /// </summary>
130
 
                private string data;
131
 
                #endregion
132
 
 
133
 
                #region Properties
134
 
                /// <summary>
135
 
                /// Gets the filter type.
136
 
                /// </summary>
137
 
                public IProcFilterType Type
138
 
                {
139
 
                        get { return type; }
140
 
                }
141
 
 
142
 
                /// <summary>
143
 
                /// Gets the event data.
144
 
                /// </summary>
145
 
                public string Data
146
 
                {
147
 
                        get { return data; }
148
 
                }
149
 
                #endregion
150
 
 
151
 
                #region Constructor
152
 
                /// <summary>
153
 
                /// Initializes an instance of the object.
154
 
                /// </summary>
155
 
                /// <param name="type">Type of filter.</param>
156
 
                /// <param name="data">Filter data.</param>
157
 
                public IProcEventFilter( string type, string data )
158
 
                {
159
 
                        this.type = ( IProcFilterType )Enum.Parse( typeof( IProcFilterType), type, true );
160
 
                        this.data = data;
161
 
                }
162
 
 
163
 
                /// <summary>
164
 
                /// Initializes an instance of the object.
165
 
                /// </summary>
166
 
                /// <param name="type">Type of filter</param>
167
 
                /// <param name="data">Filter data.</param>
168
 
                public IProcEventFilter( IProcFilterType type, string data )
169
 
                {
170
 
                        this.type = type;
171
 
                        this.data = data;
172
 
                }
173
 
                #endregion
174
 
        }
175
 
}