// $Id: CCM_Object.idl 86021 2009-07-14 12:14:35Z wotte $
/// NOT Compliant with OMG 06-04-01 Section 6.11.1

#if !defined (CCM_OBJECT_IDL)
#define CCM_OBJECT_IDL

#include "ccm/CCM_Events.idl"
#include "ccm/CCM_Navigation.idl"
#include "ccm/CCM_Home.idl"
#include "ccm/CCM_PrimaryKeyBase.idl"

module Components
{
  typeprefix Components "omg.org";

  /// This typedef and consts shouldn't be here but are here because of CIAO
  /// specific additions
  typedef FailureReason InvalidConfigurationReason;
  const InvalidConfigurationReason UnknownConfigValueName = 0;
  const InvalidConfigurationReason InvalidConfigValueType = 1;
  const InvalidConfigurationReason ConfigValueRequired = 2;
  const InvalidConfigurationReason ConfigValueNotExpected = 3;

  /// Shouldn't be here but is now here because of CIAO additions
  exception InvalidConfiguration
  {
    InvalidConfigurationReason reason;
    FeatureName name;
  };

  valuetype ComponentPortDescription
  {
    public FacetDescriptions facets;
    public ReceptacleDescriptions receptacles;
    public ConsumerDescriptions consumers;
    public EmitterDescriptions emitters;
    public PublisherDescriptions publishers;
  };

  exception NoKeyAvailable {};

  interface CCMObject : Navigation, Receptacles, Events
  {
    CORBA::IRObject get_component_def ( );
    CCMHome get_ccm_home( );
    PrimaryKeyBase get_primary_key( )
      raises (NoKeyAvailable);
    void configuration_complete ()
      raises (InvalidConfiguration);
    void remove()
      raises (RemoveFailure);
    ComponentPortDescription get_all_ports ();
  };

  // From OMG 06-04-01 Section 10.3.1.2
  typedef sequence<CCMObject> CCMObjectSeq;
};
#endif /* CCM_OBJECT_IDL */
