Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / csa / table.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: table.h /main/1 1996/04/21 19:24:49 drk $ */
24 /*
25  *  (c) Copyright 1993, 1994 Hewlett-Packard Company
26  *  (c) Copyright 1993, 1994 International Business Machines Corp.
27  *  (c) Copyright 1993, 1994 Novell, Inc.
28  *  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
29  */
30
31 #ifndef _TABLE_H
32 #define _TABLE_H
33
34 #include <EUSCompat.h>
35 #include "ansi_c.h"
36 #include "cm.h"
37 #include "rtable4.h"
38 #include "entry.h"
39 #include "connection.h"
40
41 /*
42  *  Interface to rpc calls of version 2-4
43  */
44
45 extern CSA_return_code _DtCm_table_create P((Calendar *cal));
46
47 extern CSA_return_code _DtCm_table_get_access P((
48                                 Calendar *cal,
49                                 cms_access_entry **acclist));
50
51 extern CSA_return_code _DtCm_table_set_access P((
52                                 Calendar *cal,
53                                 CSA_access_list alist));
54
55 extern CSA_return_code _DtCm_table_lookup_reminder P((
56                                 Calendar *cal,
57                                 CSA_uint32 num_names,
58                                 char **reminder_names,
59                                 CSA_uint32 *num_rems,
60                                 CSA_reminder_reference **rems));
61
62 extern CSA_return_code _DtCm_table_lookup_range P((
63                                 Calendar        *cal,
64                                 long            start1,
65                                 long            start2,
66                                 boolean_t       no_end_time_range,
67                                 long            end1,
68                                 long            end2,
69                                 long            id,
70                                 uint            num_attrs,
71                                 cms_attribute   *attrs,
72                                 CSA_enum        *ops,
73                                 _DtCm_libentry  **appts));
74
75 extern CSA_return_code _DtCm_table_lookup P((
76                                 Calendar *cal,
77                                 _DtCm_libentry *entry));
78
79 /*
80  * This routine looks up events of a repeating sequence.
81  * The caller either specifies entry and elist_r or
82  * id and key. 
83  * If entry is specified, events are converted to cms_entry structures
84  * and returned in elist_r, otherwise; the caller is interested only
85  * in the key of the first entry which will be returned in the cms_key
86  * structure pointed to by key.
87  */
88 extern CSA_return_code _DtCm_table_lookup_key_range P((
89                                 Calendar *cal,
90                                 _DtCm_libentry *entry,
91                                 long id,
92                                 time_t start,
93                                 time_t end,
94                                 cms_key *key,
95                                 _DtCm_libentry **elist_r));
96
97 extern CSA_return_code _DtCm_table_insert P((
98                                 Calendar *cal,
99                                 uint num_attrs,
100                                 CSA_attribute * attrs,
101                                 _DtCm_libentry **entries));
102
103 extern CSA_return_code _DtCm_table_delete P((
104                                 Calendar *cal,
105                                 _DtCm_libentry *entry,
106                                 CSA_enum scope));
107
108 extern CSA_return_code _DtCm_table_update P((
109                                 Calendar *cal,
110                                 _DtCm_libentry *oentry,
111                                 uint num_attrs,
112                                 CSA_attribute * attrs,
113                                 CSA_enum scope,
114                                 _DtCm_libentry **nentry));
115
116 extern CSA_return_code _DtCm_table_size P((
117                                 Calendar *cal,
118                                 int *size));
119
120 extern CSA_return_code _DtCm_table_unregister_target P((
121                                 _DtCm_Connection *conn,
122                                 char *cal));
123
124 extern CSA_return_code _DtCm_table_register_target P((
125                                 _DtCm_Connection *conn,
126                                 char *cal));
127
128 #endif