1 /* $XConsortium: rtable4.x /main/1 1996/04/21 19:24:43 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 %#include "connection.h"
17 typedef string Buffer_4<>;
20 single_4, daily_4, weekly_4, biweekly_4, monthly_4, yearly_4,
21 nthWeekday_4, everyNthDay_4, everyNthWeek_4,
22 everyNthMonth_4, otherPeriod_4,
23 monThruFri_4, monWedFri_4, tueThur_4, daysOfWeek_4
33 appointment_4, reminder_4, otherTag_4, holiday_4, toDo_4
37 do_all_4, do_one_4, do_forward_4
42 int showtime; /* Advisory for formatting time */
46 enum Privacy_Level_4 {
47 public_4, private_4, semiprivate_4
51 struct Attribute_4 *next;
56 typedef Attribute_4 *Attr_4;
60 struct Except_4 *next;
62 typedef Except_4 *Exception_4;
65 time_t tick; /* user specified time stored as GMT */
66 long key; /* system assigned id */
75 active_4, pendingAdd_4, pendingDelete_4, committed_4,
76 cancelled_4, completed_4
80 struct Id_4 appt_id; /* appointment/repeater id */
81 struct Tag_4 *tag; /* event type & advisory time display */
82 int duration; /* appt duration in seconds */
83 int ntimes; /* n repeat times (0 .. forever) */
84 Buffer_4 what; /* text of appointment */
85 struct Period_4 period; /* periodicity of event: single default */
86 Buffer_4 author; /* user who inserted the appt */
87 Buffer_4 client_data; /* TBD. */
88 struct Except_4 *exception; /* list of exceptions to repeating events */
89 struct Attribute_4 *attr; /* list of reminder attributes */
90 Appt_Status_4 appt_status;
91 Privacy_Level_4 privacy;
92 struct Appt_4 *next; /* next appointment */
100 struct Period_4 period;
101 struct Abb_Appt_4 *next;
102 Appt_Status_4 appt_status;
103 Privacy_Level_4 privacy;
107 struct Id_4 *oid; /* old appt key */
108 struct Appt_4 *new_appt; /* new appt */
113 struct Id_4 appt_id; /* actual appt. key */
114 time_t tick; /* the happening tick */
115 Attribute_4 attr; /* (attr, value) */
116 struct Reminder_4 *next;
119 enum Table_Res_Type_4 {AP_4, RM_4, AB_4, ID_4};
121 union Table_Res_List_4 switch (Table_Res_Type_4 tag) {
134 enum Access_Status_4 {
143 access_notsupported_4,
148 Access_Status_4 status;
149 Table_Res_List_4 res;
152 %#define access_none_4 0x0 /* owner only */
153 %#define access_read_4 0x1
154 %#define access_write_4 0x2
155 %#define access_delete_4 0x4
156 %#define access_exec_4 0x8 /* execution permission is a hack! */
157 %#define WORLD "world" /* special user */
159 struct Access_Entry_4 {
161 int access_type; /* Bit mask from access_read,write,delete */
162 Access_Entry_4 *next;
165 struct Access_Args_4 {
167 Access_Entry_4 *access_list;
171 long key1; /* lower bound tick */
172 long key2; /* upper bound tick */
173 struct Range_4 *next;
177 long key; /* key of appt */
178 time_t tick1; /* lower bound tick */
179 time_t tick2; /* upper bound tick */
180 struct Keyrange_4 *next;
186 struct Uidopt_4 *next;
189 enum Table_Args_Type_4 {TICK_4, APPTID_4, UID_4, APPT_4, RANGE_4,
190 KEYRANGE_4, UIDOPT_4};
192 union Args_4 switch (Table_Args_Type_4 tag) {
204 Keyrange_4 *keyrange;
209 struct Table_Args_4 {
215 struct Registration_4 {
220 struct Registration_4 *next;
224 struct Table_Op_Args_4 {
229 enum Table_Status_4 {ok_4, duplicate_4, badtable_4, notable_4, denied_4,
230 other_4, tbl_not_owner_4, tbl_exist_4, tbl_notsupported_4};
231 enum Registration_Status_4 {registered_4, failed_4, deregistered_4,
232 confused_4, reg_notable_4};
236 % * rtable_delete and rtable_change take over the functionality of
237 % * rtable_delete_instance and rtable_change_instance repectively.
238 % * rtable_delete_instance and rtable_change_instance are now dummy
239 % * routines exist for backward compatibility purpose and return
240 % * access_notsupported.
243 version TABLEVERS_4 {
244 void rtable_ping(void)=0;
245 Table_Res_4 rtable_lookup(Table_Args_4) = 1;
246 Table_Res_4 rtable_lookup_next_larger(Table_Args_4) = 2;
247 Table_Res_4 rtable_lookup_next_smaller(Table_Args_4) = 3;
248 Table_Res_4 rtable_lookup_range(Table_Args_4) = 4;
249 Table_Res_4 rtable_abbreviated_lookup_range(Table_Args_4) = 5;
250 Table_Res_4 rtable_insert(Table_Args_4) = 6;
251 Table_Res_4 rtable_delete(Table_Args_4) = 7;
252 Table_Res_4 rtable_delete_instance(Table_Args_4) = 8;
253 Table_Res_4 rtable_change(Table_Args_4) = 9;
254 Table_Res_4 rtable_change_instance(Table_Args_4) = 10;
255 Table_Res_4 rtable_lookup_next_reminder(Table_Args_4) = 11;
256 Table_Status_4 rtable_check(Table_Args_4) = 12;
257 Table_Status_4 rtable_flush_table(Table_Args_4) = 13;
258 int rtable_size(Table_Args_4) = 14;
259 Registration_Status_4 register_callback(Registration_4) = 15;
260 Registration_Status_4 deregister_callback(Registration_4) = 16;
261 Access_Status_4 rtable_set_access(Access_Args_4) = 17;
262 Access_Args_4 rtable_get_access(Access_Args_4) = 18;
263 Table_Res_4 rtable_abbreviated_lookup_key_range(Table_Args_4) = 19;
264 long rtable_gmtoff(void) = 20;
265 Table_Status_4 rtable_create(Table_Op_Args_4) = 21;
266 Table_Status_4 rtable_remove(Table_Op_Args_4) = 22;
267 Table_Status_4 rtable_rename(Table_Op_Args_4) = 23;