home *** CD-ROM | disk | FTP | other *** search
/ Oracle Video Server 3.0.3.1 / OVS_3031_NT.iso / win32 / medianet / server / include / yodefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-09-18  |  5.3 KB  |  188 lines

  1. /* Copyright (c) 1995 by Oracle Corporation.  All Rights Reserved.
  2.  *
  3.  * yodefs.h - Oracle OMX Object Layer Stub Support
  4.  */
  5.  
  6. #ifndef YODEFS_ORACLE
  7. #define YODEFS_ORACLE
  8.  
  9. #ifndef SYSX_ORACLE
  10. #include <sysx.h>
  11. #endif
  12. #ifndef YS_ORACLE
  13. #include <ys.h>
  14. #endif
  15.  
  16. #ifndef YOTK_ORACLE
  17. #include <yotk.h>
  18. #endif
  19.  
  20. EXTC_START
  21.  
  22. #ifndef CORBA_Object_delcared
  23. #define CORBA_Object_delcared
  24. typedef dvoid  *CORBA_Object;
  25. #endif
  26.  
  27. typedef struct yoevm yoevm;
  28.  
  29. /* Environment */
  30. struct yoenv
  31. {
  32.   ub4 _maximum;
  33.   ub4 _length;
  34.   yoevm *_buffer;
  35. };
  36. typedef    struct yoenv yoenv;
  37.  
  38. typedef struct yocur yocur;
  39.  
  40. typedef struct CosTransactions_PropagationContext
  41.             CosTransactions_PropagationContext;
  42.  
  43. /*
  44.  * Pre-defined Sequences
  45.  */
  46. typedef struct {
  47.   ub4 _maximum; ub4 _length; sb2 *_buffer;
  48. } YCIDL_sequence_sb2;
  49.  
  50. typedef struct {
  51.   ub4 _maximum; ub4 _length; sb4 *_buffer;
  52. } YCIDL_sequence_sb4;
  53.  
  54. typedef struct {
  55.   ub4 _maximum; ub4 _length; ub2 *_buffer;
  56. } YCIDL_sequence_ub2;
  57.  
  58. typedef struct {
  59.   ub4 _maximum; ub4 _length; ub4 *_buffer;
  60. } YCIDL_sequence_ub4;
  61.  
  62. typedef struct {
  63.   ub4 _maximum; ub4 _length; boolean *_buffer;
  64. } YCIDL_sequence_boolean;
  65.  
  66. typedef struct {
  67.   ub4 _maximum; ub4 _length; char *_buffer;
  68. } YCIDL_sequence_char;
  69.  
  70. typedef struct {
  71.   ub4 _maximum; ub4 _length; ub1 *_buffer;
  72. } YCIDL_sequence_ub1;
  73.  
  74. typedef struct {
  75.   ub4 _maximum; ub4 _length; yoany *_buffer;
  76. } YCIDL_sequence_yoany;
  77.  
  78. typedef struct {
  79.   ub4 _maximum; ub4 _length; char * *_buffer;
  80. } YCIDL_sequence_string;
  81.  
  82. typedef struct {
  83.   ub4 _maximum; ub4 _length; sysb8 *_buffer;
  84. } YCIDL_sequence_sysb8;
  85.  
  86. typedef struct {
  87.   ub4 _maximum; ub4 _length; yotk * *_buffer;
  88. } YCIDL_sequence_TypeCode;
  89.  
  90. /* typecodes for predefined sequences */
  91. CONST yotk *yoTc_seq_sb2_getTC(void);
  92. CONST yotk *yoTc_seq_sb4_getTC(void);
  93. CONST yotk *yoTc_seq_ub2_getTC(void);
  94. CONST yotk *yoTc_seq_ub4_getTC(void);
  95. CONST yotk *yoTc_seq_boolean_getTC(void);
  96. CONST yotk *yoTc_seq_char_getTC(void);
  97. CONST yotk *yoTc_seq_ub1_getTC(void);
  98. CONST yotk *yoTc_seq_yoany_getTC(void);
  99. CONST yotk *yoTc_seq_TypeCode_getTC(void);
  100. CONST yotk *yoTc_seq_string_getTC(void);
  101. CONST yotk *yoTc_seq_sysb8_getTC(void);
  102.  
  103. #define YCTC_YCIDL_sequence_sb2         yoTc_seq_sb2_getTC()
  104. #define YCTC_YCIDL_sequence_sb4         yoTc_seq_sb4_getTC()
  105. #define YCTC_YCIDL_sequence_ub2         yoTc_seq_ub2_getTC()
  106. #define YCTC_YCIDL_sequence_ub4         yoTc_seq_ub4_getTC()
  107. #define YCTC_YCIDL_sequence_boolean     yoTc_seq_boolean_getTC()
  108. #define YCTC_YCIDL_sequence_char        yoTc_seq_char_getTC()
  109. #define YCTC_YCIDL_sequence_ub1         yoTc_seq_ub1_getTC()
  110. #define YCTC_YCIDL_sequence_yoany       yoTc_seq_yoany_getTC()
  111. #define YCTC_YCIDL_sequence_TypeCode    yoTc_seq_TypeCode_getTC()
  112. #define YCTC_YCIDL_sequence_string      yoTc_seq_string_getTC()
  113. #define YCTC_YCIDL_sequence_sysb8       yoTc_seq_sysb8_getTC()
  114.  
  115. /*
  116.  * PRIVATE DECLARATIONS
  117.  */
  118. typedef struct yopar yopar;
  119.  
  120. #define YOMODE_INVALID 0
  121. #define YOMODE_RETURN  1
  122. #define YOMODE_IN      2
  123. #define YOMODE_OUT     3
  124. #define YOMODE_INOUT   4
  125. #define YOMODE_EXCEPT  5
  126.  
  127. /* DISABLE check_naming */
  128. struct yopar
  129. {
  130.   sb4    mode;                                    /* return, in, out, in/out */
  131.   yotk  *tk;                                                    /* type code */
  132.   ub4    sz;                                                 /* size of type */
  133. };
  134. /* ENABLE check_naming */
  135.  
  136. /*
  137.  * yoSendReq - send a request
  138.  *
  139.  * DESCRIPTION
  140.  * Sends a method request to the specified object reference.
  141.  * The or argument specifies the object reference to which the request is to
  142.  * be sent.  The op argument is the method to be invoked.  The response
  143.  * argument indicates if a response is expected from the implementation.  The
  144.  * uevt argument contains an event which will be triggered upon completion of
  145.  * the request.  args is the number of arguments to be passed to the method.
  146.  * pars specifies the types of the parameters for this method.  The values 
  147.  * parameter is an array of pointers to the parameter values for the method.
  148.  * Hence all parameter values are passed by reference.
  149.  *
  150.  * This function will be called primarily from client stubs which have been
  151.  * generated by the IDL compiler.  This function may also be used by those
  152.  * wishing to dynamically make method requests.
  153.  *
  154.  * This function will not block under any circumstances.  All results are
  155.  * returned via uevt.
  156.  */
  157. void yoSendReq(CONST dvoid *ref, yoenv *ev, CONST char *op, boolean response,
  158.                ysevt *uevt, sword args, CONST yopar *pars, dvoid **values);
  159.  
  160. /*
  161.  * yoParsSize - Size parameter descriptions
  162.  *
  163.  * DESCRIPTION
  164.  * Fills in the size field in the yopar structure with the proper machine
  165.  * dependant size based on the parameters typecode.  This function should only
  166.  * be called on parameter descriptions obtained from the IRF.  The IDL compiler
  167.  * normal fills in the size field.
  168.  */
  169. void yoParsSize(yopar *pars);
  170.  
  171. /* private for stubs */
  172. typedef void (*yogfp)(void);
  173. typedef yogfp (*yowiden)(ub4 op, dvoid *impldef, CONST ysid *intf);
  174. typedef struct yopard yopard;
  175. struct yopard
  176. {
  177.   CONST char *id;
  178.   yopar pars[1];
  179. };
  180.  
  181. dvoid *yoLocalObj(dvoid *ref, yowiden *widener);
  182. yopard *yoPardCreate(CONST char *id, ub4 cnt);
  183. void   yoParsSet(yopard *pd);
  184. yopar *yoParsGet(CONST char *id);
  185.  
  186. EXTC_END
  187. #endif /* YODEFS_ORACLE */
  188.