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

  1. /*
  2.  *    @(#) 1.27 src/somd/comm_fw/include/unotypes.idl, somd, som3.0 1/25/96 22:24:32 [12/24/96 07:56:19]
  3.  */
  4.  
  5. //
  6. //   COMPONENT_NAME: somd
  7. //
  8. //   ORIGINS: 27
  9. //
  10. //
  11. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996
  12. //   All Rights Reserved
  13. //   Licensed Materials - Property of IBM
  14. //   US Government Users Restricted Rights - Use, duplication or
  15. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  16. //
  17.  
  18. #ifndef __unotypes_idl_
  19. #define __unotypes_idl_
  20.  
  21. #include <somdtype.idl>
  22. interface Principal;
  23. module IIOP {
  24.  
  25.         struct Version {
  26.                 char            major;
  27.                 char            minor;
  28.         };
  29.  
  30.         struct ProfileBody {
  31.                 Version         iiop_version;
  32.                 string          host;
  33.                 unsigned short  port;
  34.                 sequence<octet> object_key;
  35.         };
  36.  
  37.         struct ObjectLocator {
  38.                 Version         iiop_version;
  39.                 string          host;
  40.                 unsigned short  port;
  41.                 sequence<octet> object_key;
  42.         };
  43.         //
  44.         // An ObjectLocator is encapsulted in a IIOP profile
  45.         // within an IOR
  46.  
  47.         enum MsgType {
  48.                 Request, Reply, CancelRequest,
  49.                 LocateRequest, LocateReply,
  50.                 CloseConnection, MessageError,
  51.                 Reserved1, Reserved2, Reserved3, Reserved4, Reserved5,
  52.                 Reserved6, Reserved7, Reserved8, Reserved9, Reserved10,
  53.                 Reserved11, Reserved12, Reserved13, Reserved14, Reserved15,
  54.                 CreateConnection,                /* not in OMG spec. */
  55.                 AcceptConnection,                /* not in OMG spec. */
  56.                 BrokenConnection,                /* not in OMG spec. */
  57.                 RegisterImpl,                    /* not in OMG spec. */
  58.                 UnregisterImpl,                  /* not in OMG spec. */
  59.                 RegisterAck,                     /* not in OMG spec. */
  60.                 QueryImpl,                       /* not in OMG spec. */
  61.                 ReplyQueryImpl                   /* not in OMG spec. */
  62.         };
  63.  
  64.         struct MessageHeader {
  65.                 char            magic[4];
  66.                 Version         iiop_version;
  67.                 boolean         byte_order;
  68.                 octet           message_type;
  69.                 unsigned long   message_size;
  70.         };
  71.  
  72.         typedef unsigned long   ServiceID;
  73.  
  74.         struct ServiceContext {
  75.                 ServiceID       context_id;
  76.                 sequence<octet> context_data;
  77.         };
  78.         //
  79.         // Support for Implicit ORB Service Context
  80.         //
  81.  
  82.         typedef sequence <ServiceContext>       ServiceContextList;
  83.  
  84.         const   ServiceID       TransactionService = 0;
  85.         const   ServiceID       DebuggerService = 0x49424d00;
  86.         const   ServiceID       SecurityService = 0x49424d01;
  87.  
  88.  
  89.         struct RequestHeader {
  90.                 ServiceContextList      service_context;
  91.                 unsigned long           request_id; /* correlation id */
  92.                 boolean                 response_expected;
  93.                 sequence <octet>        object_key;
  94.                 string                  operation;
  95.                 Principal               requesting_principal;
  96.         };
  97.  
  98.         enum ReplyStatusType {
  99.                 NO_EXCEPTION,
  100.                 USER_EXCEPTION,
  101.                 SYSTEM_EXCEPTION,
  102.                 LOCATION_FORWARD
  103.         };
  104.  
  105.         struct ReplyHeader {
  106.                 ServiceContextList      service_context;
  107.                 unsigned long           request_id;
  108.                 ReplyStatusType         reply_status;
  109.         };
  110.  
  111.         struct ConnectHeader {
  112.                 unsigned long  port; /* local port */
  113.         };
  114.  
  115.         struct AcceptHeader {
  116.                 unsigned long port; /* remote port */
  117.         };
  118.  
  119.         struct CancelRequestHeader {
  120.                 unsigned long request_id;
  121.         };
  122.  
  123.         struct LocateRequestHeader {
  124.                 unsigned long           request_id;
  125.                 sequence <octet>        object_key;
  126.         };
  127.  
  128.  
  129.         enum LocateStatusType {
  130.                 UNKNOWN_OBJECT,
  131.                 OBJECT_HERE,
  132.                 OBJECT_FORWARD
  133.         };
  134.         struct LocateReplyHeader {
  135.                 unsigned long           request_id;
  136.                 LocateStatusType        locate_status;
  137.         };
  138.  
  139.         struct ImplementationHeader  {
  140.                 unsigned long request_id;
  141.                 string  impl_id;
  142.                 unsigned long tag;
  143.         };
  144.  
  145.  
  146.         typedef struct SOMDServiceContext {
  147.                 ServiceID               context_tag;
  148.                 sequence<octet>         context_data;
  149.                 somToken                context_body;
  150.         } SOMDServiceContexts;
  151.  
  152.         // Object references have one service context for each of the object
  153.         // service that require service-specific context information passed
  154.         // between the client and server. This context information is used
  155.         // by some factories to bind to the object and is used by some call
  156.         // streams in the invocation of a request. The profile_body struct
  157.         // context body is defined by the object service that is identified
  158.         // by the context_tag
  159.         // NOTE: When a new SOMDServiceContext is created context_body must be
  160.         // initialized to NULL
  161.  
  162.          typedef sequence<SOMDServiceContexts> SOMDServiceContextList;
  163. };
  164.  
  165.  
  166. module IOR {
  167.  
  168.         typedef unsigned long ProfileId;
  169.  
  170.         //# Standard Protocol Profile tag values
  171.  
  172.         const ProfileId                 TAG_INTERNET_IOP = 0;
  173.         const ProfileId                 TAG_MULTIPLE_COMPONENTS = 1;
  174.         const ProfileId                 TAG_SOMD_NB     = 1229081859;
  175.         const ProfileId                 TAG_SOMD_IPX    = 1229081858;
  176.         const ProfileId                 TAG_SOMD_IPC    = 1229081857;
  177.         const ProfileId                 TAG_SNA_PROFILE = 1229081856;
  178.  
  179.         typedef struct TaggedProfile {
  180.                 ProfileId               tag;
  181.                 sequence<octet>         profile_data;
  182.         } TaggedProfiles;
  183.         typedef sequence<TaggedProfiles> seq_TaggedProfiles;
  184.  
  185.         struct IOR {
  186.                 string                  type_id;
  187.                 sequence<TaggedProfile> profiles;
  188.         };
  189.  
  190.         #pragma modifier IOR : cxxmap="ior";
  191.  
  192.         typedef unsigned long   ComponentId;
  193.  
  194.         struct TaggedComponent {
  195.                 ComponentId             tag;
  196.                 sequence<octet>         component_data;
  197.         };
  198.  
  199.         typedef sequence <TaggedComponent> MultipleComponentProfile;
  200.         //
  201.         // Standard way of representing multicomponent profiles
  202.         // This would be encapsulated in a TaggedComponent
  203.         //
  204.  
  205.  
  206.         typedef struct SOMDTaggedProfile {
  207.                 ProfileId               profile_tag;
  208.                 sequence<octet>         profile_data;
  209.                 somToken                profile_body;
  210.         } SOMDTaggedProfiles;
  211.  
  212.         typedef sequence<SOMDTaggedProfiles> seq_SOMDTaggedProfiles;
  213.  
  214.         // Object references have one tagged profile per call stream factory
  215.         // supported. Those profiles together with the service context (see
  216.         // above) encapsulate all the informationthat the factory needs to
  217.         // bind to the object. The structure of the profile_body is wholly
  218.         // specified by its factory that is identified by the profile_tag.
  219.         // NOTE: When a new SOMDTaggedProfile is created profile_body must be
  220.         // initialized to NULL
  221.  
  222.         struct SOMDTaggedComponent {
  223.                 ComponentId             component_tag;
  224.                 sequence<octet>         component_data;
  225.                 somToken                component_body;
  226.         };
  227.  
  228.         struct SOMDIOR {
  229.                 string                          type_id;
  230.                 sequence<SOMDTaggedProfile>     profiles;
  231.         };
  232.  
  233.  
  234. };
  235.  
  236. #endif  /* __unotypes_idl */
  237.