entry.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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: entry.h /main/1 1996/04/21 19:23:13 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 _ENTRY_H
  31. #define _ENTRY_H
  32. /*
  33. * This file contains the internal data structure of entries.
  34. */
  35. #include <EUSCompat.h>
  36. #include "ansi_c.h"
  37. #include "cm.h"
  38. #include "calendar.h"
  39. #include "rtable4.h"
  40. typedef struct _libentry {
  41. void *handle; /* for sanity check */
  42. Calendar *cal; /* associated calendar */
  43. cms_entry *e;
  44. boolean_t filled;
  45. struct _libentry *next;
  46. struct _libentry *prev;
  47. } _DtCm_libentry;
  48. /* function prototypes */
  49. extern _DtCm_libentry *_DtCm_get_libentry(CSA_entry_handle entryh);
  50. extern CSA_return_code _DtCm_make_libentry(
  51. cms_entry *cmsentry,
  52. _DtCm_libentry **entry_r);
  53. extern CSA_return_code _DtCm_get_entry_detail(_DtCm_libentry *entry);
  54. extern CSA_return_code _DtCm_get_entry_attr_names(
  55. _DtCm_libentry *entry,
  56. CSA_uint32 *num_names_r,
  57. char **names_r[]);
  58. extern CSA_return_code _DtCm_get_entry_attrs_by_name(
  59. _DtCm_libentry *entry,
  60. CSA_uint32 num_names,
  61. CSA_attribute_reference *names,
  62. CSA_uint32 *num_attrs,
  63. CSA_attribute **attrs);
  64. extern CSA_return_code _DtCm_get_all_entry_attrs(
  65. _DtCm_libentry *entry,
  66. CSA_uint32 *num_attrs,
  67. CSA_attribute **attrs);
  68. extern CSA_return_code _DtCm_libentry_to_entryh(
  69. _DtCm_libentry *elist,
  70. CSA_uint32 *size,
  71. CSA_entry_handle **entries_r);
  72. extern CSA_return_code _DtCmCmsentriesToLibentries(
  73. _DtCmNameTable **tbl,
  74. cms_entry *entries,
  75. _DtCm_libentry **libentries);
  76. extern CSA_return_code _DtCm_appt4_to_libentries(
  77. char *calname,
  78. Appt_4 *appt4,
  79. _DtCm_libentry **libentries);
  80. extern CSA_return_code _DtCm_libentries_to_appt4(
  81. _DtCm_libentry *libentries,
  82. Appt_4 **appt4);
  83. extern CSA_return_code _DtCm_reminder4_to_csareminder(
  84. Reminder_4 *r4,
  85. CSA_uint32 *num_rems,
  86. CSA_reminder_reference **rems);
  87. extern _DtCm_libentry *_DtCm_convert_entry_wheader(_DtCm_libentry *entry);
  88. extern void _DtCm_free_libentries_from_list(
  89. _DtCm_libentry *head,
  90. _DtCm_libentry *tail);
  91. extern void _DtCm_free_libentries(_DtCm_libentry *entries);
  92. extern void _DtCm_free_entry_handles(
  93. uint num_entries,
  94. CSA_entry_handle *entries);
  95. extern void _DtCm_free_reminder_references(
  96. uint num_rems,
  97. CSA_reminder_reference *rems);
  98. extern void _DtCm_free_entry_content(uint dummy, _DtCm_libentry *entry);
  99. extern CSA_return_code _DtCm_cms2csa_reminder_ref(
  100. cms_reminder_ref *cmsrems,
  101. CSA_uint32 *num_rems,
  102. CSA_reminder_reference **csarems);
  103. #endif