1 /* $XConsortium: cm.x /main/1 1996/04/21 19:21:56 drk $ */
3 * (c) Copyright 1996 Digital Equipment Corporation.
4 * (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
5 * (c) Copyright 1993,1994,1996 International Business Machines Corp.
6 * (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
7 * (c) Copyright 1993,1994,1996 Novell, Inc.
8 * (c) Copyright 1996 FUJITSU LIMITED.
9 * (c) Copyright 1996 Hitachi.
13 * Calendar manager service RPC protocol.
16 #if defined(RPC_HDR) || defined(RPC_XDR)
20 %#include "connection.h"
28 % * cms_name - a user name or calendar name which is
29 % * variable length character string
31 typedef string cms_name<>;
35 % * buffer - a variable length character string
37 typedef string buffer<>;
41 % * cms_access_entry - data structure for the access list attribute
43 struct cms_access_entry {
46 cms_access_entry *next;
51 % * cms_attribute_value - data structure for attribute value
53 %struct cms_attribute_value {
56 % CSA_boolean boolean_value;
57 % CSA_enum enumerated_value;
58 % CSA_flags flags_value;
62 % char *calendar_user_value;
63 % char *date_time_value;
64 % char *date_time_range_value;
65 % char *time_duration_value;
66 % cms_access_entry *access_list_value;
67 % CSA_date_time_entry *date_time_list_value;
68 % CSA_reminder *reminder_value;
69 % CSA_opaque_data *opaque_data_value;
72 %typedef struct cms_attribute_value cms_attribute_value;
77 % * cms_key consists of the time and the unique
78 % * identifier of the entry.
87 % * num contains the hashed number for the associated name assigned
88 % * by the server. Client should not change its value.
89 % * If it's zero, name is not hashed yet.
91 struct cms_attr_name {
100 struct cms_attribute {
102 cms_attribute_value *value;
108 % * An entry is identified by an identifier unique within the calendar
109 % * and has a variable number of attributes associated with it.
114 cms_attribute *attrs;
115 struct cms_entry *next;
121 % * cms_enumerate_calendar_attr_res
123 % * If stat is CSA_SUCCESS, names contains an array of names.
125 struct cms_enumerate_calendar_attr_res {
126 CSA_return_code stat;
127 CSA_uint32 num_names;
128 cms_attr_name *names;
134 % * cms_list_calendars_res
136 % * If stat is CSA_SUCCESS, names contains an array of names.
138 struct cms_list_calendars_res {
139 CSA_return_code stat;
140 CSA_uint32 num_names;
147 % * cms_open_args - used by CMS_OPEN_CALENDAR
149 struct cms_open_args {
157 % * cms_open_res - returned by CMS_OPEN_CALENDAR
159 % * If stat is DtCm_OK,
160 % * svr_vers contains the version number of the server,
161 % * file_vers contains the version number of the callog file,
162 % * user_access is the calling user's access right to the calendar
163 % * num_attrs indicates the size of the array pointed to by attrs,
164 % * and attrs contains an array of calendar attributes.
166 struct cms_open_res {
167 CSA_return_code stat;
171 CSA_uint32 num_attrs;
172 cms_attribute *attrs;
178 % * cms_create_args - used by CMS_CREATE_CALENDAR
180 struct cms_create_args {
184 CSA_uint32 num_attrs;
185 cms_attribute *attrs;
191 % * cms_remove_args - used by CMS_REMOVE_CALENDAR
193 struct cms_remove_args {
201 % * cms_register_args - used by CMS_REGISTER and CMS_UNREGISTER
203 struct cms_register_args {
215 % * cms_get_cal_attr_res - used by CMS_GET_CALENDAR_ATTR
217 % * If stat is CSA_SUCCESS, attrs contains an array of attributes.
219 struct cms_get_cal_attr_res {
220 CSA_return_code stat;
221 CSA_uint32 num_attrs;
222 cms_attribute *attrs;
228 % * cms_get_cal_attr_args - used by CMS_GET_CALENDAR_ATTR
230 struct cms_get_cal_attr_args {
232 CSA_uint32 num_names;
233 cms_attr_name *names;
239 % * cms_set_cal_attr_args - used by CMS_SET_CALENDAR_ATTR
241 struct cms_set_cal_attr_args {
244 CSA_uint32 num_attrs;
245 cms_attribute *attrs;
251 % * cms_archive_res - used by CMS_ARCHIVE
253 % * If stat is CSA_SUCCESS, data contains the data to be archived
255 struct cms_archive_res {
256 CSA_return_code stat;
263 % * cms_archive_args - used by CMS_ARCHIVE
265 struct cms_archive_args {
269 CSA_uint32 num_attrs;
270 cms_attribute *attrs;
277 % * cms_restore_args - used by CMS_RESTORE
279 struct cms_restore_args {
283 CSA_uint32 num_attrs;
284 cms_attribute *attrs;
293 struct cms_reminder_ref {
294 buffer reminder_name;
298 struct cms_reminder_ref *next;
304 % * cms_reminder_res - used by CMS_LOOKUP_REMINDER
306 % * If stat is CSA_SUCCESS, rems contains an array of reminders.
308 struct cms_reminder_res {
309 CSA_return_code stat;
310 cms_reminder_ref *rems;
316 % * cms_reminder_args - used by CMS_LOOKUP_REMINDER
318 struct cms_reminder_args {
321 CSA_uint32 num_names;
322 cms_attr_name *names;
330 % * If stat is CSA_SUCCESS, entries contains an array of entries.
332 struct cms_entries_res {
333 CSA_return_code stat;
340 % * cms_lookup_entries_args - used by CMS_LOOKUP_ENTRIES
342 struct cms_lookup_entries_args {
345 CSA_uint32 num_attrs;
346 cms_attribute *attrs;
353 % * cms_enumerate_args - used by CMS_ENUERATE_SEQUENCE
355 struct cms_enumerate_args {
364 % * If stat is CSA_SUCCESS, attrs contains an array of
367 struct cms_get_entry_attr_res_item {
368 CSA_return_code stat;
370 CSA_uint32 num_attrs;
371 cms_attribute *attrs;
372 struct cms_get_entry_attr_res_item *next;
378 % * cms_get_entry_attr_res - used by CMS_GET_ENTRY_ATTR
380 % * If stat is CSA_SUCCESS, entries contains an array of
381 % * cms_get_entry_attr_res_item structures.
383 struct cms_get_entry_attr_res {
384 CSA_return_code stat;
385 cms_get_entry_attr_res_item *entries;
391 % * cms_get_entry_attr_args - used by CMS_GET_ENTRY_ATTR
393 struct cms_get_entry_attr_args {
397 CSA_uint32 num_names;
398 cms_attr_name *names;
406 % * If stat is CSA_SUCCESS, entry points to an entry.
408 struct cms_entry_res {
409 CSA_return_code stat;
416 % * cms_insert_args - used by CMS_INSERT_ENTRY
418 struct cms_insert_args {
421 CSA_uint32 num_attrs;
422 cms_attribute *attrs;
428 % * cms_update_args - used by CMS_UPDATE_ENTRY
430 struct cms_update_args {
435 CSA_uint32 num_attrs;
436 cms_attribute *attrs;
442 % * cms_delete_args - used by CMS_DELETE_ENTRY
444 struct cms_delete_args {
455 /* RPC Language description of the calendar protocol */
462 * List all calendars supported by the server.
464 cms_list_calendars_res
465 CMS_LIST_CALENDARS(void) = 1;
468 * Check existence of the calendar.
469 * Names and tags of all calendar attribute
473 CMS_OPEN_CALENDAR(cms_open_args) = 2;
476 * Create a calendar and initialize it with
477 * the given attributes.
480 CMS_CREATE_CALENDAR(cms_create_args) = 3;
483 * Remove the calendar.
486 CMS_REMOVE_CALENDAR(cms_remove_args) = 4;
489 * Register client for callbacks.
492 CMS_REGISTER(cms_register_args) = 5;
495 * Unregister the client.
498 CMS_UNREGISTER(cms_register_args) = 6;
501 * Enumerate all calendar attributes.
503 cms_enumerate_calendar_attr_res
504 CMS_ENUMERATE_CALENDAR_ATTR(cms_name) = 7;
507 * Get calendar attribute values.
510 CMS_GET_CALENDAR_ATTR(cms_get_cal_attr_args) = 8;
513 * Set calendar attribute values.
516 CMS_SET_CALENDAR_ATTR(cms_set_cal_attr_args) = 9;
519 * Get data to be archived.
522 CMS_ARCHIVE(cms_archive_args) = 10;
525 * Restore data to the calendar.
528 CMS_RESTORE(cms_restore_args) = 11;
531 * Lookup reminders relative to the given tick.
534 CMS_LOOKUP_REMINDER(cms_reminder_args) = 12;
537 * Lookup entries that match the given criteria.
538 * Attribute values of predefined attributes are returned.
539 * For other attributes, only the names are
540 * returned but not the values.
543 CMS_LOOKUP_ENTRIES(cms_lookup_entries_args) = 13;
546 * Lookup instances of a repeating entry
547 * The attribute list specify the entry
548 * id and a time range.
549 * If the entry repeats indefinitely,
550 * the time range is mandatory.
553 CMS_ENUMERATE_SEQUENCE(cms_enumerate_args) = 14;
556 * Get entry attribute values.
558 cms_get_entry_attr_res
559 CMS_GET_ENTRY_ATTR(cms_get_entry_attr_args) = 15;
565 CMS_INSERT_ENTRY(cms_insert_args) = 16;
571 CMS_UPDATE_ENTRY(cms_update_args) = 17;
577 CMS_DELETE_ENTRY(cms_delete_args) = 18;