8
8
<link rel="up" href="ch02.html" title="Implementation of Connector Features">
9
9
<link rel="prev" href="ximian-connector-fba.html" title="Exchange 2003 Forms-Based Authentication">
10
10
<link rel="next" href="ximian-connector-oof.html" title="Out of Office">
11
<meta name="generator" content="GTK-Doc V1.10 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="ch01.html" title="Exchange Architectural Notes">
14
14
<link rel="chapter" href="ch02.html" title="Implementation of Connector Features">
35
35
<td valign="top" align="right"></td>
36
36
</tr></table></div>
37
37
<div class="refsect1" lang="en">
38
<a name="id2965084"></a><h2>The <span class="application">OWA</span> XML Free/Busy interface</h2>
38
<a name="id2588865"></a><h2>The <span class="application">OWA</span> XML Free/Busy interface</h2>
40
40
In Connector versions up to and including 2.0, we get free/busy data
41
41
by using the XML interface to <span class="application">OWA</span>. The
42
42
request URL looks like:
44
<div class="informalexample"><pre class="programlisting">
46
&start=2002-10-23T04:00:00Z
47
&end=2002-11-27T05:00:00Z
49
&u=SMTP:danw@xcs.ximian.com
50
&u=SMTP:eleanor@xcs.ximian.com
44
<div class="informalexample">
45
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
48
<td class="listing_lines" align="right"><pre>1
54
<td class="listing_code"><pre class="programlisting">/<span class="keyword">public</span>/?Cmd=freebusy
55
&start=<span class="number">2002</span>-<span class="number">10</span>-23T04:<span class="preproc">0</span><span class="number">0</span>:00Z
56
&end=<span class="number">2002</span>-<span class="number">11</span>-27T05:<span class="preproc">0</span><span class="number">0</span>:00Z
57
&interval=<span class="number">30</span>
58
&u=SMTP:danw@xcs.ximian.com
59
&u=SMTP:eleanor@xcs.ximian.com</pre></td>
53
66
(Line breaks inserted for clarity. The actual URL would all be on one
54
67
line of course.) This must be sent with a proper
60
73
The response (with a status of <code class="literal"><span class="errorcode">200</span>
61
74
<span class="errorname">OK</span></code>) looks like:
63
<div class="informalexample"><pre class="programlisting">
64
<a:response xmlns:a="WM">
67
<a:displayname>All Attendees</a:displayname>
68
<a:type>1</a:type>
69
<a:fbdata>00000022220000000000000001221000222222...</a:fbdata>
72
<a:displayname>Dan Winship</a:displayname>
73
<a:email type="SMTP">danw@xcs.ximian.com</a:email>
74
<a:type>1</a:type>
75
<a:fbdata>00000000000000000000000000220000222222...</a:fbdata>
78
<a:displayname>Eleanor Garcia</a:displayname>
79
<a:email type="SMTP">eleanor@xcs.ximian.com</a:email>
80
<a:type>1</a:type>
81
<a:fbdata>00000022220000000000000001111000000000...</a:fbdata>
76
<div class="informalexample">
77
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
80
<td class="listing_lines" align="right"><pre>1
101
<td class="listing_code"><pre class="programlisting"><a:response xmlns:a=<span class="number">"WM"</span>>
104
<a:displayname>All Attendees</a:displayname>
105
<a:type><span class="number">1</span></a:type>
106
<a:fbdata><span class="number">00000022220000000000000001221000222222.</span>..</a:fbdata>
109
<a:displayname>Dan Winship</a:displayname>
110
<a:email type=<span class="number">"SMTP"</span>>danw@xcs.ximian.com</a:email>
111
<a:type><span class="number">1</span></a:type>
112
<a:fbdata><span class="number">00000000000000000000000000220000222222.</span>..</a:fbdata>
115
<a:displayname>Eleanor Garcia</a:displayname>
116
<a:email type=<span class="number">"SMTP"</span>>eleanor@xcs.ximian.com</a:email>
117
<a:type><span class="number">1</span></a:type>
118
<a:fbdata><span class="number">00000022220000000000000001111000000000.</span>..</a:fbdata>
120
</a:recipients>
121
</a:response></pre></td>
87
128
Each character in the <code class="literal">fbdata</code> section represents a
88
129
length of "<code class="literal">interval</code>" minutes (the interval
189
230
The <code class="literal">_MONTHS</code> properties are arrays of
191
<div class="informalexample"><pre class="programlisting">
193
guint month:4; /* 1 = January */
232
<div class="informalexample">
233
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
236
<td class="listing_lines" align="right"><pre>1
240
<td class="listing_code"><pre class="programlisting"><span class="type">struct</span> {
241
guint month:<span class="number">4</span>; <span class="comment">/*</span><span class="comment"> 1 = January </span><span class="comment">*/</span>
242
guint year :<span class="number">28</span>;
198
250
Each element of this array has a corresponding element in the
199
251
<code class="literal">_EVENTS</code> array containing the events in that month
200
252
and year as an array of:
202
<div class="informalexample"><pre class="programlisting">
204
guint16 start; /* minutes since start of month */
205
guint16 end; /* minutes since start of month */
254
<div class="informalexample">
255
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
258
<td class="listing_lines" align="right"><pre>1
262
<td class="listing_code"><pre class="programlisting"><span class="type">struct</span> {
263
guint16 start; <span class="comment">/*</span><span class="comment"> minutes since start of month </span><span class="comment">*/</span>
264
guint16 end; <span class="comment">/*</span><span class="comment"> minutes since start of month </span><span class="comment">*/</span>
209
272
If there are no events of a given type in the given interval, then
210
273
<span class="application">Outlook</span> leaves the two properties for that
289
352
The free/busy data is stored in the
290
353
<code class="literal">PR_PERSONAL_FREEBUSY</code> property as follows:
292
<div class="informalexample"><pre class="programlisting">
294
guint32 magic; /* 0xdeadbeef */
295
guint32 header_len; /* 0x00000040 */
296
guint32 unknown_1; /* 0x00010000 */
297
guint32 unknown_2; /* 0x00000000 */
299
guint32 num_groups; /* number of free/busy groups */
300
guint32 num_events; /* total number of free/busy objects */
301
guint32 unknown_3; /* 0x00000008 */
302
guint32 unknown_4; /* 0x00000004 */
304
guint64 first_event; /* Windows filetime of start of first event */
305
guint64 last_event; /* Windows filetime of end of last event */
306
guint64 start_valid; /* Windows filetime of start of range */
307
guint64 end_valid; /* Windows filetime of end of range */
310
guint32 index; /* Index of first event belonging to this group */
311
guint32 count; /* Number of events in this group */
312
} groups[num_groups];
315
guint32 offset; /* Offset in minutes of event from start of group */
316
guint len:13; /* Length of event in minutes */
317
guint status:3; /* Status (1 = tentative, 2 = busy, 3 = oof) */
318
} events[num_events];
355
<div class="informalexample">
356
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
359
<td class="listing_lines" align="right"><pre>1
386
<td class="listing_code"><pre class="programlisting"><span class="type">struct</span> {
387
guint32 magic; <span class="comment">/*</span><span class="comment"> 0xdeadbeef </span><span class="comment">*/</span>
388
guint32 header_len; <span class="comment">/*</span><span class="comment"> 0x00000040 </span><span class="comment">*/</span>
389
guint32 unknown_1; <span class="comment">/*</span><span class="comment"> 0x00010000 </span><span class="comment">*/</span>
390
guint32 unknown_2; <span class="comment">/*</span><span class="comment"> 0x00000000 </span><span class="comment">*/</span>
392
guint32 num_groups; <span class="comment">/*</span><span class="comment"> number of free/busy groups </span><span class="comment">*/</span>
393
guint32 num_events; <span class="comment">/*</span><span class="comment"> total number of free/busy objects </span><span class="comment">*/</span>
394
guint32 unknown_3; <span class="comment">/*</span><span class="comment"> 0x00000008 </span><span class="comment">*/</span>
395
guint32 unknown_4; <span class="comment">/*</span><span class="comment"> 0x00000004 </span><span class="comment">*/</span>
397
guint64 first_event; <span class="comment">/*</span><span class="comment"> Windows filetime of start of first event </span><span class="comment">*/</span>
398
guint64 last_event; <span class="comment">/*</span><span class="comment"> Windows filetime of end of last event </span><span class="comment">*/</span>
399
guint64 start_valid; <span class="comment">/*</span><span class="comment"> Windows filetime of start of range </span><span class="comment">*/</span>
400
guint64 end_valid; <span class="comment">/*</span><span class="comment"> Windows filetime of end of range </span><span class="comment">*/</span>
402
<span class="type">struct</span> {
403
guint32 index; <span class="comment">/*</span><span class="comment"> Index of first event belonging to this group </span><span class="comment">*/</span>
404
guint32 count; <span class="comment">/*</span><span class="comment"> Number of events in this group </span><span class="comment">*/</span>
405
} groups[num_groups];
407
<span class="type">struct</span> {
408
guint32 offset; <span class="comment">/*</span><span class="comment"> Offset in minutes of event from start of group </span><span class="comment">*/</span>
409
guint len:<span class="number">13</span>; <span class="comment">/*</span><span class="comment"> Length of event in minutes </span><span class="comment">*/</span>
410
guint status:<span class="number">3</span>; <span class="comment">/*</span><span class="comment"> Status (1 = tentative, 2 = busy, 3 = oof) </span><span class="comment">*/</span>
411
} events[num_events];
322
419
The first group starts at the time indicated by
323
420
<em class="structfield"><code>start_valid</code></em>, so an event in group