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