table.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 libraries 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. #ifndef _TABLE_H
  31. #define _TABLE_H
  32. #include <EUSCompat.h>
  33. #include "ansi_c.h"
  34. #include "cm.h"
  35. #include "rtable4.h"
  36. #include "entry.h"
  37. #include "connection.h"
  38. /*
  39. * Interface to rpc calls of version 2-4
  40. */
  41. extern CSA_return_code _DtCm_table_create(Calendar *cal);
  42. extern CSA_return_code _DtCm_table_get_access(
  43. Calendar *cal,
  44. cms_access_entry **acclist);
  45. extern CSA_return_code _DtCm_table_set_access(
  46. Calendar *cal,
  47. CSA_access_list alist);
  48. extern CSA_return_code _DtCm_table_lookup_reminder(
  49. Calendar *cal,
  50. CSA_uint32 num_names,
  51. char **reminder_names,
  52. CSA_uint32 *num_rems,
  53. CSA_reminder_reference **rems);
  54. extern CSA_return_code _DtCm_table_lookup_range(
  55. Calendar *cal,
  56. long start1,
  57. long start2,
  58. boolean_t no_end_time_range,
  59. long end1,
  60. long end2,
  61. long id,
  62. uint num_attrs,
  63. cms_attribute *attrs,
  64. CSA_enum *ops,
  65. _DtCm_libentry **appts);
  66. extern CSA_return_code _DtCm_table_lookup(
  67. Calendar *cal,
  68. _DtCm_libentry *entry);
  69. /*
  70. * This routine looks up events of a repeating sequence.
  71. * The caller either specifies entry and elist_r or
  72. * id and key.
  73. * If entry is specified, events are converted to cms_entry structures
  74. * and returned in elist_r, otherwise; the caller is interested only
  75. * in the key of the first entry which will be returned in the cms_key
  76. * structure pointed to by key.
  77. */
  78. extern CSA_return_code _DtCm_table_lookup_key_range(
  79. Calendar *cal,
  80. _DtCm_libentry *entry,
  81. long id,
  82. time_t start,
  83. time_t end,
  84. cms_key *key,
  85. _DtCm_libentry **elist_r);
  86. extern CSA_return_code _DtCm_table_insert(
  87. Calendar *cal,
  88. uint num_attrs,
  89. CSA_attribute * attrs,
  90. _DtCm_libentry **entries);
  91. extern CSA_return_code _DtCm_table_delete(
  92. Calendar *cal,
  93. _DtCm_libentry *entry,
  94. CSA_enum scope);
  95. extern CSA_return_code _DtCm_table_update(
  96. Calendar *cal,
  97. _DtCm_libentry *oentry,
  98. uint num_attrs,
  99. CSA_attribute * attrs,
  100. CSA_enum scope,
  101. _DtCm_libentry **nentry);
  102. extern CSA_return_code _DtCm_table_size(
  103. Calendar *cal,
  104. int *size);
  105. extern CSA_return_code _DtCm_table_unregister_target(
  106. _DtCm_Connection *conn,
  107. char *cal);
  108. extern CSA_return_code _DtCm_table_register_target(
  109. _DtCm_Connection *conn,
  110. char *cal);
  111. #endif