Merge in commits 3402-3419
[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                 RecurrenceN_First       =       0x1,
62                 RecurrenceN_Second      =       0x2,
63                 RecurrenceN_Third       =       0x3,
64                 RecurrenceN_Fourth      =       0x4,
65                 RecurrenceN_Last        =       0x5
66         } RecurrenceN;
67
68         typedef [flag(NDR_NOALIGN)] struct {
69                 WeekRecurrencePattern   WeekRecurrencePattern;
70                 RecurrenceN             N;
71         } MonthRecurrencePattern;
72
73         typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
74                 [case(0x1)] WeekRecurrencePattern               WeekRecurrencePattern;
75                 [case(0x2)] uint32                              Day;
76                 [case(0x3)] MonthRecurrencePattern              MonthRecurrencePattern;
77                 [case(0x4)] uint32                              Day;
78                 [case(0xA)] uint32                              Day;
79                 [case(0xB)] MonthRecurrencePattern              MonthRecurrencePattern;
80                 [case(0xC)] uint32                              Day;
81                 [case(0x0)];
82                 [default];
83         } PatternTypeSpecific;
84
85         typedef [v1_enum] enum {
86                 END_AFTER_DATE          = 0x00002021,
87                 END_AFTER_N_OCCURRENCES = 0x00002022,
88                 END_NEVER_END           = 0x00002023,
89                 NEVER_END               = 0xFFFFFFFF
90         } EndType;
91
92         typedef [v1_enum] enum {
93                 FirstDOW_Sunday         = 0x0,
94                 FirstDOW_Monday         = 0x1,
95                 FirstDOW_Tuesday        = 0x2,
96                 FirstDOW_Wednesday      = 0x3,
97                 FirstDOW_Thursday       = 0x4,
98                 FirstDOW_Friday         = 0x5,
99                 FirstDOW_Saturday       = 0x6
100         } FirstDOW;
101
102         typedef [v1_enum] enum {
103                 ARO_SUBJECT             = 0x0001,
104                 ARO_MEETINGTYPE         = 0x0002,
105                 ARO_REMINDERDELTA       = 0x0004,
106                 ARO_REMINDER            = 0x0008,
107                 ARO_LOCATION            = 0x0010,
108                 ARO_BUSYSTATUS          = 0x0020,
109                 ARO_ATTACHMENT          = 0x0040,
110                 ARO_SUBTYPE             = 0x0080,
111                 ARO_APPTCOLOR           = 0x0100,
112                 ARO_EXCEPTIONAL_BODY    = 0x0200
113         } OverrideFlags;
114
115         typedef [public,flag(NDR_NOALIGN)] struct {
116                 uint16                                          ReaderVersion;
117                 uint16                                          WriterVersion;
118                 RecurFrequency                                  RecurFrequency;
119                 PatternType                                     PatternType;
120                 CalendarType                                    CalendarType;
121                 uint32                                          FirstDateTime;
122                 uint32                                          Period;
123                 uint32                                          SlidingFlag;
124                 [switch_is(PatternType)] PatternTypeSpecific    PatternTypeSpecific;
125                 EndType                                         EndType;
126                 uint32                                          OccurrenceCount;
127                 FirstDOW                                        FirstDOW;
128                 uint32                                          DeletedInstanceCount;
129                 uint32                                          DeletedInstanceDates[DeletedInstanceCount];
130                 uint32                                          ModifiedInstanceCount;
131                 uint32                                          ModifiedInstanceDates[ModifiedInstanceCount];
132                 uint32                                          StartDate;
133                 uint32                                          EndDate;
134         } RecurrencePattern;
135
136         typedef [public,flag(NDR_NOALIGN)] struct {     
137                 uint32                                          ReservedBlockEE1Size;
138                 [size_is(ReservedBlockEE1Size)] uint8           ReservedBlockEE1[];
139                 uint32                                          StartDateTime;                  
140                 uint32                                          EndDateTime;
141                 uint32                                          OriginalStartDate;
142                 uint16                                          WideCharSubjectLength;
143                 [size_is(WideCharSubjectLength+1)] uint16       WideCharSubject[];
144                 uint16                                          WideCharLocationLength;
145                 [size_is(WideCharLocationLength+1)] uint16      WideCharLocation[];
146                 uint32                                          ReservedBlockEE2Size;
147                 [size_is(ReservedBlockEE2Size)] uint8           ReservedBlockEE2[];
148         } OldExtendedException;
149         
150         typedef [public,flag(NDR_NOALIGN)] struct {
151                 uint32                                          ChangeHighlightSize;
152                 uint32                                          ChangeHighlightValue;
153                 uint32                                          Reserved;
154         } ChangeHighlight;
155
156         typedef [public,flag(NDR_NOALIGN)] struct {     
157                 ChangeHighlight                                 ChangeHighlight;
158                 uint32                                          ReservedBlockEE1Size;
159                 [size_is(ReservedBlockEE1Size)] uint8           ReservedBlockEE1[];
160                 uint32                                          StartDateTime;                  
161                 uint32                                          EndDateTime;
162                 uint32                                          OriginalStartDate;
163                 uint16                                          WideCharSubjectLength;
164                 [size_is(WideCharSubjectLength+1)] uint16       WideCharSubject[];
165                 uint16                                          WideCharLocationLength;
166                 [size_is(WideCharLocationLength+1)] uint16      WideCharLocation[];
167                 uint32                                          ReservedBlockEE2Size;
168                 [size_is(ReservedBlockEE2Size)] uint8           ReservedBlockEE2[];
169         } ExtendedException;
170
171         typedef [public,flag(NDR_NOALIGN)] struct {     
172                 uint16                          msgLength;
173                 uint16                          msgLength2;
174                 [size_is(msgLength)]    uint8   msg[];
175         } Exception_Msg;
176
177         typedef [nodiscriminant, flag(NDR_NOALIGN)] union {
178                 [case(0x0000)]                  ;
179                 [case(0x0001)]  Exception_Msg   subjectMsg;
180                 [case(0x0002)]  uint32          mType;
181                 [case(0x0004)]  uint32          rDelta;
182                 [case(0x0008)]  uint32          rSet;
183                 [case(0x0010)]  Exception_Msg   locationMsg;
184                 [case(0x0020)]  uint32          bStatus;
185                 [case(0x0040)]  uint32          attachment;
186                 [case(0x0080)]  uint32          sType;
187                 [case(0x0100)]  uint32          aColor;
188                 [default];
189         } Exception_Value;
190
191         typedef [public,flag(NDR_NOALIGN)] struct {
192                         uint32                                                                  StartDateTime;
193                         uint32                                                                  EndDateTime;
194                         uint32                                                                  OriginalStartDate;
195                         OverrideFlags                                                           OverrideFlags;
196                         [switch_is(OverrideFlags & 0x0001)]     Exception_Value                 Subject;
197                         [switch_is(OverrideFlags & 0x0002)]     Exception_Value                 MeetingType;
198                         [switch_is(OverrideFlags & 0x0004)]     Exception_Value                 ReminderDelta;
199                         [switch_is(OverrideFlags & 0x0008)]     Exception_Value                 ReminderSet;
200                         [switch_is(OverrideFlags & 0x0010)]     Exception_Value                 Location;
201                         [switch_is(OverrideFlags & 0x0020)]     Exception_Value                 BusyStatus;
202                         [switch_is(OverrideFlags & 0x0040)]     Exception_Value                 Attachment;
203                         [switch_is(OverrideFlags & 0x0080)]     Exception_Value                 SubType;
204                         [switch_is(OverrideFlags & 0x0100)]     Exception_Value                 AppointmentColor;
205         } ExceptionInfo;
206
207         typedef [nodiscriminant,flag(NDR_NOALIGN)] union {
208                 [case(0x3008)] OldExtendedException     OldExtendedException;
209                 [default] ExtendedException             ExtendedException;
210         } ExtendedExceptionData;
211
212         typedef [public,flag(NDR_NOALIGN)] struct {
213                 RecurrencePattern                                       RecurrencePattern;
214                 uint32                                                  ReaderVersion2;
215                 uint32                                                  WriterVersion2;
216                 uint32                                                  StartTimeOffset;
217                 uint32                                                  EndTimeOffset;
218                 uint16                                                  ExceptionCount;
219                 ExceptionInfo                                           ExceptionInfo[ExceptionCount];
220                 uint32                                                  ReservedBlock1Size;
221                 uint32                                                  ReservedBlock1[ReservedBlock1Size];
222                 // // ExtendedException                                 ExtendedException;
223                 [switch_is(WriterVersion2)] ExtendedExceptionData       ExtendedExceptionData[ExceptionCount];
224                 uint32                                                  ReservedBlock2Size;
225                 uint32                                                  ReservedBlock2[ReservedBlock2Size];
226         } AppointmentRecurrencePattern;
227         
228         /* [MS-DIF].pdf Section 2.3.6 */
229         typedef [public,flag(NDR_NOALIGN)] struct {
230                 uint16  wYear;
231                 uint16  wMonth;
232                 uint16  wDayOfWeek;
233                 uint16  wDay;
234                 uint16  wHour;
235                 uint16  wMinute;
236                 uint16  wSecond;
237                 uint16  wMilliseconds;
238         } SYSTEMTIME;
239
240         /* pidLidTimeZoneStruct */
241         typedef [public,flag(NDR_NOALIGN)] struct {
242                 uint32                  lBias;
243                 uint32                  lStandardBias;
244                 uint32                  lDaylightBias;
245                 uint16                  wStandardYear;
246                 SYSTEMTIME              stStandardDate;
247                 uint16                  wDaylightYear;
248                 SYSTEMTIME              stDaylightDate;
249         } TimeZoneStruct;
250
251         /* pidLidGlobalObjectId */
252         typedef [public,flag(NDR_NOALIGN)] struct {
253                 uint8                   ByteArrayID[16];
254                 uint8                   YH;
255                 uint8                   YL;
256                 uint8                   Month;
257                 uint8                   D;
258                 FILETIME                CreationTime;
259                 uint8                   X[8];
260                 uint32                  Size;
261                 uint8                   Data[Size];
262         } GlobalObjectId;
263
264         /* PR_ENTRYID/PR_TARGET_ENTRYID (messages) */
265         typedef [public,flag(NDR_NOALIGN)] struct {
266                 uint32                  Flags;
267                 GUID                    ProviderUID;
268                 uint16                  MessageType;
269                 GUID                    FolderDatabaseGuid;
270                 [switch_is(1)] GLOBCNT  FolderGlobalCounter;
271                 uint16                  Pad1;
272                 GUID                    MessageDatabaseGuid;
273                 [switch_is(1)] GLOBCNT  MessageGlobalCounter;
274                 uint16                  Pad2;
275         } MessageEntryId;
276 }