/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM flockIMigrationManager.idl
 */

#ifndef __gen_flockIMigrationManager_h__
#define __gen_flockIMigrationManager_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#ifndef __gen_nsISupportsArray_h__
#include "nsISupportsArray.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    flockIMigrationProgressListener */
#define FLOCKIMIGRATIONPROGRESSLISTENER_IID_STR "5f525135-0dbd-4613-a705-4bbe47eac91b"

#define FLOCKIMIGRATIONPROGRESSLISTENER_IID \
  {0x5f525135, 0x0dbd, 0x4613, \
    { 0xa7, 0x05, 0x4b, 0xbe, 0x47, 0xea, 0xc9, 0x1b }}

class NS_NO_VTABLE NS_SCRIPTABLE flockIMigrationProgressListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIMIGRATIONPROGRESSLISTENER_IID)

  /* void onUpdate (in long percent, in AUTF8String message); */
  NS_SCRIPTABLE NS_IMETHOD OnUpdate(PRInt32 percent, const nsACString & message) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIMigrationProgressListener, FLOCKIMIGRATIONPROGRESSLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIMIGRATIONPROGRESSLISTENER \
  NS_SCRIPTABLE NS_IMETHOD OnUpdate(PRInt32 percent, const nsACString & message); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIMIGRATIONPROGRESSLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnUpdate(PRInt32 percent, const nsACString & message) { return _to OnUpdate(percent, message); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIMIGRATIONPROGRESSLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnUpdate(PRInt32 percent, const nsACString & message) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUpdate(percent, message); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public flockIMigrationProgressListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIMIGRATIONPROGRESSLISTENER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockIMigrationProgressListener)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* void onUpdate (in long percent, in AUTF8String message); */
NS_IMETHODIMP _MYCLASS_::OnUpdate(PRInt32 percent, const nsACString & message)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    flockIMigrationManager */
#define FLOCKIMIGRATIONMANAGER_IID_STR "85b52366-924b-4170-9327-f6001ec65153"

#define FLOCKIMIGRATIONMANAGER_IID \
  {0x85b52366, 0x924b, 0x4170, \
    { 0x93, 0x27, 0xf6, 0x00, 0x1e, 0xc6, 0x51, 0x53 }}

