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

#ifndef __gen_calIAlarmService_h__
#define __gen_calIAlarmService_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 calIItemBase; /* forward declaration */

class calICalendar; /* forward declaration */

class calIDuration; /* forward declaration */


/* starting interface:    calIAlarmServiceObserver */
#define CALIALARMSERVICEOBSERVER_IID_STR "c9c97643-db45-4790-9441-05384ae5c272"

#define CALIALARMSERVICEOBSERVER_IID \
  {0xc9c97643, 0xdb45, 0x4790, \
    { 0x94, 0x41, 0x05, 0x38, 0x4a, 0xe5, 0xc2, 0x72 }}

class NS_NO_VTABLE calIAlarmServiceObserver : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIALARMSERVICEOBSERVER_IID)

  /* void onAlarm (in calIItemBase item); */
  NS_IMETHOD OnAlarm(calIItemBase *item) = 0;

  /**
   * Called if alarm(s) of a specific item are to be removed from
   * the alarm window.
   *
   * @param aItem corresponding item, maybe master item of recurring
   *              series (then all alarms belonging to this item are to
   *              be removed)
   */
  /* void onRemoveAlarmsByItem (in calIItemBase item); */
  NS_IMETHOD OnRemoveAlarmsByItem(calIItemBase *item) = 0;

  /**
   * Called if all alarms of a specific calendar are to be removed.
   */
  /* void onRemoveAlarmsByCalendar (in calICalendar calendar); */
  NS_IMETHOD OnRemoveAlarmsByCalendar(calICalendar *calendar) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIALARMSERVICEOBSERVER \
  NS_IMETHOD OnAlarm(calIItemBase *item); \
  NS_IMETHOD OnRemoveAlarmsByItem(calIItemBase *item); \
  NS_IMETHOD OnRemoveAlarmsByCalendar(calICalendar *calendar); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIALARMSERVICEOBSERVER(_to) \
  NS_IMETHOD OnAlarm(calIItemBase *item) { return _to OnAlarm(item); } \
  NS_IMETHOD OnRemoveAlarmsByItem(calIItemBase *item) { return _to OnRemoveAlarmsByItem(item); } \
  NS_IMETHOD OnRemoveAlarmsByCalendar(calICalendar *calendar) { return _to OnRemoveAlarmsByCalendar(calendar); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIALARMSERVICEOBSERVER(_to) \
  NS_IMETHOD OnAlarm(calIItemBase *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAlarm(item); } \
  NS_IMETHOD OnRemoveAlarmsByItem(calIItemBase *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRemoveAlarmsByItem(item); } \
  NS_IMETHOD OnRemoveAlarmsByCalendar(calICalendar *calendar) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnRemoveAlarmsByCalendar(calendar); } 

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

/* Header file */
class _MYCLASS_ : public calIAlarmServiceObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIALARMSERVICEOBSERVER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void onAlarm (in calIItemBase item); */
NS_IMETHODIMP _MYCLASS_::OnAlarm(calIItemBase *item)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onRemoveAlarmsByItem (in calIItemBase item); */
NS_IMETHODIMP _MYCLASS_::OnRemoveAlarmsByItem(calIItemBase *item)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onRemoveAlarmsByCalendar (in calICalendar calendar); */
NS_IMETHODIMP _MYCLASS_::OnRemoveAlarmsByCalendar(calICalendar *calendar)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIAlarmService */
#define CALIALARMSERVICE_IID_STR "03669cf3-bf4f-4692-97a1-cca891964a1d"

#define CALIALARMSERVICE_IID \
  {0x03669cf3, 0xbf4f, 0x4692, \
    { 0x97, 0xa1, 0xcc, 0xa8, 0x91, 0x96, 0x4a, 0x1d }}

