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

#ifndef __gen_calIDateTime_h__
#define __gen_calIDateTime_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 calIDuration; /* forward declaration */


/* starting interface:    calIDateTime */
#define CALIDATETIME_IID_STR "5678d4a3-2543-4ece-afbb-079292f2866e"

#define CALIDATETIME_IID \
  {0x5678d4a3, 0x2543, 0x4ece, \
    { 0xaf, 0xbb, 0x07, 0x92, 0x92, 0xf2, 0x86, 0x6e }}

class NS_NO_VTABLE calIDateTime : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIDATETIME_IID)

  /**
   * isMutable is true if this instance is modifiable.
   * If isMutable is false, any attempts to modify
   * the object will throw CAL_ERROR_ITEM_IS_MUTABLE.
   */
  /* readonly attribute boolean isMutable; */
  NS_IMETHOD GetIsMutable(PRBool *aIsMutable) = 0;

  /**
   * Make this calIDateTime instance immutable.
   */
  /* void makeImmutable (); */
  NS_IMETHOD MakeImmutable(void) = 0;

  /**
   * Clone this calIDateTime instance into a new
   * mutable object.
   */
  /* calIDateTime clone (); */
  NS_IMETHOD Clone(calIDateTime **_retval) = 0;

  /**
   * valid is true if this object contains a valid
   * time/date.
   */
  /* readonly attribute boolean isValid; */
  NS_IMETHOD GetIsValid(PRBool *aIsValid) = 0;

  /**
   * nativeTime contains this instance's PRTime value relative
   * to the UTC epoch, regardless of the timezone that's set
   * on this instance.  If nativeTime is set, the given UTC PRTime
   * value is exploded into year/month/etc, taking into account
   * the timezone setting.
   *
   * @warning: When the timezone is set to 'floating', this will return
   * the nativeTime as-if the timezone was UTC. Take this into account
   * when comparing values.
   * 
   * @note on objects that are pinned to a timezone and have isDate set,
   * nativeTime will be 00:00:00 in the timezone of that date, not 00:00:00 in 
   * UTC.
   */
  /* attribute PRTime nativeTime; */
  NS_IMETHOD GetNativeTime(PRTime *aNativeTime) = 0;
  NS_IMETHOD SetNativeTime(PRTime aNativeTime) = 0;

  /**
   * Full 4-digit year value (e.g. "1989", "2004")
   */
  /* attribute short year; */
  NS_IMETHOD GetYear(PRInt16 *aYear) = 0;
  NS_IMETHOD SetYear(PRInt16 aYear) = 0;

  /**
   * Month, 0-11, 0 = January
   */
  /* attribute short month; */
  NS_IMETHOD GetMonth(PRInt16 *aMonth) = 0;
  NS_IMETHOD SetMonth(PRInt16 aMonth) = 0;

  /**
   * Day of month, 1-[28,29,30,31]
   */
  /* attribute short day; */
  NS_IMETHOD GetDay(PRInt16 *aDay) = 0;
  NS_IMETHOD SetDay(PRInt16 aDay) = 0;

  /**
   * Hour, 0-23
   */
  /* attribute short hour; */
  NS_IMETHOD GetHour(PRInt16 *aHour) = 0;
  NS_IMETHOD SetHour(PRInt16 aHour) = 0;

  /**
   * Minute, 0-59
   */
  /* attribute short minute; */
  NS_IMETHOD GetMinute(PRInt16 *aMinute) = 0;
  NS_IMETHOD SetMinute(PRInt16 aMinute) = 0;

  /**
   * Second, 0-59
   */
  /* attribute short second; */
  NS_IMETHOD GetSecond(PRInt16 *aSecond) = 0;
  NS_IMETHOD SetSecond(PRInt16 aSecond) = 0;

  /**
   * Gets or sets the timezone of this calIDateTime instance.
   * Setting the timezone does not change the actual date/time components;
   * to convert between timezones, use getInTimezone(). 
   *
   * Valid values are:
   *
   * - "UTC" (or "utc", "UTC" preferred)
   *   - the object refers to a time in UTC.
   * - a TZID string, understood by the ICS Service
   *   - the object refers to a time in that tz
   * - "floating"
   *   - the object is in floating time and does not have an
   *     associated timezone.
   *
   * @throws NS_ERROR_INVALID_ARG if an invalid timezone is passed in.
   */
  /* attribute AUTF8String timezone; */
  NS_IMETHOD GetTimezone(nsACString & aTimezone) = 0;
  NS_IMETHOD SetTimezone(const nsACString & aTimezone) = 0;

  /**
   * Resets the datetime object.
   *
   * @param year     full 4-digit year value (e.g. "1989", "2004")
   * @param month    month, 0-11, 0 = January
   * @param day      day of month, 1-[28,29,31]
   * @param hour     hour, 0-23
   * @param minute   minute, 0-59
   * @param second   decond, 0-59
   * @param timezone timezone, e.g. "UTC", "floating", "Europe/Berlin"
   *
   * The passed datetime will be normalized, e.g. a minute value of 60 will
   * increase the hour.
   *
   * @throws NS_ERROR_INVALID_ARG if an invalid timezone is passed in.
   */
  /* void resetTo (in short year, in short month, in short day, in short hour, in short minute, in short second, in AUTF8String timezone); */
  NS_IMETHOD ResetTo(PRInt16 year, PRInt16 month, PRInt16 day, PRInt16 hour, PRInt16 minute, PRInt16 second, const nsACString & timezone) = 0;

  /**
   * The offset of the timezone this datetime is in, relative to UTC, in
   * seconds. A positive number means that the timezone is ahead of UTC.
   */
  /* readonly attribute long timezoneOffset; */
  NS_IMETHOD GetTimezoneOffset(PRInt32 *aTimezoneOffset) = 0;

  /**
   * isDate indicates that this calIDateTime instance represents a date
   * (a whole day), and not a specific time on that day.  If isDate is set,
   * accessing the hour/minute/second fields will return 0, and and setting
   * them is an illegal operation.
   */
  /* attribute PRBool isDate; */
  NS_IMETHOD GetIsDate(PRBool *aIsDate) = 0;
  NS_IMETHOD SetIsDate(PRBool aIsDate) = 0;

  /**
   * Day of the week. 0-6, with Sunday = 0.
   */
  /* readonly attribute short weekday; */
  NS_IMETHOD GetWeekday(PRInt16 *aWeekday) = 0;

  /**
   * Day of the year, 1-[365,366].
   */
  /* readonly attribute short yearday; */
  NS_IMETHOD GetYearday(PRInt16 *aYearday) = 0;

  /**
   * Resets this instance to Jan 1, 1970 00:00:00 UTC.
   */
  /* void reset (); */
  NS_IMETHOD Reset(void) = 0;

  /**
   * Return a string representation of this instance.
   */
  /* AUTF8String toString (); */
  NS_IMETHOD ToString(nsACString & _retval) = 0;

  /**
   * Set the value of this calIDateTime instance
   * to aTime milliseconds since the epoch in the
   * given timezone.  Valid values for the aTimezone
   * are either a known TZID or "UTC"; null/empty string
   * is not valid.
   */
  /* void setTimeInTimezone (in PRTime aTime, in AUTF8String aTimezone); */
  NS_IMETHOD SetTimeInTimezone(PRTime aTime, const nsACString & aTimezone) = 0;

  /**
   * Return a new calIDateTime instance that's the result of
   * converting this one into the given timezone.  Valid values
   * for aTimezone are the same as the timezone field.  If
   * the "floating" timezone is given, then this object
   * is just cloned, and the timezone is set to floating.
   */
  /* calIDateTime getInTimezone (in AUTF8String aTimezone); */
  NS_IMETHOD GetInTimezone(const nsACString & aTimezone, calIDateTime **_retval) = 0;

  /* void addDuration (in calIDuration aDuration); */
  NS_IMETHOD AddDuration(calIDuration *aDuration) = 0;

  /* calIDuration subtractDate (in calIDateTime aOtherDate); */
  NS_IMETHOD SubtractDate(calIDateTime *aOtherDate, calIDuration **_retval) = 0;

  /**
   * Compare this calIDateTime instance to aOther.  Returns -1, 0, 1 to
   * indicate if this < aOther, this == aOther, or this > aOther,
   * respectively.
   *
   * This comparison is timezone-aware; the given values are converted
   * to a common timezone before comparing. If either this or aOther is
   * floating, both objects are treated as floating for the comparison.
   *
   * If either this or aOther has isDate set, then only the date portion is
   * compared.
   * 
   * @exception calIErrors.INVALID_TIMEZONE  bad timezone on this object
   *                                         (not the argument object)
   */
  /* long compare (in calIDateTime aOther); */
  NS_IMETHOD Compare(calIDateTime *aOther, PRInt32 *_retval) = 0;

  /* readonly attribute calIDateTime startOfWeek; */
  NS_IMETHOD GetStartOfWeek(calIDateTime * *aStartOfWeek) = 0;

  /* readonly attribute calIDateTime endOfWeek; */
  NS_IMETHOD GetEndOfWeek(calIDateTime * *aEndOfWeek) = 0;

  /* readonly attribute calIDateTime startOfMonth; */
  NS_IMETHOD GetStartOfMonth(calIDateTime * *aStartOfMonth) = 0;

  /* readonly attribute calIDateTime endOfMonth; */
  NS_IMETHOD GetEndOfMonth(calIDateTime * *aEndOfMonth) = 0;

  /* readonly attribute calIDateTime startOfYear; */
  NS_IMETHOD GetStartOfYear(calIDateTime * *aStartOfYear) = 0;

  /* readonly attribute calIDateTime endOfYear; */
  NS_IMETHOD GetEndOfYear(calIDateTime * *aEndOfYear) = 0;

  /* [noscript, notxpcom] void toIcalTime (in icaltimetypeptr itt); */
  NS_IMETHOD_(void) ToIcalTime(struct icaltimetype * itt) = 0;

  /**
   * This object as either an iCalendar DATE or DATETIME string, as
   * appropriate.
   */
  /* attribute ACString icalString; */
  NS_IMETHOD GetIcalString(nsACString & aIcalString) = 0;
  NS_IMETHOD SetIcalString(const nsACString & aIcalString) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIDATETIME \
  NS_IMETHOD GetIsMutable(PRBool *aIsMutable); \
  NS_IMETHOD MakeImmutable(void); \
  NS_IMETHOD Clone(calIDateTime **_retval); \
  NS_IMETHOD GetIsValid(PRBool *aIsValid); \
  NS_IMETHOD GetNativeTime(PRTime *aNativeTime); \
  NS_IMETHOD SetNativeTime(PRTime aNativeTime); \
  NS_IMETHOD GetYear(PRInt16 *aYear); \
  NS_IMETHOD SetYear(PRInt16 aYear); \
  NS_IMETHOD GetMonth(PRInt16 *aMonth); \
  NS_IMETHOD SetMonth(PRInt16 aMonth); \
  NS_IMETHOD GetDay(PRInt16 *aDay); \
  NS_IMETHOD SetDay(PRInt16 aDay); \
  NS_IMETHOD GetHour(PRInt16 *aHour); \
  NS_IMETHOD SetHour(PRInt16 aHour); \
  NS_IMETHOD GetMinute(PRInt16 *aMinute); \
  NS_IMETHOD SetMinute(PRInt16 aMinute); \
  NS_IMETHOD GetSecond(PRInt16 *aSecond); \
  NS_IMETHOD SetSecond(PRInt16 aSecond); \
  NS_IMETHOD GetTimezone(nsACString & aTimezone); \
  NS_IMETHOD SetTimezone(const nsACString & aTimezone); \
  NS_IMETHOD ResetTo(PRInt16 year, PRInt16 month, PRInt16 day, PRInt16 hour, PRInt16 minute, PRInt16 second, const nsACString & timezone); \
  NS_IMETHOD GetTimezoneOffset(PRInt32 *aTimezoneOffset); \
  NS_IMETHOD GetIsDate(PRBool *aIsDate); \
  NS_IMETHOD SetIsDate(PRBool aIsDate); \
  NS_IMETHOD GetWeekday(PRInt16 *aWeekday); \
  NS_IMETHOD GetYearday(PRInt16 *aYearday); \
  NS_IMETHOD Reset(void); \
  NS_IMETHOD ToString(nsACString & _retval); \
  NS_IMETHOD SetTimeInTimezone(PRTime aTime, const nsACString & aTimezone); \
  NS_IMETHOD GetInTimezone(const nsACString & aTimezone, calIDateTime **_retval); \
  NS_IMETHOD AddDuration(calIDuration *aDuration); \
  NS_IMETHOD SubtractDate(calIDateTime *aOtherDate, calIDuration **_retval); \
  NS_IMETHOD Compare(calIDateTime *aOther, PRInt32 *_retval); \
  NS_IMETHOD GetStartOfWeek(calIDateTime * *aStartOfWeek); \
  NS_IMETHOD GetEndOfWeek(calIDateTime * *aEndOfWeek); \
  NS_IMETHOD GetStartOfMonth(calIDateTime * *aStartOfMonth); \
  NS_IMETHOD GetEndOfMonth(calIDateTime * *aEndOfMonth); \
  NS_IMETHOD GetStartOfYear(calIDateTime * *aStartOfYear); \
  NS_IMETHOD GetEndOfYear(calIDateTime * *aEndOfYear); \
  NS_IMETHOD_(void) ToIcalTime(struct icaltimetype * itt); \
  NS_IMETHOD GetIcalString(nsACString & aIcalString); \
  NS_IMETHOD SetIcalString(const nsACString & aIcalString); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIDATETIME(_to) \
  NS_IMETHOD GetIsMutable(PRBool *aIsMutable) { return _to GetIsMutable(aIsMutable); } \
  NS_IMETHOD MakeImmutable(void) { return _to MakeImmutable(); } \
  NS_IMETHOD Clone(calIDateTime **_retval) { return _to Clone(_retval); } \
  NS_IMETHOD GetIsValid(PRBool *aIsValid) { return _to GetIsValid(aIsValid); } \
  NS_IMETHOD GetNativeTime(PRTime *aNativeTime) { return _to GetNativeTime(aNativeTime); } \
  NS_IMETHOD SetNativeTime(PRTime aNativeTime) { return _to SetNativeTime(aNativeTime); } \
  NS_IMETHOD GetYear(PRInt16 *aYear) { return _to GetYear(aYear); } \
  NS_IMETHOD SetYear(PRInt16 aYear) { return _to SetYear(aYear); } \
  NS_IMETHOD GetMonth(PRInt16 *aMonth) { return _to GetMonth(aMonth); } \
  NS_IMETHOD SetMonth(PRInt16 aMonth) { return _to SetMonth(aMonth); } \
  NS_IMETHOD GetDay(PRInt16 *aDay) { return _to GetDay(aDay); } \
  NS_IMETHOD SetDay(PRInt16 aDay) { return _to SetDay(aDay); } \
  NS_IMETHOD GetHour(PRInt16 *aHour) { return _to GetHour(aHour); } \
  NS_IMETHOD SetHour(PRInt16 aHour) { return _to SetHour(aHour); } \
  NS_IMETHOD GetMinute(PRInt16 *aMinute) { return _to GetMinute(aMinute); } \
  NS_IMETHOD SetMinute(PRInt16 aMinute) { return _to SetMinute(aMinute); } \
  NS_IMETHOD GetSecond(PRInt16 *aSecond) { return _to GetSecond(aSecond); } \
  NS_IMETHOD SetSecond(PRInt16 aSecond) { return _to SetSecond(aSecond); } \
  NS_IMETHOD GetTimezone(nsACString & aTimezone) { return _to GetTimezone(aTimezone); } \
  NS_IMETHOD SetTimezone(const nsACString & aTimezone) { return _to SetTimezone(aTimezone); } \
  NS_IMETHOD ResetTo(PRInt16 year, PRInt16 month, PRInt16 day, PRInt16 hour, PRInt16 minute, PRInt16 second, const nsACString & timezone) { return _to ResetTo(year, month, day, hour, minute, second, timezone); } \
  NS_IMETHOD GetTimezoneOffset(PRInt32 *aTimezoneOffset) { return _to GetTimezoneOffset(aTimezoneOffset); } \
  NS_IMETHOD GetIsDate(PRBool *aIsDate) { return _to GetIsDate(aIsDate); } \
  NS_IMETHOD SetIsDate(PRBool aIsDate) { return _to SetIsDate(aIsDate); } \
  NS_IMETHOD GetWeekday(PRInt16 *aWeekday) { return _to GetWeekday(aWeekday); } \
  NS_IMETHOD GetYearday(PRInt16 *aYearday) { return _to GetYearday(aYearday); } \
  NS_IMETHOD Reset(void) { return _to Reset(); } \
  NS_IMETHOD ToString(nsACString & _retval) { return _to ToString(_retval); } \
  NS_IMETHOD SetTimeInTimezone(PRTime aTime, const nsACString & aTimezone) { return _to SetTimeInTimezone(aTime, aTimezone); } \
  NS_IMETHOD GetInTimezone(const nsACString & aTimezone, calIDateTime **_retval) { return _to GetInTimezone(aTimezone, _retval); } \
  NS_IMETHOD AddDuration(calIDuration *aDuration) { return _to AddDuration(aDuration); } \
  NS_IMETHOD SubtractDate(calIDateTime *aOtherDate, calIDuration **_retval) { return _to SubtractDate(aOtherDate, _retval); } \
  NS_IMETHOD Compare(calIDateTime *aOther, PRInt32 *_retval) { return _to Compare(aOther, _retval); } \
  NS_IMETHOD GetStartOfWeek(calIDateTime * *aStartOfWeek) { return _to GetStartOfWeek(aStartOfWeek); } \
  NS_IMETHOD GetEndOfWeek(calIDateTime * *aEndOfWeek) { return _to GetEndOfWeek(aEndOfWeek); } \
  NS_IMETHOD GetStartOfMonth(calIDateTime * *aStartOfMonth) { return _to GetStartOfMonth(aStartOfMonth); } \
  NS_IMETHOD GetEndOfMonth(calIDateTime * *aEndOfMonth) { return _to GetEndOfMonth(aEndOfMonth); } \
  NS_IMETHOD GetStartOfYear(calIDateTime * *aStartOfYear) { return _to GetStartOfYear(aStartOfYear); } \
  NS_IMETHOD GetEndOfYear(calIDateTime * *aEndOfYear) { return _to GetEndOfYear(aEndOfYear); } \
  NS_IMETHOD_(void) ToIcalTime(struct icaltimetype * itt) { return _to ToIcalTime(itt); } \
  NS_IMETHOD GetIcalString(nsACString & aIcalString) { return _to GetIcalString(aIcalString); } \
  NS_IMETHOD SetIcalString(const nsACString & aIcalString) { return _to SetIcalString(aIcalString); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIDATETIME(_to) \
  NS_IMETHOD GetIsMutable(PRBool *aIsMutable) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsMutable(aIsMutable); } \
  NS_IMETHOD MakeImmutable(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->MakeImmutable(); } \
  NS_IMETHOD Clone(calIDateTime **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clone(_retval); } \
  NS_IMETHOD GetIsValid(PRBool *aIsValid) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsValid(aIsValid); } \
  NS_IMETHOD GetNativeTime(PRTime *aNativeTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNativeTime(aNativeTime); } \
  NS_IMETHOD SetNativeTime(PRTime aNativeTime) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetNativeTime(aNativeTime); } \
  NS_IMETHOD GetYear(PRInt16 *aYear) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetYear(aYear); } \
  NS_IMETHOD SetYear(PRInt16 aYear) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetYear(aYear); } \
  NS_IMETHOD GetMonth(PRInt16 *aMonth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMonth(aMonth); } \
  NS_IMETHOD SetMonth(PRInt16 aMonth) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMonth(aMonth); } \
  NS_IMETHOD GetDay(PRInt16 *aDay) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDay(aDay); } \
  NS_IMETHOD SetDay(PRInt16 aDay) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDay(aDay); } \
  NS_IMETHOD GetHour(PRInt16 *aHour) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHour(aHour); } \
  NS_IMETHOD SetHour(PRInt16 aHour) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHour(aHour); } \
  NS_IMETHOD GetMinute(PRInt16 *aMinute) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMinute(aMinute); } \
  NS_IMETHOD SetMinute(PRInt16 aMinute) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetMinute(aMinute); } \
  NS_IMETHOD GetSecond(PRInt16 *aSecond) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecond(aSecond); } \
  NS_IMETHOD SetSecond(PRInt16 aSecond) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecond(aSecond); } \
  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 ResetTo(PRInt16 year, PRInt16 month, PRInt16 day, PRInt16 hour, PRInt16 minute, PRInt16 second, const nsACString & timezone) { return !_to ? NS_ERROR_NULL_POINTER : _to->ResetTo(year, month, day, hour, minute, second, timezone); } \
  NS_IMETHOD GetTimezoneOffset(PRInt32 *aTimezoneOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimezoneOffset(aTimezoneOffset); } \
  NS_IMETHOD GetIsDate(PRBool *aIsDate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsDate(aIsDate); } \
  NS_IMETHOD SetIsDate(PRBool aIsDate) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIsDate(aIsDate); } \
  NS_IMETHOD GetWeekday(PRInt16 *aWeekday) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWeekday(aWeekday); } \
  NS_IMETHOD GetYearday(PRInt16 *aYearday) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetYearday(aYearday); } \
  NS_IMETHOD Reset(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reset(); } \
  NS_IMETHOD ToString(nsACString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToString(_retval); } \
  NS_IMETHOD SetTimeInTimezone(PRTime aTime, const nsACString & aTimezone) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTimeInTimezone(aTime, aTimezone); } \
  NS_IMETHOD GetInTimezone(const nsACString & aTimezone, calIDateTime **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInTimezone(aTimezone, _retval); } \
  NS_IMETHOD AddDuration(calIDuration *aDuration) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddDuration(aDuration); } \
  NS_IMETHOD SubtractDate(calIDateTime *aOtherDate, calIDuration **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SubtractDate(aOtherDate, _retval); } \
  NS_IMETHOD Compare(calIDateTime *aOther, PRInt32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Compare(aOther, _retval); } \
  NS_IMETHOD GetStartOfWeek(calIDateTime * *aStartOfWeek) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOfWeek(aStartOfWeek); } \
  NS_IMETHOD GetEndOfWeek(calIDateTime * *aEndOfWeek) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndOfWeek(aEndOfWeek); } \
  NS_IMETHOD GetStartOfMonth(calIDateTime * *aStartOfMonth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOfMonth(aStartOfMonth); } \
  NS_IMETHOD GetEndOfMonth(calIDateTime * *aEndOfMonth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndOfMonth(aEndOfMonth); } \
  NS_IMETHOD GetStartOfYear(calIDateTime * *aStartOfYear) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOfYear(aStartOfYear); } \
  NS_IMETHOD GetEndOfYear(calIDateTime * *aEndOfYear) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndOfYear(aEndOfYear); } \
  NS_IMETHOD_(void) ToIcalTime(struct icaltimetype * itt) { return !_to ? NS_ERROR_NULL_POINTER : _to->ToIcalTime(itt); } \
  NS_IMETHOD GetIcalString(nsACString & aIcalString) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIcalString(aIcalString); } \
  NS_IMETHOD SetIcalString(const nsACString & aIcalString) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetIcalString(aIcalString); } 

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

