#ifndef _DB_MYSQL_VALIDATION_PAGE_WRAPPER_H_
#define _DB_MYSQL_VALIDATION_PAGE_WRAPPER_H_

#include "db_mysql_sql_export.h"
#include "GrtTemplates.h"
#include "SigCSlot.h"

namespace MySQL {
namespace GUI {
namespace Workbench {
namespace Plugins {
namespace DbMySQL {

using namespace System;
using namespace System::Runtime::InteropServices;
using namespace System::Collections::Generic;
using namespace MySQL::Grt;

public ref class DbMySQLValidationPage
{
public:
  typedef DelegateSlot0<int, int> Validation_finished_cb;
  typedef DelegateSlot1<int, int, int, int> Validation_step_finished_cb;

private:
  Validation_finished_cb^ _validation_finished_cb;
  Validation_step_finished_cb^ _validation_step_finished_cb;

protected:
  ::DbMySQLValidationPage *_inner;

public:
  DbMySQLValidationPage(::DbMySQLValidationPage *inn) 
    : _inner(inn)
  {}

  MySQL::Grt::GrtManager^ get_grt_manager() 
  { return gcnew MySQL::Grt::GrtManager(_inner->get_grt_manager()); }
  
  void run_validation()
  { _inner->run_validation(); }

  void validation_finished_cb(Validation_finished_cb::ManagedDelegate ^deleg)
  {
    _validation_finished_cb= gcnew Validation_finished_cb(deleg);
    _inner->validation_finished_cb(_validation_finished_cb->get_slot());
  }

  void validation_step_finished_cb(Validation_step_finished_cb::ManagedDelegate ^deleg)
  {
    _validation_step_finished_cb= gcnew Validation_step_finished_cb(deleg);
    _inner->validation_step_finished_cb(_validation_step_finished_cb->get_slot());
  }

  GrtMessageList^ get_messages_list()
  {
    return gcnew MySQL::Grt::GrtMessageList(_inner->get_messages_list());
  }
};

} // namespace MySQL
} // namespace GUI
} // namespace Workbench
} // namespace DbMySQL
} // namespace Plugins

#endif // _DB_MYSQL_VALIDATION_PAGE_WRAPPER_H_