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

#ifndef __gen_calIFreeBusyProvider_h__
#define __gen_calIFreeBusyProvider_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 */

class calIPeriod; /* forward declaration */

class calIOperation; /* forward declaration */

class calIGenericOperationListener; /* forward declaration */


/* starting interface:    calIFreeBusyProvider */
#define CALIFREEBUSYPROVIDER_IID_STR "eb24424c-dd22-4306-9379-fa098c61f5af"

#define CALIFREEBUSYPROVIDER_IID \
  {0xeb24424c, 0xdd22, 0x4306, \
    { 0x93, 0x79, 0xfa, 0x09, 0x8c, 0x61, 0xf5, 0xaf }}

class NS_NO_VTABLE calIFreeBusyProvider : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIFREEBUSYPROVIDER_IID)

  /**
     * Gets free/busy intervals.
     * Results are notified to the passed listener interface.
     *
     * @param aCalId      calid or MAILTO:rfc822addr
     * @param aRangeStart start time of free-busy search
     * @param aRangeEnd   end time of free-busy search
     * @param aBusyTypes  what free-busy intervals should be returned
     * @param aListener   called with an array of calIFreeBusyInterval objects
     * @return            optional operation handle to track the operation
     */
  /* calIOperation getFreeBusyIntervals (in AUTF8String aCalId, in calIDateTime aRangeStart, in calIDateTime aRangeEnd, in unsigned long aBusyTypes, in calIGenericOperationListener aListener); */
  NS_IMETHOD GetFreeBusyIntervals(const nsACString & aCalId, calIDateTime *aRangeStart, calIDateTime *aRangeEnd, PRUint32 aBusyTypes, calIGenericOperationListener *aListener, calIOperation **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIFREEBUSYPROVIDER \
  NS_IMETHOD GetFreeBusyIntervals(const nsACString & aCalId, calIDateTime *aRangeStart, calIDateTime *aRangeEnd, PRUint32 aBusyTypes, calIGenericOperationListener *aListener, calIOperation **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIFREEBUSYPROVIDER(_to) \
  NS_IMETHOD GetFreeBusyIntervals(const nsACString & aCalId, calIDateTime *aRangeStart, calIDateTime *aRangeEnd, PRUint32 aBusyTypes, calIGenericOperationListener *aListener, calIOperation **_retval) { return _to GetFreeBusyIntervals(aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener, _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_CALIFREEBUSYPROVIDER(_to) \
  NS_IMETHOD GetFreeBusyIntervals(const nsACString & aCalId, calIDateTime *aRangeStart, calIDateTime *aRangeEnd, PRUint32 aBusyTypes, calIGenericOperationListener *aListener, calIOperation **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFreeBusyIntervals(aCalId, aRangeStart, aRangeEnd, aBusyTypes, aListener, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calIFreeBusyProvider
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIFREEBUSYPROVIDER

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* calIOperation getFreeBusyIntervals (in AUTF8String aCalId, in calIDateTime aRangeStart, in calIDateTime aRangeEnd, in unsigned long aBusyTypes, in calIGenericOperationListener aListener); */
NS_IMETHODIMP _MYCLASS_::GetFreeBusyIntervals(const nsACString & aCalId, calIDateTime *aRangeStart, calIDateTime *aRangeEnd, PRUint32 aBusyTypes, calIGenericOperationListener *aListener, calIOperation **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIFreeBusyInterval */
#define CALIFREEBUSYINTERVAL_IID_STR "ccbeaf5e-db87-4bc9-8bb7-24754b76bcb5"

#define CALIFREEBUSYINTERVAL_IID \
  {0xccbeaf5e, 0xdb87, 0x4bc9, \
    { 0x8b, 0xb7, 0x24, 0x75, 0x4b, 0x76, 0xbc, 0xb5 }}

/**
 * This interface reflects a free or busy interval in time.
 * Referring to RFC 2445, section 4.2.9, for the different types.
 */
class NS_NO_VTABLE calIFreeBusyInterval : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIFREEBUSYINTERVAL_IID)

  /**
     * The calId this free-busy period belongs to.
     */
  /* readonly attribute AUTF8String calId; */
  NS_IMETHOD GetCalId(nsACString & aCalId) = 0;

  /**
     * The free-busy time interval.
     */
  /* readonly attribute calIPeriod interval; */
  NS_IMETHOD GetInterval(calIPeriod * *aInterval) = 0;

  /**
     * The value UNKNOWN indicates that the free-busy information for the time interval is
     * not known.
     */
  enum { UNKNOWN = 0U };

  /**
     * The value FREE indicates that the time interval is free for scheduling.
     */
  enum { FREE = 1U };

  /**
     * The value BUSY indicates that the time interval is busy because one
     * or more events have been scheduled for that interval.
     */
  enum { BUSY = 2U };

  /**
     * The value BUSY_UNAVAILABLE indicates that the time interval is busy
     * and that the interval can not be scheduled.
     */
  enum { BUSY_UNAVAILABLE = 4U };

  /**
     * The value BUSY_TENTATIVE indicates that the time interval is busy because
     * one or more events have been tentatively scheduled for that interval.
     */
  enum { BUSY_TENTATIVE = 8U };

  /**
     * All BUSY* states.
     */
  enum { BUSY_ALL = 14U };

  /**
     * One of the above types.
     */
  /* readonly attribute unsigned long freeBusyType; */
  NS_IMETHOD GetFreeBusyType(PRUint32 *aFreeBusyType) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIFREEBUSYINTERVAL \
  NS_IMETHOD GetCalId(nsACString & aCalId); \
  NS_IMETHOD GetInterval(calIPeriod * *aInterval); \
  NS_IMETHOD GetFreeBusyType(PRUint32 *aFreeBusyType); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIFREEBUSYINTERVAL(_to) \
  NS_IMETHOD GetCalId(nsACString & aCalId) { return _to GetCalId(aCalId); } \
  NS_IMETHOD GetInterval(calIPeriod * *aInterval) { return _to GetInterval(aInterval); } \
  NS_IMETHOD GetFreeBusyType(PRUint32 *aFreeBusyType) { return _to GetFreeBusyType(aFreeBusyType); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIFREEBUSYINTERVAL(_to) \
  NS_IMETHOD GetCalId(nsACString & aCalId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCalId(aCalId); } \
  NS_IMETHOD GetInterval(calIPeriod * *aInterval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterval(aInterval); } \
  NS_IMETHOD GetFreeBusyType(PRUint32 *aFreeBusyType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFreeBusyType(aFreeBusyType); } 

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

/* Header file */
class _MYCLASS_ : public calIFreeBusyInterval
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIFREEBUSYINTERVAL

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* readonly attribute AUTF8String calId; */
NS_IMETHODIMP _MYCLASS_::GetCalId(nsACString & aCalId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIPeriod interval; */
NS_IMETHODIMP _MYCLASS_::GetInterval(calIPeriod * *aInterval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute unsigned long freeBusyType; */
NS_IMETHODIMP _MYCLASS_::GetFreeBusyType(PRUint32 *aFreeBusyType)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    calIFreeBusyService */
#define CALIFREEBUSYSERVICE_IID_STR "be1796cf-cb53-482e-8942-d6caa0a11baa"

#define CALIFREEBUSYSERVICE_IID \
  {0xbe1796cf, 0xcb53, 0x482e, \
    { 0x89, 0x42, 0xd6, 0xca, 0xa0, 0xa1, 0x1b, 0xaa }}

/**
 * This service acts as a central access point for free-busy lookup.
 * A free-busy request will be multiplexed to all added free-busy providers.
 * Adding a free-busy provider is transient.
 */
class NS_NO_VTABLE calIFreeBusyService : public calIFreeBusyProvider {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIFREEBUSYSERVICE_IID)

  /**
     * Adds a new free-busy provider.
     */
  /* void addProvider (in calIFreeBusyProvider aProvider); */
  NS_IMETHOD AddProvider(calIFreeBusyProvider *aProvider) = 0;

  /**
     * Removes a free-busy provider.
     */
  /* void removeProvider (in calIFreeBusyProvider aProvider); */
  NS_IMETHOD RemoveProvider(calIFreeBusyProvider *aProvider) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIFREEBUSYSERVICE \
  NS_IMETHOD AddProvider(calIFreeBusyProvider *aProvider); \
  NS_IMETHOD RemoveProvider(calIFreeBusyProvider *aProvider); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIFREEBUSYSERVICE(_to) \
  NS_IMETHOD AddProvider(calIFreeBusyProvider *aProvider) { return _to AddProvider(aProvider); } \
  NS_IMETHOD RemoveProvider(calIFreeBusyProvider *aProvider) { return _to RemoveProvider(aProvider); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_CALIFREEBUSYSERVICE(_to) \
  NS_IMETHOD AddProvider(calIFreeBusyProvider *aProvider) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddProvider(aProvider); } \
  NS_IMETHOD RemoveProvider(calIFreeBusyProvider *aProvider) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProvider(aProvider); } 

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

/* Header file */
class _MYCLASS_ : public calIFreeBusyService
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIFREEBUSYSERVICE

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* void addProvider (in calIFreeBusyProvider aProvider); */
NS_IMETHODIMP _MYCLASS_::AddProvider(calIFreeBusyProvider *aProvider)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void removeProvider (in calIFreeBusyProvider aProvider); */
NS_IMETHODIMP _MYCLASS_::RemoveProvider(calIFreeBusyProvider *aProvider)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIFreeBusyProvider_h__ */
