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

  1. /*
  2.  *    @(#) 2.42 src/somd/impldef.idl, somd, som3.0 9/26/96 14:01:55 [12/24/96 07:39:24]
  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.  
  17.  
  18. //  CLASS SPECIFICATION FOR IMPLEMENTATION DEFINITION.  THIS IS A PUBLIC IDL.
  19. //  All the attributes of an ImplementationDef object along with any new
  20. //  typedefs used by the attributes is listed here.
  21.  
  22.  
  23. #ifndef SOM_impldef_idl
  24. #define SOM_impldef_idl
  25.  
  26.  
  27. /* new for 3.0 */
  28. #include <somdtype.idl>
  29. #include <somestio.idl>
  30.  
  31. interface ImplementationDef : CosStream::Streamable
  32. {
  33.     const int SOMD_MAXLEN_IMPL_ID       = 36;
  34.     //# SOMD_MAXLEN_IMPL_ID should always equal definition
  35.     //# of SOM_UUIDSTR_MAXLEN found in private/uuid.h
  36.  
  37.     const int SOMD_MAXLEN_IMPL_ALIAS    = 255;
  38.     const int SOMD_MAXLEN_IMPL_PROGRAM  = 255;
  39.     const int SOMD_MAXLEN_FILENAME      = 255;
  40.     const int SOMD_MAXLEN_HOSTNAME      =  32;
  41.     const int SOMD_MAXLEN_CLASSNAME     = 255;
  42.  
  43.     typedef sequence<octet> * octet_seqP;
  44.     // pointer to an octet sequence
  45.  
  46.     struct prot_response
  47.     {
  48.        string protocol;
  49.        sequence <string> *response;
  50.     };
  51.     // structure containing the protocol along with its responses
  52.     // to form a valid tagged profile.
  53.  
  54.     typedef sequence<prot_response> seq_prot_responses;
  55.  
  56.     // ImplementationDef attributes
  57.  
  58.     attribute string<SOMD_MAXLEN_IMPL_ID>  impl_id;
  59.     // Refers to the unique impl_id of a server.
  60.     // On _get_impl_id, ownership of results are transfered to the caller.
  61.  
  62.     attribute string<SOMD_MAXLEN_IMPL_ALIAS>  impl_alias;
  63.     // impl_alias refers to the server alias
  64.     // On _get_impl_alias, ownership of results are transfered to the caller.
  65.  
  66.     attribute string<SOMD_MAXLEN_IMPL_PROGRAM> impl_program;
  67.     // Contains the name of the server process executable. Default is
  68.     // somdsvr.exe.
  69.     // On _get_impl_program, ownership of results are transfered to the caller.
  70.  
  71.     attribute Flags  impl_flags;
  72.     // Bit vector representing the various server options.
  73.  
  74.     attribute string<SOMD_MAXLEN_CLASSNAME> impl_server_class;
  75.     // Represents the class of the server object. Default is SOMDServer.
  76.     // On _get_impl_server_class, ownership of results are transfered to the
  77.     // caller.
  78.  
  79.     attribute string<SOMD_MAXLEN_FILENAME> impl_refdata_file;
  80.     // Contains the name of the file containing ref data.
  81.     // Meaningful only in 2.X environment.
  82.     // On _get_impl_refdata_file, ownership of results are transfered to the
  83.     // caller.
  84.  
  85.     attribute string<SOMD_MAXLEN_FILENAME> impl_refdata_bkup;
  86.     // Contains the name of the file containing ref data backup.
  87.     // Meaningful only in 2.X environment.
  88.     // On _get_impl_refdata_bkup, ownership of results are transfered to the
  89.     // caller.
  90.  
  91.     attribute string<SOMD_MAXLEN_HOSTNAME> impl_hostname;
  92.     // Contains the hostname on which the server process would be started.
  93.     // Meaningful only in 2.X environment.
  94.     // On _get_impl_hostname, ownership of results are transfered to the caller.
  95.  
  96.     attribute string<SOMD_MAXLEN_FILENAME> config_file;
  97.     // Contains the path of the config file which a server process could
  98.     // use to override those provided by the default config file in SOMENV.
  99.     // On _get_config_file, ownership of results are transfered to the caller.
  100.  
  101.     attribute string<SOMD_MAXLEN_CLASSNAME> impldef_class;
  102.     // Contains the class of the ImplDef object. By default it is
  103.     // ImplementationDef.
  104.     // On _get_impldef_class, ownership of results are transfered to the caller.
  105.  
  106.     attribute octet_seqP svr_objref;
  107.     // A pointer to a sequence of octets representing the binary form of the
  108.     // server's objref.
  109.  
  110.     attribute string protocols;
  111.     // This contains the set of space separated protocol names that was used
  112.     // in forming the objref.
  113.  
  114.     attribute seq_prot_responses *registrar_resp;
  115.     // Represents a sequence of structures where each structure contains the
  116.     // protocol name and a set of responses. This would be used to generate
  117.     // the tagged profile for that specific protocol through a programmatic
  118.     // interface.
  119.  
  120.  
  121.  
  122. #ifdef __SOMIDL__
  123.  
  124.     implementation
  125.          {
  126.            releaseorder: _set_impl_id,           _get_impl_id,
  127.                              _set_impl_alias,        _get_impl_alias,
  128.                              _set_impl_program,      _get_impl_program,
  129.                              _set_impl_flags,        _get_impl_flags,
  130.                              _set_impl_server_class, _get_impl_server_class,
  131.                              _set_impl_refdata_file, _get_impl_refdata_file,
  132.                              _set_impl_refdata_bkup, _get_impl_refdata_bkup,
  133.                              _set_impl_hostname,     _get_impl_hostname,
  134.                              _set_impl_def_struct,   _get_impl_def_struct,
  135.                              get_impl_winserver_handle,
  136.                              _set_config_file,       _get_config_file,
  137.                              _set_impldef_class,     _get_impldef_class,
  138.                              _set_svr_objref,        _get_svr_objref,
  139.                              _set_protocols,         _get_protocols,
  140.                              _set_registrar_resp,    _get_registrar_resp,
  141.                              _set_impl_version,      _get_impl_version,
  142.                              _set_class_in_NS,       _get_class_in_NS;
  143.  
  144.                          // memory management policy
  145.                          memory_management = corba;
  146.  
  147.                          _get_svr_objref: object_owns_result;
  148.                          _set_svr_objref: object_owns_parameters = "svr_objref";
  149.                          _get_protocols: object_owns_result;
  150.                          _set_protocols: object_owns_parameters = "protocols";
  151.                          _get_registrar_resp: object_owns_result;
  152.                          _set_registrar_resp: object_owns_parameters = "registrar_resp";
  153.  
  154.                          //# Class Modifiers
  155.                          callstyle = idl;
  156.                          dllname = "somd.dll";
  157.                          majorversion = 2;
  158.                          minorversion = 2;
  159.                          functionprefix = "ImplDef_";
  160.  
  161.                          //# Passthrus
  162.                          #define COMMON_H_PASSTHRU \
  163.                              "" \
  164.                              "/* flags */"               \
  165.                              "#define IMPLDEF_MULTI_THREAD  0x00000001" \
  166.                              "#define IMPLDEF_DISABLE_SVR   0x00000004" \
  167.                              "#define IMPLDEF_IMPLID_SET    0x00000008" \
  168.                              "#define IMPLDEF_SECUREMODE    0x00000020" \
  169.                              "#define IMPLDEF_MANAGED       0x00000040" \
  170.                              ""
  171.  
  172. //# D23660: Remove include somestrm.h
  173.  
  174.         passthru C_h_after  = COMMON_H_PASSTHRU
  175.         "#ifndef SOM_IMPORTEXPORT_somd"
  176.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  177.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  178.         "#else"
  179.             "#define SOM_IMPORTEXPORT_somd"
  180.         "#endif"
  181.         "#endif"
  182.         "#ifdef SOM_STRICT_IDL"
  183.         "SOMEXTERN SOM_IMPORTEXPORT_somd ImplementationDef  SOMDLINK SOMD_ImplDefObject;"
  184.         "#else"
  185.         "SOMEXTERN SOM_IMPORTEXPORT_somd ImplementationDef*  SOMDLINK SOMD_ImplDefObject;"
  186.         "#endif /* SOM_STRICT_IDL */"
  187.         "";
  188.  
  189.                          passthru C_xh_after = COMMON_H_PASSTHRU
  190.         "#ifndef SOM_IMPORTEXPORT_somd"
  191.         "#if defined(_WIN32) && !defined(SOM_DLL_somd)"
  192.             "#define SOM_IMPORTEXPORT_somd SOMDLLIMPORT"
  193.         "#else"
  194.             "#define SOM_IMPORTEXPORT_somd"
  195.         "#endif"
  196.         "#endif"
  197.         "class ImplementationDef;"
  198.         "SOMEXTERN SOM_IMPORTEXPORT_somd ImplementationDef* SOMDLINK SOMD_ImplDefObject;"
  199.         "";
  200.  
  201. // D23595: remove passthru C_hh_before="#include <omglc.hh>"
  202.  
  203.  
  204.                          //# declared via attributes
  205.  
  206.                        impl_id:           noget, noset;
  207.                        impl_alias:        noget, noset;
  208.                        impl_program:      noget, noset;
  209.                        impl_flags:        noget, noset;
  210.                        impl_server_class: noget, noset;
  211.                        impl_refdata_file: noget, noset;
  212.                        impl_refdata_bkup: noget, noset;
  213.                        impl_hostname:     noget, noset;
  214.                        config_file:       noget, noset;
  215.                        impldef_class:     noget, noset;
  216.                        svr_objref:        noget, noset;
  217.                        protocols:         noget, noset;
  218.                        registrar_resp:    noget, noset;
  219.                        impl_version:      noget, noset;
  220.                        class_in_NS:       noget, noset;
  221.  
  222.                          //# Method Modifiers
  223.                        override: somDefaultInit, somDestruct ;
  224.                        override: externalize_to_stream, internalize_from_stream;
  225.                      };
  226.  
  227. #endif /* __SOMIDL__ */
  228.  
  229. };
  230.  
  231. #endif  /* SOM_impldef_idl */
  232.  
  233.  
  234.