
// @(#) 1.9 com/src/odscript/idl/oddssink.idl, odscript, od96nt, odnt9712d 10/31/96 12:44:29 [3/21/97 17:22:32]
//
//
//     File:          oddssink.idl
//
//     Contains:       Class definition for Direct Scripting Sink
#ifndef _ODDSSINK_
#define _ODDSSINK_

#include <somobj.idl>

typedef void * ODDSRESULT;
typedef void * LPOBJECT;
typedef somToken ODGUID;
typedef ODGUID * LPODGUID;

interface ODDSEventMgr ;
interface ODDSSink : SOMObject
{
  exception ODDS_ERROR {long ErrorCode; char Reason[80];};
                                       // Event Manager to which sink is
                                       // connected
  attribute ODDSEventMgr eventMgr;
                                       // Type of sink
                                       //  ODDS_SINK_TYPE_OLE = ole sink
                                       //  ODDS_SINK_TYPE_LS  = Lotus Script
                                       //  ODDS_SINK_TYPE_SOM = SOM/OD
  attribute unsigned short type;
                                       // Address owning object of sink
  attribute void * object;
                                       // Address to envvronment information for
                                       // sink
  attribute void * environment;
                                       // Universal ID for sink
  attribute LPODGUID guid;

  long FireEvent( in string eventName, in sequence<any> inputParms,
                     in LPOBJECT sourceObject,
                     out ODDSRESULT result) raises(ODDS_ERROR);
  void  EventMgrGone();
  void  SinkWithGUID(inout somInitCtrl ctrl, in ODGUID guid) raises(ODDS_ERROR);

#ifdef __SOMIDL__

   implementation
   {
      functionprefix = ODDSSink;
      MajorVersion = 1;
      MinorVersion = 0;
      dllname = "oddsevnt.dll";
      guid:noset;
      SinkWithGUID: init;
      somDefaultInit: override, init;
      somDestruct: override;
      releaseorder:
              SinkWithGUID,
              FireEvent,
              EventMgrGone,
              _get_object,
              _set_object,
              _get_eventMgr,
              _set_eventMgr,
              _get_environment,
              _set_environment,
              _get_type,
              _set_type,
              _get_guid,
              _set_guid;

     passthru C_xh_before = " #include \"oddsconn.h\" ";
     passthru C_xih_before = " #include \"oddsconn.h\" ";

   };
#endif
};
#endif // _ODDSSINK_

