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

#ifndef __gen_calICalendarProvider_h__
#define __gen_calICalendarProvider_h__


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

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsIURI; /* forward declaration */

class calICalendar; /* forward declaration */

class nsIVariant; /* forward declaration */

class calIProviderListener; /* forward declaration */


/* starting interface:    calICalendarProvider */
#define CALICALENDARPROVIDER_IID_STR "30e22db4-9f13-11d9-80d6-000b7d081f44"

#define CALICALENDARPROVIDER_IID \
  {0x30e22db4, 0x9f13, 0x11d9, \
    { 0x80, 0xd6, 0x00, 0x0b, 0x7d, 0x08, 0x1f, 0x44 }}

/**
 * High-level interface to allow providers to be plugable.
 */
class NS_NO_VTABLE calICalendarProvider : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALICALENDARPROVIDER_IID)

  /**
   * XUL overlay for configuring a calendar of this type.
   */
  /* readonly attribute nsIURI prefChromeOverlay; */
  NS_IMETHOD GetPrefChromeOverlay(nsIURI * *aPrefChromeOverlay) = 0;

  /**
   * The way to refer to this provider in UI for the end-user
   * (eg "Shared ICS File").
   */
  /* readonly attribute AUTF8String displayName; */
  NS_IMETHOD GetDisplayName(nsACString & aDisplayName) = 0;

  /**
   * Create a new empty calendar. This will typically create a new empty
   * file, and then call getCalendar()
   *
   * @param aName      the display name of the calendar to be created
   * @param aURL       URL of the calendar to be created.
   * @param aListener  where to call the results back to
   */
  /* void createCalendar (in AUTF8String aName, in nsIURI aURL, in calIProviderListener aListener); */
  NS_IMETHOD CreateCalendar(const nsACString & aName, nsIURI *aURL, calIProviderListener *aListener) = 0;

  /**
   * Delete a calendar. Deletes the actual underlying calendar, which
   * could be (for example) a file or a calendar on a server
   * 
   * @param aCalendar   the calendar to delete
   * @param aListener   where to call the results back to
   */
  /* void deleteCalendar (in calICalendar aCalendar, in calIProviderListener aListener); */
  NS_IMETHOD DeleteCalendar(calICalendar *aCalendar, calIProviderListener *aListener) = 0;

  /**
   * Get a new calendar object with existing calendar data
   *
   * @param aURL       URL of the calendar to be created.
   */
  /* calICalendar getCalendar (in nsIURI aURL); */
  NS_IMETHOD GetCalendar(nsIURI *aURL, calICalendar **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALICALENDARPROVIDER \
  NS_IMETHOD GetPrefChromeOverlay(nsIURI * *aPrefChromeOverlay); \
  NS_IMETHOD GetDisplayName(nsACString & aDisplayName); \
  NS_IMETHOD CreateCalendar(const nsACString & aName, nsIURI *aURL, calIProviderListener *aListener); \
  NS_IMETHOD DeleteCalendar(calICalendar *aCalendar, calIProviderListener *aListener); \
  NS_IMETHOD GetCalendar(nsIURI *aURL, calICalendar **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALICALENDARPROVIDER(_to) \
  NS_IMETHOD GetPrefChromeOverlay(nsIURI * *aPrefChromeOverlay) { return _to GetPrefChromeOverlay(aPrefChromeOverlay); } \
  NS_IMETHOD GetDisplayName(nsACString & aDisplayName) { return _to GetDisplayName(aDisplayName); } \
  NS_IMETHOD CreateCalendar(const nsACString & aName, nsIURI *aURL, calIProviderListener *aListener) { return _to CreateCalendar(aName, aURL, aListener); } \
  NS_IMETHOD DeleteCalendar(calICalendar *aCalendar, calIProviderListener *aListener) { return _to DeleteCalendar(aCalendar, aListener); } \
  NS_IMETHOD GetCalendar(nsIURI *aURL, calICalendar **_retval) { return _to GetCalendar(aURL, _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_CALICALENDARPROVIDER(_to) \
  NS_IMETHOD GetPrefChromeOverlay(nsIURI * *aPrefChromeOverlay) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPrefChromeOverlay(aPrefChromeOverlay); } \
  NS_IMETHOD GetDisplayName(nsACString & aDisplayName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDisplayName(aDisplayName); } \
  NS_IMETHOD CreateCalendar(const nsACString & aName, nsIURI *aURL, calIProviderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateCalendar(aName, aURL, aListener); } \
  NS_IMETHOD DeleteCalendar(calICalendar *aCalendar, calIProviderListener *aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeleteCalendar(aCalendar, aListener); } \
  NS_IMETHOD GetCalendar(nsIURI *aURL, calICalendar **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCalendar(aURL, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calICalendarProvider
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALICALENDARPROVIDER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute nsIURI prefChromeOverlay; */
NS_IMETHODIMP _MYCLASS_::GetPrefChromeOverlay(nsIURI * *aPrefChromeOverlay)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AUTF8String displayName; */
NS_IMETHODIMP _MYCLASS_::GetDisplayName(nsACString & aDisplayName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void createCalendar (in AUTF8String aName, in nsIURI aURL, in calIProviderListener aListener); */
NS_IMETHODIMP _MYCLASS_::CreateCalendar(const nsACString & aName, nsIURI *aURL, calIProviderListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void deleteCalendar (in calICalendar aCalendar, in calIProviderListener aListener); */
NS_IMETHODIMP _MYCLASS_::DeleteCalendar(calICalendar *aCalendar, calIProviderListener *aListener)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calICalendar getCalendar (in nsIURI aURL); */
NS_IMETHODIMP _MYCLASS_::GetCalendar(nsIURI *aURL, calICalendar **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIProviderListener */
#define CALIPROVIDERLISTENER_IID_STR "0eebe99e-a22d-11d9-87a6-000b7d081f44"

#define CALIPROVIDERLISTENER_IID \
  {0x0eebe99e, 0xa22d, 0x11d9, \
    { 0x87, 0xa6, 0x00, 0x0b, 0x7d, 0x08, 0x1f, 0x44 }}

class NS_NO_VTABLE calIProviderListener : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIPROVIDERLISTENER_IID)

  /**
   * @param aStatus         status code summarizing what happened
   * @param aDetail         not yet fully specified.  If aStatus is an error
   *                        result, this will probably be an extended error
   *                        string (eg one returned by a server).
   */
  /* void onCreateCalendar (in calICalendar aCalendar, in nsresult aStatus, in nsIVariant aDetail); */
  NS_IMETHOD OnCreateCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) = 0;

  /**
   * @param aStatus         status code summarizing what happened
   * @param aDetail         not yet fully specified.  If aStatus is an error
   *                        result, this will probably be an extended error
   *                        string (eg one returned by a server).
   */
  /* void onDeleteCalendar (in calICalendar aCalendar, in nsresult aStatus, in nsIVariant aDetail); */
  NS_IMETHOD OnDeleteCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIPROVIDERLISTENER \
  NS_IMETHOD OnCreateCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail); \
  NS_IMETHOD OnDeleteCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIPROVIDERLISTENER(_to) \
  NS_IMETHOD OnCreateCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) { return _to OnCreateCalendar(aCalendar, aStatus, aDetail); } \
  NS_IMETHOD OnDeleteCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) { return _to OnDeleteCalendar(aCalendar, aStatus, aDetail); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIPROVIDERLISTENER(_to) \
  NS_IMETHOD OnCreateCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnCreateCalendar(aCalendar, aStatus, aDetail); } \
  NS_IMETHOD OnDeleteCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDeleteCalendar(aCalendar, aStatus, aDetail); } 

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

/* Header file */
class _MYCLASS_ : public calIProviderListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIPROVIDERLISTENER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void onCreateCalendar (in calICalendar aCalendar, in nsresult aStatus, in nsIVariant aDetail); */
NS_IMETHODIMP _MYCLASS_::OnCreateCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onDeleteCalendar (in calICalendar aCalendar, in nsresult aStatus, in nsIVariant aDetail); */
NS_IMETHODIMP _MYCLASS_::OnDeleteCalendar(calICalendar *aCalendar, nsresult aStatus, nsIVariant *aDetail)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calICalendarProvider_h__ */
