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

#ifndef __gen_calITimezoneProvider_h__
#define __gen_calITimezoneProvider_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 nsIUTF8StringEnumerator; /* forward declaration */

class calITimezone; /* forward declaration */


/* starting interface:    calITimezoneProvider */
#define CALITIMEZONEPROVIDER_IID_STR "0e502bf5-4fd3-4090-9122-f1ec3ca701bb"

#define CALITIMEZONEPROVIDER_IID \
  {0x0e502bf5, 0x4fd3, 0x4090, \
    { 0x91, 0x22, 0xf1, 0xec, 0x3c, 0xa7, 0x01, 0xbb }}

class NS_NO_VTABLE calITimezoneProvider : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALITIMEZONEPROVIDER_IID)

  /* readonly attribute nsIUTF8StringEnumerator timezoneIds; */
  NS_IMETHOD GetTimezoneIds(nsIUTF8StringEnumerator * *aTimezoneIds) = 0;

  /**
     * Gets a timezone defintion passing a TZID.
     * Returns null in case of an unknown TZID.
     *
     * @param tzid       a TZID to be resolved
     * @return           a timezone object or null
     */
  /* calITimezone getTimezone (in AUTF8String tzid); */
  NS_IMETHOD GetTimezone(const nsACString & tzid, calITimezone **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALITIMEZONEPROVIDER \
  NS_IMETHOD GetTimezoneIds(nsIUTF8StringEnumerator * *aTimezoneIds); \
  NS_IMETHOD GetTimezone(const nsACString & tzid, calITimezone **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALITIMEZONEPROVIDER(_to) \
  NS_IMETHOD GetTimezoneIds(nsIUTF8StringEnumerator * *aTimezoneIds) { return _to GetTimezoneIds(aTimezoneIds); } \
  NS_IMETHOD GetTimezone(const nsACString & tzid, calITimezone **_retval) { return _to GetTimezone(tzid, _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_CALITIMEZONEPROVIDER(_to) \
  NS_IMETHOD GetTimezoneIds(nsIUTF8StringEnumerator * *aTimezoneIds) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimezoneIds(aTimezoneIds); } \
  NS_IMETHOD GetTimezone(const nsACString & tzid, calITimezone **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTimezone(tzid, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calITimezoneProvider
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALITIMEZONEPROVIDER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute nsIUTF8StringEnumerator timezoneIds; */
NS_IMETHODIMP _MYCLASS_::GetTimezoneIds(nsIUTF8StringEnumerator * *aTimezoneIds)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calITimezone getTimezone (in AUTF8String tzid); */
NS_IMETHODIMP _MYCLASS_::GetTimezone(const nsACString & tzid, calITimezone **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calITimezoneService */
#define CALITIMEZONESERVICE_IID_STR "ab1bfe6a-ee95-4038-b594-34aeeda9911a"

#define CALITIMEZONESERVICE_IID \
  {0xab1bfe6a, 0xee95, 0x4038, \
    { 0xb5, 0x94, 0x34, 0xae, 0xed, 0xa9, 0x91, 0x1a }}

/**
 * This service acts as a central access point for the up to date set
 * of Olson timezone definitions.
 */
class NS_NO_VTABLE calITimezoneService : public calITimezoneProvider {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALITIMEZONESERVICE_IID)

  /* readonly attribute calITimezone floating; */
  NS_IMETHOD GetFloating(calITimezone * *aFloating) = 0;

  /* readonly attribute calITimezone UTC; */
  NS_IMETHOD GetUTC(calITimezone * *aUTC) = 0;

  /**
     * Provides the version of the underlying timezone database.
     */
  /* readonly attribute AString version; */
  NS_IMETHOD GetVersion(nsAString & aVersion) = 0;

  /**
     * Returns the default timezone from calendar.timezone.local. If no timezone
     * has been set, a best guess is taken from the operating system and the
     * timezone is saved into the above mentioned pref.
     */
  /* readonly attribute calITimezone defaultTimezone; */
  NS_IMETHOD GetDefaultTimezone(calITimezone * *aDefaultTimezone) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALITIMEZONESERVICE \
  NS_IMETHOD GetFloating(calITimezone * *aFloating); \
  NS_IMETHOD GetUTC(calITimezone * *aUTC); \
  NS_IMETHOD GetVersion(nsAString & aVersion); \
  NS_IMETHOD GetDefaultTimezone(calITimezone * *aDefaultTimezone); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALITIMEZONESERVICE(_to) \
  NS_IMETHOD GetFloating(calITimezone * *aFloating) { return _to GetFloating(aFloating); } \
  NS_IMETHOD GetUTC(calITimezone * *aUTC) { return _to GetUTC(aUTC); } \
  NS_IMETHOD GetVersion(nsAString & aVersion) { return _to GetVersion(aVersion); } \
  NS_IMETHOD GetDefaultTimezone(calITimezone * *aDefaultTimezone) { return _to GetDefaultTimezone(aDefaultTimezone); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALITIMEZONESERVICE(_to) \
  NS_IMETHOD GetFloating(calITimezone * *aFloating) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFloating(aFloating); } \
  NS_IMETHOD GetUTC(calITimezone * *aUTC) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUTC(aUTC); } \
  NS_IMETHOD GetVersion(nsAString & aVersion) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetVersion(aVersion); } \
  NS_IMETHOD GetDefaultTimezone(calITimezone * *aDefaultTimezone) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultTimezone(aDefaultTimezone); } 

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

/* Header file */
class _MYCLASS_ : public calITimezoneService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALITIMEZONESERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute calITimezone floating; */
NS_IMETHODIMP _MYCLASS_::GetFloating(calITimezone * *aFloating)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calITimezone UTC; */
NS_IMETHODIMP _MYCLASS_::GetUTC(calITimezone * *aUTC)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AString version; */
NS_IMETHODIMP _MYCLASS_::GetVersion(nsAString & aVersion)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calITimezone defaultTimezone; */
NS_IMETHODIMP _MYCLASS_::GetDefaultTimezone(calITimezone * *aDefaultTimezone)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calITimezoneProvider_h__ */
