home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / request.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  6.2 KB  |  186 lines

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