1 /* $XConsortium: rtable2.x /main/1 1996/04/21 19:24:30 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_2<>;
24 single_2, daily_2, weekly_2, biweekly_2, monthly_2, yearly_2,
25 nthWeekday_2, everyNthDay_2, everyNthWeek_2,
26 everyNthMonth_2, otherPeriod_2
30 appointment_2, reminder_2, otherTag_2
34 struct Attribute_2 *next;
38 typedef Attribute_2 *Attr_2;
42 struct Except_2 *next;
44 typedef Except_2 *Exception_2;
47 time_t tick; /* user specified time stored as GMT */
48 long key; /* system assigned id */
57 struct Id_2 appt_id; /* appointment/repeater id */
58 Tag_2 tag; /* appointment or otherTag */
59 int duration; /* appt duration in seconds */
60 int ntimes; /* n repeat times (0 .. forever) */
61 Buffer_2 what; /* text of appointment */
62 Buffer_2 mailto; /* addressee of mail reminder */
63 Buffer_2 script; /* text of unix script for script reminder */
64 Period_2 period; /* periodicity of event: single default */
65 Buffer_2 author; /* user who inserted the appt */
66 Buffer_2 client_data; /* TBD. */
67 struct Except_2 *exception; /* list of exceptions to repeating events */
68 struct Attribute_2 *attr; /* list of reminder attributes */
69 struct Appt_2 *next; /* next appointment */
77 struct Abb_Appt_2 *next;
81 struct Id_2 *oid; /* old appt key */
82 struct Appt_2 *new_appt; /* new appt */
86 struct Id_2 appt_id; /* actual appt. key */
87 long tick; /* the happening tick */
88 Attribute_2 attr; /* (attr, value) */
89 struct Reminder_2 *next;
93 enum Table_Res_Type_2 {AP_2, RM_2, AB_2, ID_2};
95 union Table_Res_List_2 switch (Table_Res_Type_2 tag) {
108 enum Access_Status_2 {
119 Access_Status_2 status;
120 Table_Res_List_2 res;
123 %#define access_none_2 0x0 /* owner only */
124 %#define access_read_2 0x1
125 %#define access_write_2 0x2
126 %#define access_delete_2 0x4
127 %#define access_exec_2 0x8 /* execution permission is a hack! */
128 %#define VOIDPID -1 /* pre-V3 tools do present pids */
130 struct Access_Entry_2 {
132 int access_type; /* Bit mask from access_read,write,delete */
133 Access_Entry_2 *next;
136 struct Access_Args_2 {
138 Access_Entry_2 *access_list;
142 long key1; /* lower bound tick */
143 long key2; /* upper bound tick */
144 struct Range_2 *next;
147 enum Table_Args_Type_2 {TICK_2, APPTID_2, UID_2, APPT_2, RANGE_2};
149 union Args_2 switch (Table_Args_Type_2 tag) {
162 struct Table_Args_2 {
167 struct Registration_2 {
172 struct Registration_2 *next;
175 enum Table_Status_2 {ok_2, duplicate_2, badtable_2, notable_2, denied_2, other_2};
176 enum Registration_Status_2 {registered_2, failed_2, deregistered_2, confused_2};
179 version TABLEVERS_2 {
180 void rtable_ping(void) = 0;
181 Table_Res_2 rtable_lookup(Table_Args_2) = 1;
182 Table_Res_2 rtable_lookup_next_larger(Table_Args_2) = 2;
183 Table_Res_2 rtable_lookup_next_smaller(Table_Args_2) = 3;
184 Table_Res_2 rtable_lookup_range(Table_Args_2) = 4;
185 Table_Res_2 rtable_abbreviated_lookup_range(Table_Args_2) = 5;
186 Table_Res_2 rtable_insert(Table_Args_2) = 6;
187 Table_Res_2 rtable_delete(Table_Args_2) = 7;
188 Table_Res_2 rtable_delete_instance(Table_Args_2) = 8;
189 Table_Res_2 rtable_change(Table_Args_2) = 9;
190 Table_Res_2 rtable_change_instance(Table_Args_2) = 10;
191 Table_Res_2 rtable_lookup_next_reminder(Table_Args_2) = 11;
192 Table_Status_2 rtable_check(Table_Args_2) = 12;
193 Table_Status_2 rtable_flush_table(Table_Args_2) = 13;
194 int rtable_size(Table_Args_2) = 14;
195 Registration_Status_2 register_callback(Registration_2) = 15;
196 Registration_Status_2 deregister_callback(Registration_2) = 16;
197 Access_Status_2 rtable_set_access(Access_Args_2) = 17;
198 Access_Args_2 rtable_get_access(Access_Args_2) = 18;