home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / opendc12.zip / od124os2.exe / od12otk1.exe / include / oddsemgr.idl < prev    next >
Text File  |  1997-04-02  |  5KB  |  160 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/oddsemgr.idl, odscript, od96os2, odos29712d 10/31/96 12:44:16 [3/21/97 17:41:38]
  28. //
  29. //
  30. //     File:          oddsemgr.idl
  31. //
  32. //     Contains:       Class definition for Direct Scripting Event Manager
  33. #ifndef _ODDSEMGR_
  34. #define _ODDSEMGR_
  35.  
  36. #include <somobj.idl>
  37.  
  38. typedef somToken ODGUID;
  39. typedef ODGUID * LPODGUID;
  40. typedef void * ODDSRESULT;
  41. typedef somToken DISPID;
  42. typedef somToken ODDSSinkSet;
  43. typedef somToken ODDSSinkEnumSet;
  44. typedef somToken HMTX;
  45. typedef somToken HANDLE ;               // windows handle
  46.  
  47. interface ODDSConnection;
  48. interface ODDSSinkEnum;
  49. interface ODDSSink;
  50. interface ODDSEventMgr : SOMObject
  51. {
  52.   exception ODDS_ERROR {long ErrorCode; char Reason[80];};
  53.   attribute ODDSConnection connection;
  54.   attribute unsigned long languageId;
  55.   readonly attribute LPODGUID guid;
  56.  
  57.   long AddSink(in ODDSSink sink) raises(ODDS_ERROR);
  58.                // AddSink:
  59.                //      Verifies that the sink's ODGUID matches the
  60.                //      EventMgr's ODGUID and adds it to the Eventmgr's
  61.                //      sink list.
  62.   long RemoveSink(in ODDSSink sink) raises(ODDS_ERROR);
  63.                // RemoveSink:
  64.                //      Removes the sink from the list
  65.   boolean SinkIsConnnected(in ODDSSink sink) raises(ODDS_ERROR);
  66.                // SinkIsConnected:
  67.                //      returns True if connected. False otherwise.
  68.   long PrepareEventFiring(out long numberOfSinks, out ODDSSinkEnum sinks)
  69.                              raises(ODDS_ERROR);
  70.                //  PrepareEventFiring:
  71.                //      Sets up a single use cursor for calling sinks notifying
  72.                //      them of an event. Each subsequent call to FireEvent will
  73.                //      increment the cursor to notify the next sink.
  74.                //      Returns error if another cursor is present.
  75.   long FireEvent(in ODDSSinkEnum sinks, in string eventName, in sequence<any> inputParms,
  76.                      out ODDSRESULT result) raises(ODDS_ERROR);
  77.                //   FireEvent:
  78.                //      Results in a call to the next sink.
  79.                //      If all the sinks have been called, returns error.
  80.   long StopEventFiring( in ODDSSinkEnum sinks);
  81.                // StopEventFiring:
  82.                // Deletes current cursor.
  83.   long CreateSinkEnum(out ODDSSinkEnum sinks) raises(ODDS_ERROR);
  84.                // CreateSinkEnum:
  85.                // Returns an object which can be used to access the Sinks
  86.                // connected to this event manager
  87.   void EventMgrWithGUID(inout somInitCtrl ctrl, in ODGUID guid) raises(ODDS_ERROR);
  88.                //  EventMgrWithGUID:
  89.                //      Constructor for Event Manager. This should be used instead of
  90.                //      the default constructor in order to set the guid.
  91.  
  92. #ifdef __SOMIDL__
  93.  
  94.  implementation
  95.  {
  96.     functionprefix = ODDSEventMgr;
  97.     MajorVersion = 1;
  98.     MinorVersion = 0;
  99.     dllname = "oddsevnt.dll";
  100.     EventMgrWithGUID: init;
  101.     somDefaultInit: override, init;
  102.     somDestruct: override;
  103.     releaseorder:
  104.            EventMgrWithGUID,
  105.            AddSink,
  106.            RemoveSink,
  107.            SinkIsConnnected,
  108.            PrepareEventFiring,
  109.            FireEvent,
  110.            StopEventFiring,
  111.            CreateSinkEnum,
  112.            _get_connection,
  113.            _set_connection,
  114.            _get_guid,
  115.            _get_languageId,
  116.            _set_languageId
  117.            ;
  118.  
  119.      passthru C_xh_before = " #include \"oddsconn.h\" ";
  120.      passthru C_xih_before = " #include \"oddsconn.h\" ";
  121.  
  122. };
  123. #endif
  124. };
  125.  
  126. interface ODDSSinkEnum : SOMObject
  127. {
  128.  
  129.   exception ODDS_ERROR {long ErrorCode; char Reason[80];};
  130.   readonly attribute long count;
  131.   long First(out ODDSSink sink);
  132.   long Next(out ODDSSink sink);
  133.  
  134.   void Create(inout somInitCtrl ctrl, in sequence<ODDSSink> sinks, in ODDSEventMgr eventMgr );
  135.  
  136.  
  137. #ifdef __SOMIDL__
  138.  
  139.  implementation
  140.  {
  141.     functionprefix = ODDSSinkEnum;
  142.     MajorVersion = 1;
  143.     MinorVersion = 0;
  144.  
  145.     Create: init;
  146.     somDefaultInit: override, init;
  147.     somDestruct: override;
  148.     releaseorder:
  149.            Create,
  150.            First,
  151.            Next,
  152.            _get_count;
  153.  
  154.  
  155. };
  156. #endif
  157. };
  158. #endif // _ODDSEMGR_
  159.  
  160.