Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / lib / csa / table.h
1 /* $XConsortium: table.h /main/1 1996/04/21 19:24:49 drk $ */
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 _TABLE_H
10 #define _TABLE_H
11
12 #include <EUSCompat.h>
13 #include "ansi_c.h"
14 #include "cm.h"
15 #include "rtable4.h"
16 #include "entry.h"
17 #include "connection.h"
18
19 /*
20  *  Interface to rpc calls of version 2-4
21  */
22
23 extern CSA_return_code _DtCm_table_create P((Calendar *cal));
24
25 extern CSA_return_code _DtCm_table_get_access P((
26                                 Calendar *cal,
27                                 cms_access_entry **acclist));
28
29 extern CSA_return_code _DtCm_table_set_access P((
30                                 Calendar *cal,
31                                 CSA_access_list alist));
32
33 extern CSA_return_code _DtCm_table_lookup_reminder P((
34                                 Calendar *cal,
35                                 CSA_uint32 num_names,
36                                 char **reminder_names,
37                                 CSA_uint32 *num_rems,
38                                 CSA_reminder_reference **rems));
39
40 extern CSA_return_code _DtCm_table_lookup_range P((
41                                 Calendar        *cal,
42                                 long            start1,
43                                 long            start2,
44                                 boolean_t       no_end_time_range,
45                                 long            end1,
46                                 long            end2,
47                                 long            id,
48                                 uint            num_attrs,
49                                 cms_attribute   *attrs,
50                                 CSA_enum        *ops,
51                                 _DtCm_libentry  **appts));
52
53 extern CSA_return_code _DtCm_table_lookup P((
54                                 Calendar *cal,
55                                 _DtCm_libentry *entry));
56
57 /*
58  * This routine looks up events of a repeating sequence.
59  * The caller either specifies entry and elist_r or
60  * id and key. 
61  * If entry is specified, events are converted to cms_entry structures
62  * and returned in elist_r, otherwise; the caller is interested only
63  * in the key of the first entry which will be returned in the cms_key
64  * structure pointed to by key.
65  */
66 extern CSA_return_code _DtCm_table_lookup_key_range P((
67                                 Calendar *cal,
68                                 _DtCm_libentry *entry,
69                                 long id,
70                                 time_t start,
71                                 time_t end,
72                                 cms_key *key,
73                                 _DtCm_libentry **elist_r));
74
75 extern CSA_return_code _DtCm_table_insert P((
76                                 Calendar *cal,
77                                 uint num_attrs,
78                                 CSA_attribute * attrs,
79                                 _DtCm_libentry **entries));
80
81 extern CSA_return_code _DtCm_table_delete P((
82                                 Calendar *cal,
83                                 _DtCm_libentry *entry,
84                                 CSA_enum scope));
85
86 extern CSA_return_code _DtCm_table_update P((
87                                 Calendar *cal,
88                                 _DtCm_libentry *oentry,
89                                 uint num_attrs,
90                                 CSA_attribute * attrs,
91                                 CSA_enum scope,
92                                 _DtCm_libentry **nentry));
93
94 extern CSA_return_code _DtCm_table_size P((
95                                 Calendar *cal,
96                                 int *size));
97
98 extern CSA_return_code _DtCm_table_unregister_target P((
99                                 _DtCm_Connection *conn,
100                                 char *cal));
101
102 extern CSA_return_code _DtCm_table_register_target P((
103                                 _DtCm_Connection *conn,
104                                 char *cal));
105
106 #endif