class NS_NO_VTABLE NS_SCRIPTABLE flockIMigrationManager : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIMIGRATIONMANAGER_IID)

  /* nsISupportsArray setup (in string oldVersion); */
  NS_SCRIPTABLE NS_IMETHOD Setup(const char *oldVersion, nsISupportsArray **_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIMigrationManager, FLOCKIMIGRATIONMANAGER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIMIGRATIONMANAGER \
  NS_SCRIPTABLE NS_IMETHOD Setup(const char *oldVersion, nsISupportsArray **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIMIGRATIONMANAGER(_to) \
  NS_SCRIPTABLE NS_IMETHOD Setup(const char *oldVersion, nsISupportsArray **_retval) { return _to Setup(oldVersion, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIMIGRATIONMANAGER(_to) \
  NS_SCRIPTABLE NS_IMETHOD Setup(const char *oldVersion, nsISupportsArray **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Setup(oldVersion, _retval); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public flockIMigrationManager
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIMIGRATIONMANAGER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockIMigrationManager)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* nsISupportsArray setup (in string oldVersion); */
NS_IMETHODIMP _MYCLASS_::Setup(const char *oldVersion, nsISupportsArray **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif


/* starting interface:    flockIMigratable */
#define FLOCKIMIGRATABLE_IID_STR "0f283018-197e-417f-a823-00af7c085dd6"

#define FLOCKIMIGRATABLE_IID \
  {0x0f283018, 0x197e, 0x417f, \
    { 0xa8, 0x23, 0x00, 0xaf, 0x7c, 0x08, 0x5d, 0xd6 }}

class NS_NO_VTABLE NS_SCRIPTABLE flockIMigratable : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(FLOCKIMIGRATABLE_IID)

  /**
   * UI display name for this migration step.
   */
  /* readonly attribute string migrationName; */
  NS_SCRIPTABLE NS_IMETHOD GetMigrationName(char * *aMigrationName) = 0;

  /**
   * Called to test whether this service needs any migration processing to
   * update from the indicated version.
   *
   * @param aOldVersion (in) A string indicating which version the user's
   *        profile is currently at, in format "X.Y.Z".
   * @return TRUE if any migration is necessary; else FALSE.
   */
  /* boolean needsMigration (in string aOldVersion); */
  NS_SCRIPTABLE NS_IMETHOD NeedsMigration(const char *aOldVersion, PRBool *_retval) = 0;

  /**
   * Called to retrieve an object that will be passed to doMigrationWork() and
   * finishMigration() as the aMigrationContext argument.
   *
   * @param aOldVersion (in) A string indicating which version the user's
   *        profile is currently at, in format "X.Y.Z".
   * @param aProgressListener (in) A flockIMigrationProgressListener that
   *        should be used to report the migration's progress as a percentage.
   *
   *        In the degenerate case, startMigration() should report 0% and
   *        finishMigration() should report 100%. More sophisticated usage
   *        would have doMigrationWork() report increasing percentages as
   *        the migration progresses.
   * @return The context object.
   *
   * @see flockIMigrationProgressListener
   */
  /* nsISupports startMigration (in string aOldVersion, in flockIMigrationProgressListener aProgressListener); */
  NS_SCRIPTABLE NS_IMETHOD StartMigration(const char *aOldVersion, flockIMigrationProgressListener *aProgressListener, nsISupports **_retval) = 0;

  /**
   * Called repeatedly to perform the migration, until it returns FALSE.
   *
   * @param aMigrationContext (in) The object returned from startMigration().
   * @return TRUE if more migration works needs to be done; else FALSE.
   */
  /* boolean doMigrationWork (in nsISupports aMigrationContext); */
  NS_SCRIPTABLE NS_IMETHOD DoMigrationWork(nsISupports *aMigrationContext, PRBool *_retval) = 0;

  /**
   * Called to provide an opportunity to perform any end-of-migration actions.
   *
   * @param aMigrationContext (in) The object returned from startMigration().
   */
  /* void finishMigration (in nsISupports aMigrationContext); */
  NS_SCRIPTABLE NS_IMETHOD FinishMigration(nsISupports *aMigrationContext) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(flockIMigratable, FLOCKIMIGRATABLE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_FLOCKIMIGRATABLE \
  NS_SCRIPTABLE NS_IMETHOD GetMigrationName(char * *aMigrationName); \
  NS_SCRIPTABLE NS_IMETHOD NeedsMigration(const char *aOldVersion, PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD StartMigration(const char *aOldVersion, flockIMigrationProgressListener *aProgressListener, nsISupports **_retval); \
  NS_SCRIPTABLE NS_IMETHOD DoMigrationWork(nsISupports *aMigrationContext, PRBool *_retval); \
  NS_SCRIPTABLE NS_IMETHOD FinishMigration(nsISupports *aMigrationContext); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_FLOCKIMIGRATABLE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetMigrationName(char * *aMigrationName) { return _to GetMigrationName(aMigrationName); } \
  NS_SCRIPTABLE NS_IMETHOD NeedsMigration(const char *aOldVersion, PRBool *_retval) { return _to NeedsMigration(aOldVersion, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD StartMigration(const char *aOldVersion, flockIMigrationProgressListener *aProgressListener, nsISupports **_retval) { return _to StartMigration(aOldVersion, aProgressListener, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD DoMigrationWork(nsISupports *aMigrationContext, PRBool *_retval) { return _to DoMigrationWork(aMigrationContext, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD FinishMigration(nsISupports *aMigrationContext) { return _to FinishMigration(aMigrationContext); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_FLOCKIMIGRATABLE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetMigrationName(char * *aMigrationName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMigrationName(aMigrationName); } \
  NS_SCRIPTABLE NS_IMETHOD NeedsMigration(const char *aOldVersion, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->NeedsMigration(aOldVersion, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD StartMigration(const char *aOldVersion, flockIMigrationProgressListener *aProgressListener, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->StartMigration(aOldVersion, aProgressListener, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD DoMigrationWork(nsISupports *aMigrationContext, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoMigrationWork(aMigrationContext, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD FinishMigration(nsISupports *aMigrationContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->FinishMigration(aMigrationContext); } 

#if 0
/* Use the code below as a template for the implementation class for this interface. */

/* Header file */
class _MYCLASS_ : public flockIMigratable
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_FLOCKIMIGRATABLE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(_MYCLASS_, flockIMigratable)

_MYCLASS_::_MYCLASS_()
{
  /* member initializers and constructor code */
}

_MYCLASS_::~_MYCLASS_()
{
  /* destructor code */
}

/* readonly attribute string migrationName; */
NS_IMETHODIMP _MYCLASS_::GetMigrationName(char * *aMigrationName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean needsMigration (in string aOldVersion); */
NS_IMETHODIMP _MYCLASS_::NeedsMigration(const char *aOldVersion, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* nsISupports startMigration (in string aOldVersion, in flockIMigrationProgressListener aProgressListener); */
NS_IMETHODIMP _MYCLASS_::StartMigration(const char *aOldVersion, flockIMigrationProgressListener *aProgressListener, nsISupports **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* boolean doMigrationWork (in nsISupports aMigrationContext); */
NS_IMETHODIMP _MYCLASS_::DoMigrationWork(nsISupports *aMigrationContext, PRBool *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void finishMigration (in nsISupports aMigrationContext); */
NS_IMETHODIMP _MYCLASS_::FinishMigration(nsISupports *aMigrationContext)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* End of implementation class template. */
#endif

// 481E822D-937F-4E76-8AFC-F636061B7AC6
#define FLOCK_MIGRATIONMANAGER_CID \
{ 0x481E822D, 0x937F, 0x4E76, { 0x8A, 0xFC, 0xF6, 0x36, 0x06, 0x1B, 0x7A, 0xC6 } }
#define FLOCK_MIGRATIONMANAGER_CLASSNAME "Flock Migration Manager"
#define FLOCK_MIGRATIONMANAGER_CONTRACTID "@flock.com/migration-manager;1"

#endif /* __gen_flockIMigrationManager_h__ */
