//$Id: Stock_Base.idl 79791 2007-10-18 17:44:35Z sowayaa $

#ifndef STOCK_BASE_IDL
#define STOCK_BASE_IDL

#include <Components.idl>

module Stock
{
  exception Invalid_Stock {};
  typedef sequence<octet> ImageBlob;

  /**
   * @struct StockInfo
   */
  struct StockInfo {
    string name;
    long high;
    long low;
    long last;
  };

  /**
   * @interface: StockQuoter
   *
   * @brief: component facet
   */
  interface StockQuoter {
    /// Returns the current stock info
    StockInfo get_stock_info (in string stock_name)
          raises (Invalid_Stock);
  };


  /**
   * @event StockName
   *
   * @brief component event
   */
  eventtype StockName {
    // Name of the stock.
    public string name;
  };
};

#endif /* STOCK_BASE_IDL */
