Merge sogo branch into sogo-good for further "back to trunk" merge
[jelmer/openchange.git] / property.idl
1 #include "idl_types.h"
2
3 cpp_quote("#include <gen_ndr/ndr_misc.h>")
4
5 import "exchange.idl";
6
7 [
8         pointer_default(unique)
9 ]
10 interface property
11 {
12         typedef [enum16bit] enum {
13                 RecurFrequency_Daily    = 0x200A,
14                 RecurFrequency_Weekly   = 0x200B,
15                 RecurFrequency_Monthly  = 0x200C,
16                 RecurFrequency_Yearly   = 0x200D
17         } RecurFrequency;
18         
19         typedef [enum16bit] enum {
20                 PatternType_Day         = 0x0,
21                 PatternType_Week        = 0x1,
22                 PatternType_Month       = 0x2,
23                 PatternType_MonthNth    = 0x3,
24                 PatternType_MonthEnd    = 0x4,
25                 PatternType_HjMonth     = 0xA,
26                 PatternType_HjMonthNth  = 0xB,
27                 PatternType_HjMonthEnd  = 0xC
28         } PatternType;
29
30         typedef [enum16bit] enum {
31                 CAL_DEFAULT                     = 0x0,
32                 CAL_GREGORIAN                   = 0x1,
33                 CAL_GREGORIAN_US                = 0x2,
34                 CAL_JAPAN                       = 0x3,
35                 CAL_TAIWAN                      = 0x4,
36                 CAL_KOREA                       = 0x5,
37                 CAL_HIJRI                       = 0x6,
38                 CAL_THAI                        = 0x7,
39                 CAL_HEBREW                      = 0x8,
40                 CAL_GREGORIAN_ME_FRENCH         = 0x9,
41                 CAL_GREGORIAN_ARABIC            = 0xA,
42                 CAL_GREGORIAN_XLIT_ENGLISH      = 0xB,
43                 CAL_GREGORIAN_XLIT_FRENCH       = 0xC,
44                 CAL_LUNAR_JAPANESE              = 0xE,
45                 CAL_CHINESE_LUNAR               = 0xF,
46                 CAL_SAKA                        = 0x10,
47                 CAL_LUNAR_KOREAN                = 0x14
48         } CalendarType;
49
50         typedef [bitmap32bit] bitmap {
51                 Su              = 0x00000001,
52                 M               = 0x00000002,
53                 Tu              = 0x00000004,
54                 W               = 0x00000008,
55                 Th              = 0x00000010,
56                 F               = 0x00000020,
57                 Sa              = 0x00000040
58         } WeekRecurrencePattern;
59
60         typedef [v1_enum] enum {
61                 olFree          = 0x00000000,
62                 olTentative     = 0x00000001,
63                 olBusy          = 0x00000002,
64                 olOutOfOffice   = 0x00000003
65         } FreeBusyStatus; /* oxocal - 2.2.1.2 */
66
67         typedef [v1_enum] enum {
68                 RecurrenceN_First       =       0x1,
69                 RecurrenceN_Second      =       0x2,
70                 RecurrenceN_Third       =       0x3,
71                 RecurrenceN_Fourth      =       0x4,
72                 RecurrenceN_Last        =       0x5
73         } RecurrenceN;
74
75         typedef [flag(NDR_NOALIGN)] struct {
76                 WeekRecurrencePattern   WeekRecurrencePattern;
77                 RecurrenceN             N;
78         } MonthRecurrencePattern;
79
80         typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
81                 [case(0x1)] WeekRecurrencePattern               WeekRecurrencePattern;
82                 [case(0x2)] uint32                              Day;
83                 [case(0x3)] MonthRecurrencePattern              MonthRecurrencePattern;
84                 [case(0x4)] uint32                              Day;
85                 [case(0xA)] uint32                              Day;
86                 [case(0xB)] MonthRecurrencePattern              MonthRecurrencePattern;
87                 [case(0xC)] uint32                              Day;
88                 [case(0x0)];
89                 [default];
90         } PatternTypeSpecific;
91
92         typedef [v1_enum] enum {
93                 END_AFTER_DATE          = 0x00002021,
94                 END_AFTER_N_OCCURRENCES = 0x00002022,
95                 END_NEVER_END           = 0x00002023,
96                 NEVER_END               = 0xFFFFFFFF
97         } EndType;
98
99         typedef [v1_enum] enum {
100                 FirstDOW_Sunday         = 0x0,
101                 FirstDOW_Monday         = 0x1,
102                 FirstDOW_Tuesday        = 0x2,
103                 FirstDOW_Wednesday      = 0x3,
104                 FirstDOW_Thursday       = 0x4,
105                 FirstDOW_Friday         = 0x5,
106                 FirstDOW_Saturday       = 0x6
107         } FirstDOW;
108
109         typedef [v1_enum] enum {
110                 ARO_SUBJECT             = 0x0001,
111                 ARO_MEETINGTYPE         = 0x0002,
112                 ARO_REMINDERDELTA       = 0x0004,
113                 ARO_REMINDER            = 0x0008,
114                 ARO_LOCATION            = 0x0010,
115                 ARO_BUSYSTATUS          = 0x0020,
116                 ARO_ATTACHMENT          = 0x0040,
117                 ARO_SUBTYPE             = 0x0080,
118                 ARO_APPTCOLOR           = 0x0100,
119                 ARO_EXCEPTIONAL_BODY    = 0x0200
120         } OverrideFlags;
121
122         typedef [public,flag(NDR_NOALIGN)] struct {
123                 uint16                                          ReaderVersion;
124                 uint16                                          WriterVersion;
125                 RecurFrequency                                  RecurFrequency;
126                 PatternType                                     PatternType;
127                 CalendarType                                    CalendarType;
128                 uint32                                          FirstDateTime;
129                 uint32                                          Period;
130                 uint32                                          SlidingFlag;
131                 [switch_is(PatternType)] PatternTypeSpecific    PatternTypeSpecific;
132                 EndType                                         EndType;
133                 uint32                                          OccurrenceCount;
134                 FirstDOW                                        FirstDOW;
135                 uint32                                          DeletedInstanceCount;
136                 uint32                                          DeletedInstanceDates[DeletedInstanceCount];
137                 uint32                                          ModifiedInstanceCount;
138                 uint32                                          ModifiedInstanceDates[ModifiedInstanceCount];
139                 uint32                                          StartDate;
140                 uint32                                          EndDate;
141         } RecurrencePattern;
142
143         typedef [public,flag(NDR_NOALIGN)] struct {     
144                 uint32                                          ReservedBlockEE1Size;
145                 [size_is(ReservedBlockEE1Size)] uint8           ReservedBlockEE1[];
146                 uint32                                          StartDateTime;                  
147                 uint32                                          EndDateTime;
148                 uint32                                          OriginalStartDate;
149                 uint16                                          WideCharSubjectLength;
150                 [size_is(WideCharSubjectLength+1)] uint16       WideCharSubject[];
151                 uint16                                          WideCharLocationLength;
152                 [size_is(WideCharLocationLength+1)] uint16      WideCharLocation[];
153                 uint32                                          ReservedBlockEE2Size;
154                 [size_is(ReservedBlockEE2Size)] uint8           ReservedBlockEE2[];
155         } OldExtendedException;
156         
157         typedef [public,flag(NDR_NOALIGN)] struct {
158                 uint32                                          ChangeHighlightSize;
159                 uint32                                          ChangeHighlightValue;
160                 uint32                                          Reserved;
161         } ChangeHighlight;
162
163         typedef [public,flag(NDR_NOALIGN)] struct {     
164                 ChangeHighlight                                 ChangeHighlight;
165                 uint32                                          ReservedBlockEE1Size;
166                 [size_is(ReservedBlockEE1Size)] uint8           ReservedBlockEE1[];
167                 uint32                                          StartDateTime;                  
168                 uint32                                          EndDateTime;
169                 uint32                                          OriginalStartDate;
170                 uint16                                          WideCharSubjectLength;
171                 [size_is(WideCharSubjectLength+1)] uint16       WideCharSubject[];
172                 uint16                                          WideCharLocationLength;
173                 [size_is(WideCharLocationLength+1)] uint16      WideCharLocation[];
174                 uint32                                          ReservedBlockEE2Size;
175                 [size_is(ReservedBlockEE2Size)] uint8           ReservedBlockEE2[];
176         } ExtendedException;
177
178         typedef [public,flag(NDR_NOALIGN)] struct {     
179                 uint16                          msgLength;
180                 uint16                          msgLength2;
181                 [size_is(msgLength)]    uint8   msg[];
182         } Exception_Msg;
183
184         typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
185                 [case(0x0000)]                  ;
186                 [case(0x0001)]  Exception_Msg   subjectMsg;
187                 [case(0x0002)]  uint32          mType;
188                 [case(0x0004)]  uint32          rDelta;
189                 [case(0x0008)]  uint32          rSet;
190                 [case(0x0010)]  Exception_Msg   locationMsg;
191                 [case(0x0020)]  uint32          bStatus;
192                 [case(0x0040)]  uint32          attachment;
193                 [case(0x0080)]  uint32          sType;
194                 [case(0x0100)]  uint32          aColor;
195                 [default];
196         } Exception_Value;
197
198         typedef [public,flag(NDR_NOALIGN)] struct {
199                         uint32                                                                  StartDateTime;
200                         uint32                                                                  EndDateTime;
201                         uint32                                                                  OriginalStartDate;
202                         OverrideFlags                                                           OverrideFlags;
203                         [switch_is(OverrideFlags & 0x0001)]     Exception_Value                 Subject;
204                         [switch_is(OverrideFlags & 0x0002)]     Exception_Value                 MeetingType;
205                         [switch_is(OverrideFlags & 0x0004)]     Exception_Value                 ReminderDelta;
206                         [switch_is(OverrideFlags & 0x0008)]     Exception_Value                 ReminderSet;
207                         [switch_is(OverrideFlags & 0x0010)]     Exception_Value                 Location;
208                         [switch_is(OverrideFlags & 0x0020)]     Exception_Value                 BusyStatus;
209                         [switch_is(OverrideFlags & 0x0040)]     Exception_Value                 Attachment;
210                         [switch_is(OverrideFlags & 0x0080)]     Exception_Value                 SubType;
211                         [switch_is(OverrideFlags & 0x0100)]     Exception_Value                 AppointmentColor;
212         } ExceptionInfo;
213
214         typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
215                 [case(0x3008)] OldExtendedException     OldExtendedException;
216                 [default] ExtendedException             ExtendedException;
217         } ExtendedExceptionData;
218
219         typedef [public,flag(NDR_NOALIGN)] struct {
220                 RecurrencePattern                                       RecurrencePattern;
221                 uint32                                                  ReaderVersion2;
222                 uint32                                                  WriterVersion2;
223                 uint32                                                  StartTimeOffset;
224                 uint32                                                  EndTimeOffset;
225                 uint16                                                  ExceptionCount;
226                 ExceptionInfo                                           ExceptionInfo[ExceptionCount];
227                 uint32                                                  ReservedBlock1Size;
228                 uint32                                                  ReservedBlock1[ReservedBlock1Size];
229                 // // ExtendedException                                 ExtendedException;
230                 [switch_is(WriterVersion2)] ExtendedExceptionData       ExtendedExceptionData[ExceptionCount];
231                 uint32                                                  ReservedBlock2Size;
232                 uint32                                                  ReservedBlock2[ReservedBlock2Size];
233         } AppointmentRecurrencePattern;
234         
235         /* [MS-DIF].pdf Section 2.3.6 */
236         typedef [public,flag(NDR_NOALIGN)] struct {
237                 uint16  wYear;
238                 uint16  wMonth;
239                 uint16  wDayOfWeek;
240                 uint16  wDay;
241                 uint16  wHour;
242                 uint16  wMinute;
243                 uint16  wSecond;
244                 uint16  wMilliseconds;
245         } SYSTEMTIME;
246
247         /* pidLidTimeZoneStruct */
248         typedef [public,flag(NDR_NOALIGN)] struct {
249                 uint32                  lBias;
250                 uint32                  lStandardBias;
251                 uint32                  lDaylightBias;
252                 uint16                  wStandardYear;
253                 SYSTEMTIME              stStandardDate;
254                 uint16                  wDaylightYear;
255                 SYSTEMTIME              stDaylightDate;
256         } TimeZoneStruct;
257
258         /* pidLidGlobalObjectId */
259         typedef [public,flag(NDR_NOALIGN)] struct {
260                 uint8                   ByteArrayID[16];
261                 uint8                   YH;
262                 uint8                   YL;
263                 uint8                   Month;
264                 uint8                   D;
265                 FILETIME                CreationTime;
266                 uint8                   X[8];
267                 uint32                  Size;
268                 uint8                   Data[Size];
269         } GlobalObjectId;
270
271         typedef [enum16bit] enum {
272                 eitLTPrivateFolder              = 0x01,
273                 eitLTPPublicFolder              = 0x03,
274                 eitLTPMappedPublicFolder        = 0x05,
275                 eitLTPPrivateMessage            = 0x07,
276                 eitLTPPublicMessage             = 0x09,
277                 eitLTPMappedPublicMessage       = 0x0b,
278                 eitLTPPublicNewsgroupFolder     = 0x0c
279         } EntryIdFolderType;
280
281         /* FolderEntryId */
282         typedef [public,flag(NDR_NOALIGN)] struct {
283                 uint32                  Flags;
284                 GUID                    ProviderUID;
285                 EntryIdFolderType       FolderType;
286                 GUID                    FolderDatabaseGuid;
287                 [switch_is(1)] GLOBCNT  FolderGlobalCounter;
288                 uint16                  Pad;
289         } FolderEntryId;
290
291         /* PR_ENTRYID/PR_TARGET_ENTRYID (messages) */
292         typedef [public,flag(NDR_NOALIGN)] struct {
293                 uint32                  Flags;
294                 GUID                    ProviderUID;
295                 EntryIdFolderType       MessageType;
296                 GUID                    FolderDatabaseGuid;
297                 [switch_is(1)] GLOBCNT  FolderGlobalCounter;
298                 uint16                  Pad1;
299                 GUID                    MessageDatabaseGuid;
300                 [switch_is(1)] GLOBCNT  MessageGlobalCounter;
301                 uint16                  Pad2;
302         } MessageEntryId;
303
304         /* AddressBookEntryId */
305         typedef [public,flag(NDR_NOALIGN)] struct {
306                 uint32                  Flags;
307                 GUID                    ProviderUID;
308                 uint32                  Version;
309                 uint32                  Type;
310                 astring                 X500DN;
311         } AddressBookEntryId;
312 }