home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / request.idl < prev    next >
Text File  |  1996-12-24  |  6KB  |  184 lines

  1. /*
  2.  *    @(#) 2.28 src/somd/request.idl, somd, som3.0 9/26/96 14:02:11 [12/24/96 07:39:32]
  3.  */
  4. //
  5. //   COMPONENT_NAME: somd
  6. //
  7. //   ORIGINS: 27
  8. //
  9. //
  10. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  11. //   All Rights Reserved
  12. //   Licensed Materials - Property of IBM
  13. //   US Government Users Restricted Rights - Use, duplication or
  14. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  15. //
  16. //#  Request is a PUBLIC class derived from SOMObject.
  17. //
  18. //  The Request class implements the CORBA Request object.  The Request
  19. //  object is used by the Dynamic Invocation Interface to dynamically
  20. //  create and issue a request to a remote object.  Request objects are
  21. //  created by the create_request method in SOMObject.
  22.  
  23.  
  24. #ifndef request_idl
  25. #define request_idl
  26.  
  27. #include <somobj.idl>
  28. #include <somdtype.idl>
  29.  
  30.  
  31. interface Request : SOMObject
  32. {
  33.   ORBStatus add_arg(in Identifier name, in TypeCode arg_type, in void *value, 
  34.                     in long len, in Flags arg_flags);
  35.   
  36.   // Incrementally adds an arg to the Request.
  37.   // The Request must have been created using the "create_request"
  38.   // method, with an empty argument list.  (We can't add args to a
  39.   // list that was passed in to the create_request call. [pg. 109])
  40.  
  41.   ORBStatus invoke(in Flags invoke_flags);
  42.   
  43.   // Invokes the Request synchronously, waiting for the response.
  44.  
  45.   ORBStatus send(in Flags invoke_flags);
  46.   
  47.   // Invokes the Request asynchronously.  The response must eventually
  48.   // be checked by invoking get_response or get_next_response.
  49.  
  50.   ORBStatus get_response(in Flags response_flags);
  51.   
  52.   // Determines whether an asynchronous Request has completed.
  53.  
  54.   ORBStatus destroy();
  55.   
  56.   // Deletes the memory allocated by the ORB for the Request.
  57.  
  58.  
  59. #ifdef __SOMIDL__
  60.  
  61.   implementation 
  62.   {
  63.     releaseorder: add_arg, invoke, send, get_response, destroy,
  64.           private1, private2,
  65.           private3, private4,
  66.           private5, private6, 
  67.           private7, private8,
  68.           private9, private10,
  69.           private11, private12,
  70.           private13, private14;
  71.   
  72.     //# Class Modifiers
  73.     callstyle = idl;
  74.     functionprefix = "Request__";
  75.     dllname = "somd.dll";
  76.     majorversion = 2;
  77.     minorversion = 2;
  78.   
  79.     //# Passthrus
  80.     #define COMMON_H_PASSTHRU                          \
  81.       "/*"                                  \
  82.       " *  Flags defined on requests"                       \
  83.       " */"                                   \
  84.       ""                                  \
  85.       "#define ARG_IN        0x00000001      /* defined in somir.h */" \
  86.       "#define ARG_OUT        0x00000002    /* defined in somir.h */" \
  87.       "#define ARG_INOUT    0x00000004    /* defined in somir.h */" \
  88.       "#define IN_COPY_VALUE    0x00000008    /* add_arg flag */"       \
  89.       "#define DEPENDENT_LIST    0x00000010    /* add_item flag */"       \
  90.       "#define OUT_LIST_MEMORY    0x00000020    /* req flag */"       \
  91.       "#define INV_NO_RESPONSE    0x00000040    /* invoke flag */"       \
  92.       "#define INV_TERM_ON_ERR    0x00000080    /* invoke flag */"       \
  93.       "#define RESP_NO_WAIT    0x00000100    /* response flag */"       \
  94.       "/* Internal Use Flags */"                                          \
  95.       "#define AUTH_IN_MSG      0x00010000      /* msg includes auth info */" \
  96.       "#define ACKONEWAY        0x00020000      /* ack oneway messages */" \
  97.       "#define ENV_IN_MSG       0x00040000      /* msg includes env info */" \
  98.       "#define CTX_IN_MSG       0x00080000      /* msg includes ctx info */" \
  99.       "#define OBJ_OWNED        0x00100000    /* arg. mem. is obj. owned */" \
  100.       "#define CALLER_OWNED     0x00200000    /* arg mem is caller owned */" \
  101.       "#define RESULT_OUT       0x00400000    /* method result, not arg  */" \
  102.       "#define CLIENT_SIDE      0x00800000    /* client side of request */" \
  103.       "#define SERVER_SIDE      0x01000000    /* server side of request */" \
  104.       "#define TXCTX_IN_MSG     0x02000000      /* msg includes trans info */" \
  105.       "#define ARG_IS_PTRARG    0x10000000      /* ptr to arg, !aggregate */" \ 
  106.       "#define ARG_IS_COMPONENT 0x20000000      /* comp of aggregate type */" \
  107.       "#define ROOT_NOT_PTRARG  0x40000000      /* root struct not ptr */" \
  108.       "#define RESERVED_FLAGS    0x8c00fe00    /* future/internal use */" \
  109.       ""
  110.  
  111.     passthru C_xh_after = COMMON_H_PASSTHRU
  112.       "class Request;"
  113.       "/*"
  114.       " *  Functions for multiple deferred-synchronous requests."
  115.       " */"
  116.       "ORBStatus SOMLINK send_multiple_requests ("
  117.       "    IN    Request*    reqs[],        /* array of Requests */"
  118.       "    IN    Environment    *env,"
  119.       "    IN    long        count,        /* number of Requests */"
  120.       "    IN    Flags        invoke_flags"
  121.       "    );"
  122.       ""
  123.       "ORBStatus SOMLINK get_next_response ("
  124.       "    INOUT    Environment    *env,"
  125.       "    IN    Flags        response_flags,"
  126.       "    OUT    Request*    *req"
  127.       ");"
  128.       "";
  129.  
  130.     passthru C_h_after  = COMMON_H_PASSTHRU
  131.       "/*"
  132.       " *  Functions for multiple deferred-synchronous requests."
  133.       " */"
  134.       "#if defined(__IBMC__) && defined(_OS2)"
  135.       "  #pragma linkage(send_multiple_requests, system)"
  136.       "  #pragma linkage(get_next_response, system)"
  137.       "#endif"
  138.       "#ifdef SOM_STRICT_IDL"
  139.       "ORBStatus SOMLINK send_multiple_requests ("
  140.       "    IN    Request        reqs[],        /* array of Requests */"
  141.       "    IN    Environment    *env,"
  142.       "    IN    long        count,        /* number of Requests */"
  143.       "    IN    Flags        invoke_flags"
  144.       "    );"
  145.       ""
  146.       "ORBStatus SOMLINK get_next_response ("
  147.       "    INOUT    Environment    *env,"
  148.       "    IN    Flags        response_flags,"
  149.       "    OUT    Request        *req"
  150.       ");"
  151.       "#else /* SOM_STRICT_IDL */"
  152.       "ORBStatus SOMLINK send_multiple_requests ("
  153.       "    IN    Request*    reqs[],        /* array of Requests */"
  154.       "    IN    Environment    *env,"
  155.       "    IN    long        count,        /* number of Requests */"
  156.       "    IN    Flags        invoke_flags"
  157.       "    );"
  158.       ""
  159.       "ORBStatus SOMLINK get_next_response ("
  160.       "    INOUT    Environment    *env,"
  161.       "    IN    Flags        response_flags,"
  162.       "    OUT    Request*    *req"
  163.       ");"
  164.       "#endif /* SOM_STRICT_IDL */"
  165.       ""
  166.       "/* define alias for CORBA compatibility */"
  167.       "#ifndef Request_delete"
  168.       "#define Request_delete Request_destroy"
  169.       "#endif"
  170.       "";
  171.  
  172.  
  173.     //# Method Modifiers
  174.     somDefaultInit: override, init;
  175.     somDestruct: override;
  176.   
  177.   };
  178.  
  179. #endif /* __SOMIDL__ */
  180.  
  181. };
  182.  
  183. #endif  /* request_idl */
  184.