// $Id: CIAO_Events.idl 75969 2006-12-12 20:16:07Z johnnyw $

/**
 * @file CIAO_Events.idl
 *
 * @author George Edwards <g.edwards@vanderbilt.edu>
 * @author Gan Deng <dengg@dre.vanderbilt.edu>
 *
 * @brief Interfaces for configuring CIAO's event mechanism.
 */

#if !defined (CIAO_EVENTS_IDL)
#define CIAO_EVENTS_IDL

#include "ciao/CCM_EventConsumerBase.idl"
#include "ciao/CCM_Base.idl"

module CIAO
{
  /// A component's UUID + port name.
  typedef string CONNECTION_ID;

  enum EventServiceType
  {
    EC,
    RTEC,
    NOTIFY,
    RTNOTIFY
  };

  interface Supplier_Config
  {
    attribute CONNECTION_ID supplier_id;

    readonly attribute EventServiceType service_type;

    void destroy ();
  };

  interface Consumer_Config
  {
    attribute CONNECTION_ID consumer_id;

    readonly attribute EventServiceType service_type;

    attribute Components::EventConsumerBase consumer;

    void start_conjunction_group (in long size);

    void start_disjunction_group (in long size);

    void insert_source (in CONNECTION_ID source_id);

    void insert_type (in long event_type);

    void destroy ();
  };

  interface CIAO_Event_Service : Components::EventConsumerBase
  {
    Supplier_Config create_supplier_config ();

    Consumer_Config create_consumer_config ();

    void connect_event_supplier (in Supplier_Config supplier_conf);

    void connect_event_consumer (in Consumer_Config consumer_conf);

    void disconnect_event_supplier (in CONNECTION_ID conn_id)
      raises (Components::InvalidConnection);

    void disconnect_event_consumer (in CONNECTION_ID conn_id)
      raises (Components::InvalidConnection);

    //void push_event (in Components::EventBase ev);
  };
};

#endif /* CIAO_EVENTS_IDL */
