home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / oddsconn.idl < prev    next >
Text File  |  1997-04-02  |  6KB  |  153 lines

  1. //#====START_GENERATED_PROLOG======================================
  2. //#
  3. //#
  4. //#   COMPONENT_NAME: odscript
  5. //#
  6. //#   CLASSES: none
  7. //#
  8. //#   ORIGINS: 27
  9. //#
  10. //#
  11. //#   (C) COPYRIGHT International Business Machines Corp. 1995,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. //#   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  18. //#   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. //#   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  20. //#   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
  21. //#   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  22. //#   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  23. //#   OR PERFORMANCE OF THIS SOFTWARE.
  24. //#
  25. //#====END_GENERATED_PROLOG========================================
  26. //#
  27. // @(#) 1.8 com/src/odscript/idl/oddsconn.idl, odscript, od96os2, odos29712d 10/31/96 12:44:12 [3/21/97 17:41:37]
  28. //
  29. //
  30. //     Contains:       Class definition for Direct Scripting Connection
  31. #ifndef _ODDSCONN_
  32. #define _ODDSCONN_
  33.  
  34. #include <somobj.idl>
  35. typedef void * ODGUID;
  36. typedef somToken LPODDSEVENTMGRLIST;
  37. typedef somToken LPODDSOLECONNECTION;
  38.  
  39.  
  40. interface ODDSEventMgr;
  41. interface ODDSEventMgrEnum;
  42. interface ODDSSink;
  43. interface ODDSConnection : SOMObject
  44. {
  45.   exception ODDS_ERROR {long ErrorCode; char Reason[80];};
  46.   long AddEventMgr(in ODDSEventMgr eventmgr) raises(ODDS_ERROR);
  47.                        // AddEventMgr:
  48.                        // Adds given event manager to the list. This makes
  49.                        // the event interface available to all environments:
  50.                        // OLE, Lotus, etc,
  51.   long DeleteEventMgr(in ODGUID *eventmgrID) raises(ODDS_ERROR);
  52.                        // DeleteEventMgr:
  53.                        // Remove thes event manager from the list and
  54.                        // delete it.
  55.                        // The sink list of the event manager is deleted
  56.                        // as a result of the event manager destruction
  57.   long GetEventMgr(in ODGUID *eventmgrID, out ODDSEventMgr eventmgr) raises(ODDS_ERROR);
  58.                        // GetEventMgr:
  59.                        // Returns the event manager with the given ODGUID.
  60.                        // Returns eventmgr = NULL if not found.
  61.   long CreateEventMgrEnum(out ODDSEventMgrEnum eventMgrs) raises(ODDS_ERROR);
  62.                        // GetEventMgrEnum:
  63.                        // Returns an enumeration object which can be used
  64.                        // to iterate through the list of event managers.
  65.   long AddSink(in ODDSSink sink, out ODDSEventMgr eventmgr) raises(ODDS_ERROR);
  66.                        // AddSink:
  67.                        // Gives the given sink to the an event manager
  68.                        // with the same ODGUID as the sink's ODGUID
  69.                        // for addition the event manager's sink list.
  70.                        // Returns the event manager for later sink deletion.
  71.                        // Returns eventmgr = NULL if not found.
  72.                        // The same operation can be done by issuing an
  73.                        // addSink directly to the event manager.
  74.   long InitOLEConnectionPointContainer(in void * olewrapper,
  75.                                           in void * pUnkOuter,
  76.                                           out void * pMyUnk) raises(ODDS_ERROR);
  77.                        // InitOLEConnectionPointContainer:
  78.                        // Adds OLE Connection point support to this connection object.
  79.                        // Returns this object's IUnknown interface
  80.  
  81. #ifdef __SOMIDL__
  82.  
  83.   implementation
  84.   {
  85.      functionprefix = ODDSConnection;
  86.      MajorVersion = 1;
  87.      MinorVersion = 0;
  88.      dllname = "oddsevnt.dll";
  89.      somDefaultInit: override, init;
  90.      somDestruct: override;
  91.  
  92.      releaseorder:
  93.              AddEventMgr,
  94.              DeleteEventMgr,
  95.              GetEventMgr,
  96.              CreateEventMgrEnum,
  97.              AddSink,
  98.              InitOLEConnectionPointContainer;
  99.  
  100.       passthru C_xh_before = " #include \"oddsconn.h\" ";
  101.       passthru C_xih_before = " #include \"oddsconn.h\" ";
  102.  
  103.   };
  104. #endif
  105. };
  106. //************************************************************************
  107. // Class: ODDSEventMgrEnum
  108. //     Contains a sequence of ODGUID which represent the EventManagers
  109. //     managed by an instance of ODDSConnection and a Cursor that
  110. //     moves through the sequence.
  111. //************************************************************************
  112. interface ODDSEventMgrEnum : SOMObject
  113. {
  114.  
  115.   exception ODDS_ERROR {long ErrorCode; char Reason[80];};
  116.   readonly attribute long count;       // Number of eventMgrs
  117.  
  118.   long First(out ODDSEventMgr eventMgr);
  119.                // First:
  120.                // Returns first EventMgr in the sequence and positions
  121.                // cursor to 2nd in the list
  122.   long Next(out ODDSEventMgr eventMgr);
  123.                // Next:
  124.                // Returns the next eventMgr. Positions cursor to
  125.                // the next one.
  126.   void Create(inout somInitCtrl ctrl, in ODDSConnection conn, in sequence<ODGUID> eventMgrs );
  127.                // Copies input sequence and sets cursor to first GUID in
  128.                // the sequence
  129.  
  130.  
  131. #ifdef __SOMIDL__
  132.  
  133.  implementation
  134.  {
  135.     functionprefix = ODDSEventMgrEnum;
  136.     MajorVersion = 1;
  137.     MinorVersion = 0;
  138.  
  139.     Create: init;
  140.     somDefaultInit: override, init;
  141.     somDestruct: override;
  142.     releaseorder:
  143.            Create,
  144.            First,
  145.            Next,
  146.            _get_count;
  147.  
  148. };
  149. #endif
  150. };
  151. #endif // _ODDSCONN_
  152.  
  153.