// $Id: Deployment_NodeManager.idl 77254 2007-02-20 16:38:18Z wotte $
#ifndef NODEMANAGER_IDL
#define NODEMANAGER_IDL

#include "DAnCE/Deployment/Deployment.idl"
#include "DAnCE/Deployment/Deployment_Core.idl"
#include "DAnCE/Deployment/Deployment_TargetManager.idl"

module Deployment {

  interface Logger {
  };

  interface NodeApplicationManager;
  
  //@@changed
//   interface NodeManager {
//     void joinDomain (in Domain theDomain, in TargetManager manager, in
//                      Logger log, in long updateInterval);
//     void leaveDomain ();
//     NodeApplicationManager preparePlan (in DeploymentPlan plan, in
//                                         ResourceCommitmentManager resourceCommitment)
//       raises (StartError, PlanError);
//     void destroyManager (in NodeApplicationManager appManager)
//       raises (StopError);
//     Resources getDynamicResources ();
//   };
  
  interface NodeManager {
    /*
     * @todo 06-02-01 mentions a 4th argument:in long updateInterval
     */
    void joinDomain (in Domain ciao_domain,
                     in TargetManager manager,
                     in Logger log);

    void leaveDomain ();

    /*
     * @todo According to 06-02-01 there should also be a ResourceCommitmentManager
     * as second argument
     */
    NodeApplicationManager preparePlan (in DeploymentPlan plan)
      raises (StartError, PlanError);

    /*
     * @todo According to 06-02-01 InvalidReference shouldn't be here
     */
    void destroyManager (in NodeApplicationManager appManager)
      raises (StopError, InvalidReference);

    /// CIAO specific extension
    /// Destroy the NAM and all the associated NAs with this child_plan
    /// We can guarantee that the input DeploymentPlan is valid, since it
    /// is fetched from the cached DeploymentPlan of DAM, which has been
    /// validated before.
    void destroyPlan (in DeploymentPlan plan)
      raises (StopError);

    /// CIAO specific extension
    /// Get all the shared components installed in this node
    ComponentPlans get_shared_components ();

    /*
     * @todo According to 06-02-01 missing is:
     * Resources getDynamicResources ();
     */
  };
};

#endif /* NODEMANAGER_IDL */
