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

#ifndef __gen_calIWeekInfoService_h__
#define __gen_calIWeekInfoService_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 calIDateTime; /* forward declaration */


/* starting interface:    calIWeekInfoService */
#define CALIWEEKINFOSERVICE_IID_STR "650fd33b-ebf4-46fa-b9ca-dd80b2451498"

#define CALIWEEKINFOSERVICE_IID \
  {0x650fd33b, 0xebf4, 0x46fa, \
    { 0xb9, 0xca, 0xdd, 0x80, 0xb2, 0x45, 0x14, 0x98 }}

/**
 * This interface will calculate a week title from a given datetime. This
 * will depends on the users preferences. 
 * Extensions might override the default implementation, in order to
 * generate week titles aimed at special cases (like weeknumbers for a
 * schoolyear)
 */
class NS_NO_VTABLE calIWeekInfoService : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIWEEKINFOSERVICE_IID)

  /**
     * Return the week title. It's meant to be displayed.
     * (Usually, will return a weeknumber, but might return a string like Q1W4)
     *
     * @param dateTime
     *            The dateTime to get the weektitle for
     * @returns
     *            A string, representing the week title. Will usually be the
     *            week number. Every week (7 days) should get a different string,
     *            but the switch from one week to the next isn't necessarily
     *            on sunday.
     */
  /* AString getWeekTitle (in calIDateTime dateTime); */
  NS_IMETHOD GetWeekTitle(calIDateTime *dateTime, nsAString & _retval) = 0;

  /**
     * Gets the first day of a week of a passed day under consideration 
     * of the preference setting "calendar.week.start"
     *
     * @param aDate     The dateTime to get get the start of the week for
     * @return          A dateTime-object denoting the first day of the week
     */
  /* calIDateTime getStartOfWeek (in calIDateTime dateTime); */
  NS_IMETHOD GetStartOfWeek(calIDateTime *dateTime, calIDateTime **_retval) = 0;

  /**
     * Gets the last day of a week of a passed day under consideration
     * of the preference setting "calendar.week.start"
     *
     * @param aDate     The dateTime to get get the last day of the week for
     * @return          A dateTime-object denoting the last day of the week
     */
  /* calIDateTime getEndOfWeek (in calIDateTime dateTime); */
  NS_IMETHOD GetEndOfWeek(calIDateTime *dateTime, calIDateTime **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIWEEKINFOSERVICE \
  NS_IMETHOD GetWeekTitle(calIDateTime *dateTime, nsAString & _retval); \
  NS_IMETHOD GetStartOfWeek(calIDateTime *dateTime, calIDateTime **_retval); \
  NS_IMETHOD GetEndOfWeek(calIDateTime *dateTime, calIDateTime **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIWEEKINFOSERVICE(_to) \
  NS_IMETHOD GetWeekTitle(calIDateTime *dateTime, nsAString & _retval) { return _to GetWeekTitle(dateTime, _retval); } \
  NS_IMETHOD GetStartOfWeek(calIDateTime *dateTime, calIDateTime **_retval) { return _to GetStartOfWeek(dateTime, _retval); } \
  NS_IMETHOD GetEndOfWeek(calIDateTime *dateTime, calIDateTime **_retval) { return _to GetEndOfWeek(dateTime, _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_CALIWEEKINFOSERVICE(_to) \
  NS_IMETHOD GetWeekTitle(calIDateTime *dateTime, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWeekTitle(dateTime, _retval); } \
  NS_IMETHOD GetStartOfWeek(calIDateTime *dateTime, calIDateTime **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartOfWeek(dateTime, _retval); } \
  NS_IMETHOD GetEndOfWeek(calIDateTime *dateTime, calIDateTime **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetEndOfWeek(dateTime, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calIWeekInfoService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIWEEKINFOSERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* AString getWeekTitle (in calIDateTime dateTime); */
NS_IMETHODIMP _MYCLASS_::GetWeekTitle(calIDateTime *dateTime, nsAString & _retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIDateTime getStartOfWeek (in calIDateTime dateTime); */
NS_IMETHODIMP _MYCLASS_::GetStartOfWeek(calIDateTime *dateTime, calIDateTime **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIDateTime getEndOfWeek (in calIDateTime dateTime); */
NS_IMETHODIMP _MYCLASS_::GetEndOfWeek(calIDateTime *dateTime, calIDateTime **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIWeekInfoService_h__ */