class NS_NO_VTABLE calIAlarmService : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIALARMSERVICE_IID)

  /**
   * This is the timezone that all-day events will be converted to in order to
   * determine when their alarms should fire.
   */
  /* attribute AUTF8String timezone; */
  NS_IMETHOD GetTimezone(nsACString & aTimezone) = 0;
  NS_IMETHOD SetTimezone(const nsACString & aTimezone) = 0;

  /**
   * Cause the alarm service to start up, create a list of upcoming
   * alarms in all registered calendars, add observers to watch for
   * calendar registration and unregistration, and setup a timer to
   * maintain that list and fire alarms.
   *
   * @note Will throw NS_ERROR_NOT_INITIALIZED if you have not previously set
   *       the timezone attribute.
   */
  /* void startup (); */
  NS_IMETHOD Startup(void) = 0;

  /* void addObserver (in calIAlarmServiceObserver observer); */
  NS_IMETHOD AddObserver(calIAlarmServiceObserver *observer) = 0;

  /* void removeObserver (in calIAlarmServiceObserver observer); */
  NS_IMETHOD RemoveObserver(calIAlarmServiceObserver *observer) = 0;

  /* void snoozeAlarm (in calIItemBase item, in calIDuration duration); */
  NS_IMETHOD SnoozeAlarm(calIItemBase *item, calIDuration *duration) = 0;

  /**
   * Dismisses an alarm corresponding to the passed item.
   */
  /* void dismissAlarm (in calIItemBase item); */
  NS_IMETHOD DismissAlarm(calIItemBase *item) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIALARMSERVICE \
  NS_IMETHOD GetTimezone(nsACString & aTimezone); \
  NS_IMETHOD SetTimezone(const nsACString & aTimezone); \
  NS_IMETHOD Startup(void); \
  NS_IMETHOD AddObserver(calIAlarmServiceObserver *observer); \
  NS_IMETHOD RemoveObserver(calIAlarmServiceObserver *observer); \
  NS_IMETHOD SnoozeAlarm(calIItemBase *item, calIDuration *duration); \
  NS_IMETHOD DismissAlarm(calIItemBase *item); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIALARMSERVICE(_to) \
  NS_IMETHOD GetTimezone(nsACString & aTimezone) { return _to GetTimezone(aTimezone); } \
  NS_IMETHOD SetTimezone(const nsACString & aTimezone) { return _to SetTimezone(aTimezone); } \
  NS_IMETHOD Startup(void) { return _to Startup(); } \
  NS_IMETHOD AddObserver(calIAlarmServiceObserver *observer) { return _to AddObserver(observer); } \
  NS_IMETHOD RemoveObserver(calIAlarmServiceObserver *observer) { return _to RemoveObserver(observer); } \
  NS_IMETHOD SnoozeAlarm(calIItemBase *item, calIDuration *duration) { return _to SnoozeAlarm(item, duration); } \
  NS_IMETHOD DismissAlarm(calIItemBase *item) { return _to DismissAlarm(item); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIALARMSERVICE(_to) \
  NS_IMETHOD GetTimezone(nsACString & aTimezone) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimezone(aTimezone); } \
  NS_IMETHOD SetTimezone(const nsACString & aTimezone) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTimezone(aTimezone); } \
  NS_IMETHOD Startup(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Startup(); } \
  NS_IMETHOD AddObserver(calIAlarmServiceObserver *observer) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(observer); } \
  NS_IMETHOD RemoveObserver(calIAlarmServiceObserver *observer) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(observer); } \
  NS_IMETHOD SnoozeAlarm(calIItemBase *item, calIDuration *duration) { return !_to ? NS_ERROR_NULL_POINTER : _to->SnoozeAlarm(item, duration); } \
  NS_IMETHOD DismissAlarm(calIItemBase *item) { return !_to ? NS_ERROR_NULL_POINTER : _to->DismissAlarm(item); } 

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

/* Header file */
class _MYCLASS_ : public calIAlarmService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIALARMSERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* attribute AUTF8String timezone; */
NS_IMETHODIMP _MYCLASS_::GetTimezone(nsACString & aTimezone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetTimezone(const nsACString & aTimezone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void startup (); */
NS_IMETHODIMP _MYCLASS_::Startup()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addObserver (in calIAlarmServiceObserver observer); */
NS_IMETHODIMP _MYCLASS_::AddObserver(calIAlarmServiceObserver *observer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeObserver (in calIAlarmServiceObserver observer); */
NS_IMETHODIMP _MYCLASS_::RemoveObserver(calIAlarmServiceObserver *observer)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void snoozeAlarm (in calIItemBase item, in calIDuration duration); */
NS_IMETHODIMP _MYCLASS_::SnoozeAlarm(calIItemBase *item, calIDuration *duration)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void dismissAlarm (in calIItemBase item); */
NS_IMETHODIMP _MYCLASS_::DismissAlarm(calIItemBase *item)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIAlarmService_h__ */