/* Header file */
class _MYCLASS_ : public calIDateTime
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIDATETIME

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute boolean isMutable; */
NS_IMETHODIMP _MYCLASS_::GetIsMutable(PRBool *aIsMutable)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void makeImmutable (); */
NS_IMETHODIMP _MYCLASS_::MakeImmutable()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIDateTime clone (); */
NS_IMETHODIMP _MYCLASS_::Clone(calIDateTime **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean isValid; */
NS_IMETHODIMP _MYCLASS_::GetIsValid(PRBool *aIsValid)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute PRTime nativeTime; */
NS_IMETHODIMP _MYCLASS_::GetNativeTime(PRTime *aNativeTime)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetNativeTime(PRTime aNativeTime)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short year; */
NS_IMETHODIMP _MYCLASS_::GetYear(PRInt16 *aYear)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetYear(PRInt16 aYear)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short month; */
NS_IMETHODIMP _MYCLASS_::GetMonth(PRInt16 *aMonth)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetMonth(PRInt16 aMonth)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short day; */
NS_IMETHODIMP _MYCLASS_::GetDay(PRInt16 *aDay)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetDay(PRInt16 aDay)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short hour; */
NS_IMETHODIMP _MYCLASS_::GetHour(PRInt16 *aHour)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetHour(PRInt16 aHour)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short minute; */
NS_IMETHODIMP _MYCLASS_::GetMinute(PRInt16 *aMinute)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetMinute(PRInt16 aMinute)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute short second; */
NS_IMETHODIMP _MYCLASS_::GetSecond(PRInt16 *aSecond)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetSecond(PRInt16 aSecond)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* 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 resetTo (in short year, in short month, in short day, in short hour, in short minute, in short second, in AUTF8String timezone); */
NS_IMETHODIMP _MYCLASS_::ResetTo(PRInt16 year, PRInt16 month, PRInt16 day, PRInt16 hour, PRInt16 minute, PRInt16 second, const nsACString & timezone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute long timezoneOffset; */
NS_IMETHODIMP _MYCLASS_::GetTimezoneOffset(PRInt32 *aTimezoneOffset)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute PRBool isDate; */
NS_IMETHODIMP _MYCLASS_::GetIsDate(PRBool *aIsDate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetIsDate(PRBool aIsDate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute short weekday; */
NS_IMETHODIMP _MYCLASS_::GetWeekday(PRInt16 *aWeekday)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute short yearday; */
NS_IMETHODIMP _MYCLASS_::GetYearday(PRInt16 *aYearday)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void reset (); */
NS_IMETHODIMP _MYCLASS_::Reset()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* AUTF8String toString (); */
NS_IMETHODIMP _MYCLASS_::ToString(nsACString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void setTimeInTimezone (in PRTime aTime, in AUTF8String aTimezone); */
NS_IMETHODIMP _MYCLASS_::SetTimeInTimezone(PRTime aTime, const nsACString & aTimezone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIDateTime getInTimezone (in AUTF8String aTimezone); */
NS_IMETHODIMP _MYCLASS_::GetInTimezone(const nsACString & aTimezone, calIDateTime **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void addDuration (in calIDuration aDuration); */
NS_IMETHODIMP _MYCLASS_::AddDuration(calIDuration *aDuration)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIDuration subtractDate (in calIDateTime aOtherDate); */
NS_IMETHODIMP _MYCLASS_::SubtractDate(calIDateTime *aOtherDate, calIDuration **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long compare (in calIDateTime aOther); */
NS_IMETHODIMP _MYCLASS_::Compare(calIDateTime *aOther, PRInt32 *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime startOfWeek; */
NS_IMETHODIMP _MYCLASS_::GetStartOfWeek(calIDateTime * *aStartOfWeek)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime endOfWeek; */
NS_IMETHODIMP _MYCLASS_::GetEndOfWeek(calIDateTime * *aEndOfWeek)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime startOfMonth; */
NS_IMETHODIMP _MYCLASS_::GetStartOfMonth(calIDateTime * *aStartOfMonth)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime endOfMonth; */
NS_IMETHODIMP _MYCLASS_::GetEndOfMonth(calIDateTime * *aEndOfMonth)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime startOfYear; */
NS_IMETHODIMP _MYCLASS_::GetStartOfYear(calIDateTime * *aStartOfYear)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIDateTime endOfYear; */
NS_IMETHODIMP _MYCLASS_::GetEndOfYear(calIDateTime * *aEndOfYear)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* [noscript, notxpcom] void toIcalTime (in icaltimetypeptr itt); */
NS_IMETHODIMP_(void) _MYCLASS_::ToIcalTime(struct icaltimetype * itt)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute ACString icalString; */
NS_IMETHODIMP _MYCLASS_::GetIcalString(nsACString & aIcalString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetIcalString(const nsACString & aIcalString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIDateTime_h__ */
