cmcb.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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: cmcb.h /main/1 1996/04/21 19:21:59 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 _CMCB_H
  31. #define _CMCB_H
  32. #ifndef SunOS
  33. #include <rpc/types.h>
  34. #endif
  35. #include <rpc/rpc.h>
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. #include "csa.h"
  40. #include "cm.h"
  41. /*
  42. * cal_attr_data - contain names of calendar attributes updated
  43. */
  44. struct cmcb_cal_attr_data {
  45. u_int num_names;
  46. cms_name *names;
  47. };
  48. typedef struct cmcb_cal_attr_data cmcb_cal_attr_data;
  49. /*
  50. * add_entry_data - contain information of the deleted entry
  51. */
  52. struct cmcb_add_entry_data {
  53. char *id;
  54. };
  55. typedef struct cmcb_add_entry_data cmcb_add_entry_data;
  56. /*
  57. * delete_entry_data - contain information of the deleted entry
  58. */
  59. struct cmcb_delete_entry_data {
  60. char *id;
  61. int scope;
  62. long time;
  63. };
  64. typedef struct cmcb_delete_entry_data cmcb_delete_entry_data;
  65. /*
  66. * update_entry_data - contain information of the updated entry
  67. * if new entry id is not resulted from the update, oldid will be
  68. * set to a NULL string ("").
  69. */
  70. struct cmcb_update_entry_data {
  71. char *newid;
  72. char *oldid;
  73. int scope;
  74. long time;
  75. };
  76. typedef struct cmcb_update_entry_data cmcb_update_entry_data;
  77. /*
  78. * update_data - contains the update reason and specific information
  79. * about the update. No additional data is provided for CSA_CALENDAR_LOGON,
  80. * CSA_CALENDAR_DELETED, and CSA_CALENDAR_ATTRIBUTE_UPDATED
  81. */
  82. struct cmcb_update_data {
  83. int reason;
  84. union {
  85. cmcb_cal_attr_data *cdata; /* data for cal attrs update */
  86. cmcb_add_entry_data *adata; /* data for CSA_ENTRY_ADDED */
  87. cmcb_delete_entry_data *ddata; /* data for CSA_ENTRY_DELETED */
  88. cmcb_update_entry_data *udata; /* data for CSA_ENTRY_UPDATED */
  89. } data;
  90. };
  91. typedef struct cmcb_update_data cmcb_update_data;
  92. struct cmcb_update_callback_args {
  93. char *calendar;
  94. char *user;
  95. cmcb_update_data data;
  96. };
  97. typedef struct cmcb_update_callback_args cmcb_update_callback_args;
  98. #define AGENTVERS_2 ((unsigned long)(2))
  99. #if defined(__STDC__) || defined(__cplusplus)
  100. #define CMCB_UPDATE_CALLBACK ((unsigned long)(1))
  101. extern void * cmcb_update_callback_2(cmcb_update_callback_args *, CLIENT *);
  102. extern void * cmcb_update_callback_2_svc(cmcb_update_callback_args *, struct svc_req *);
  103. extern int agentprog_2_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
  104. #else /* K&R C */
  105. #define CMCB_UPDATE_CALLBACK ((unsigned long)(1))
  106. extern void * cmcb_update_callback_2();
  107. extern void * cmcb_update_callback_2_svc();
  108. extern int agentprog_2_freeresult();
  109. #endif /* K&R C */
  110. /* the xdr functions */
  111. #if defined(__STDC__) || defined(__cplusplus)
  112. extern bool_t xdr_cmcb_cal_attr_data(XDR *, cmcb_cal_attr_data*);
  113. extern bool_t xdr_cmcb_add_entry_data(XDR *, cmcb_add_entry_data*);
  114. extern bool_t xdr_cmcb_delete_entry_data(XDR *, cmcb_delete_entry_data*);
  115. extern bool_t xdr_cmcb_update_entry_data(XDR *, cmcb_update_entry_data*);
  116. extern bool_t xdr_cmcb_update_data(XDR *, cmcb_update_data*);
  117. extern bool_t xdr_cmcb_update_callback_args(XDR *, cmcb_update_callback_args*);
  118. #else /* K&R C */
  119. extern bool_t xdr_cmcb_cal_attr_data();
  120. extern bool_t xdr_cmcb_add_entry_data();
  121. extern bool_t xdr_cmcb_delete_entry_data();
  122. extern bool_t xdr_cmcb_update_entry_data();
  123. extern bool_t xdr_cmcb_update_data();
  124. extern bool_t xdr_cmcb_update_callback_args();
  125. #endif /* K&R C */
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #ifdef HPUX
  130. #undef hpux
  131. #define hpux
  132. #endif
  133. #endif