Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtcm / server / v4ops.h
1 /* $XConsortium: v4ops.h /main/4 1995/11/09 12:55:26 rswiston $ */
2 /*
3  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
4  *  (c) Copyright 1993, 1994 International Business Machines Corp.
5  *  (c) Copyright 1993, 1994 Novell, Inc.
6  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
7  */
8
9 #ifndef _V4OPS_H
10 #define _V4OPS_H
11
12 #include "ansi_c.h"
13 #include "rtable4.h"
14 #include "cm.h"
15 #include "log.h"
16 #include "cmscalendar.h"
17
18 #define is_appointment(p_appt)          ((p_appt)->period.period == single_4)
19 #define is_repeater(p_appt)             ((p_appt)->period.period != single_4)
20
21 typedef struct __DtCmsEntryId {
22         long id;
23         struct __DtCmsEntryId *next;
24 } _DtCmsEntryId;
25
26 extern CSA_return_code _DtCmsInsertAppt P((_DtCmsCalendar *cal, Appt_4 *appt4));
27
28 extern CSA_return_code _DtCmsDeleteAppt P((
29                         _DtCmsCalendar  *cal,
30                         char            *user,
31                         uint            access,
32                         Id_4            *p_key,
33                         Appt_4          **appt_r));
34
35 extern CSA_return_code _DtCmsDeleteApptAndLog P((
36                         _DtCmsCalendar  *cal,
37                         char            *user,
38                         uint            access,
39                         Id_4            *key,
40                         Appt_4          **oldappt));
41
42 extern CSA_return_code _DtCmsDeleteApptInstancesAndLog P((
43                         _DtCmsCalendar  *cal,
44                         char            *source,
45                         uint            access,
46                         Id_4            *key,
47                         Options_4       option,
48                         int             *remain,
49                         Appt_4          **oldappt));
50
51 extern CSA_return_code _DtCmsChangeAll P((
52                         _DtCmsCalendar  *cal,
53                         char            *source,
54                         uint            access,
55                         Id_4            *p_key,
56                         Appt_4          *newa,
57                         Appt_4          **oldappt));
58
59 extern CSA_return_code _DtCmsChangeSome P((
60                         _DtCmsCalendar  *cal,
61                         char            *source,
62                         uint            access,
63                         Id_4            *p_key,
64                         Appt_4          *p_appt,
65                         Options_4       option,
66                         Appt_4          **oldappt));
67
68 extern CSA_return_code _DtCmsInsertApptAndLog P((
69                         _DtCmsCalendar  *cal,
70                         Appt_4          *appt));
71
72 extern _DtCmsComparisonResult _DtCmsCompareAppt P((Id_4 *key, caddr_t data));
73
74 extern _DtCmsComparisonResult _DtCmsCompareRptAppt P((Id_4 *key, caddr_t data));
75
76 extern caddr_t _DtCmsGetApptKey P((caddr_t data));
77
78 extern CSA_return_code v4_transact_log P((
79                         char            *calendar,
80                         Appt_4          *a,
81                         _DtCmsLogOps    op));
82
83 extern CSA_return_code _DtCmsLookupRangeV4 P((
84                         _DtCmsCalendar  *cal,
85                         char            *user,
86                         uint            access,
87                         Range_4         *p_range,
88                         boolean_t       no_end_time_range,
89                         long            end1,
90                         long            end2,
91                         boolean_t       (*match_func)(),
92                         uint            num_attrs,
93                         cms_attribute   *attrs,
94                         CSA_enum        *ops,
95                         Appt_4          **appt_r,
96                         Abb_Appt_4      **abbr_r));
97
98 extern CSA_return_code _DtCmsLookupKeyrangeV4 P((
99                         _DtCmsCalendar  *cal,
100                         char            *user,
101                         uint            access,
102                         boolean_t       no_start_time_range,
103                         boolean_t       no_end_time_range,
104                         time_t          start1,
105                         time_t          start2,
106                         time_t          end1,
107                         time_t          end2,
108                         long            id,
109                         boolean_t       (*match_func)(),
110                         uint            num_attrs,
111                         cms_attribute   *attrs,
112                         CSA_enum        *ops,
113                         Appt_4          **appt_r,
114                         Abb_Appt_4      **abbr_r));
115
116 extern CSA_return_code _AddToLinkedAppts P((
117                         Appt_4  *p_appt,
118                         char    *user,
119                         uint    access,
120                         caddr_t *ilp));
121
122 extern CSA_return_code _AddToLinkedAbbrAppts P((
123                         Appt_4  *p_appt,
124                         char    *user,
125                         uint    access,
126                         caddr_t *ilp));
127
128 extern Privacy_Level_4 _GetAccessLevel P((
129                         char    *user,
130                         uint    access,
131                         Appt_4  *p_appt));
132
133 extern Appt_4 * _AddApptInOrder P((Appt_4 * head, Appt_4 * aptr));
134
135 extern Abb_Appt_4 * _AddAbbApptInOrder P((Abb_Appt_4 *head, Abb_Appt_4 *aptr));
136
137 extern CSA_return_code _DtCmsSetV4AccessListAndLog P((
138                         _DtCmsCalendar  *cal,
139                         Access_Entry_4  *alist));
140
141 extern CSA_return_code _DtCmsGetV4Reminders P((
142                         _DtCmsCalendar  *cal,
143                         long            tick,
144                         Reminder_4      **rem_r,
145                         _DtCmsEntryId   **ids_r));
146
147 extern void _DtCmsFreeEntryIds P((_DtCmsEntryId *ids));
148
149 extern CSA_return_code _DtCmsTruncateElist P((
150                         Appt_4          *parent_p,
151                         int             remain,
152                         Except_4        **excpt));
153
154 extern CSA_return_code _DtCmsSetV4AccessListInCal P((
155                         _DtCmsCalendar *cal,
156                         Access_Entry_4 *e));
157
158 #endif