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

#ifndef __gen_calIWcapSession_h__
#define __gen_calIWcapSession_h__


#ifndef __gen_calIWcapCalendar_h__
#include "calIWcapCalendar.h"
#endif

#ifndef __gen_calIDateTime_h__
#include "calIDateTime.h"
#endif

#ifndef __gen_calIWcapRequest_h__
#include "calIWcapRequest.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif

/* starting interface:    calIWcapSession */
#define CALIWCAPSESSION_IID_STR "477b4534-c297-40a1-adf2-5a7e2a81816a"

#define CALIWCAPSESSION_IID \
  {0x477b4534, 0xc297, 0x40a1, \
    { 0xad, 0xf2, 0x5a, 0x7e, 0x2a, 0x81, 0x81, 0x6a }}

class NS_NO_VTABLE calIWcapSession : public nsISupports {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(CALIWCAPSESSION_IID)

  /**
//      * Gets the set of access control definitions (including "everybody").
//      * Both out arrays have the same length.
//      *
//      * @param count length of returned arrays
//      * @param users users ids
//      * @param accessControlBits access control bits
//      * @param listener called with xxx todo
//      * @return request object to track operation
//      */
/**
 * WCAP session.
 */
/**
     * Setting this URI causes the session to logged out and disconnected.
     */
  /* attribute nsIURI uri; */
  NS_IMETHOD GetUri(nsIURI * *aUri) = 0;
  NS_IMETHOD SetUri(nsIURI * aUri) = 0;

  /**
     * User that has established this session.
     * @exception NS_ERROR_NOT_AVAILABLE if not logged in
     */
  /* readonly attribute string userId; */
  NS_IMETHOD GetUserId(char * *aUserId) = 0;

  /**
     * Determines whether the user is currentl logged in.
     * Does _not_ check whether the user's ticket has timed out!
     */
  /* readonly attribute boolean isLoggedIn; */
  NS_IMETHOD GetIsLoggedIn(PRBool *aIsLoggedIn) = 0;

  /**
     * Gets the default calendar instance of this session.
     */
  /* readonly attribute calIWcapCalendar defaultCalendar; */
  NS_IMETHOD GetDefaultCalendar(calIWcapCalendar * *aDefaultCalendar) = 0;

  /**
     * Specifies how to match the searchString.
     */
  enum { SEARCH_STRING_CONTAINS = 0U };

  enum { SEARCH_STRING_BEGINS_WITH = 1U };

  enum { SEARCH_STRING_ENDS_WITH = 2U };

  enum { SEARCH_STRING_EXACT = 3U };

  /**
     * Specifies what properties to include.
     */
  enum { SEARCH_INCLUDE_CALID = 4U };

  enum { SEARCH_INCLUDE_NAME = 8U };

  enum { SEARCH_INCLUDE_OWNER = 16U };

  /**
     * Searches for calendars matching the specified searchString.
     * Results are notified to the passed listener instance as
     * an array of calendar instances.
     *
     * @param searchString the search string to match
     * @param searchOptions the search options
     * @param maxResults maximum number of results
     *                   (0 means default, e.g. 200 with respect to Sun calendar servers)
     * @param listener listener called with an array of calIWcapCalendar objects
     * @return request object to track operation
     */
  /* calIWcapRequest searchForCalendars (in string searchString, in unsigned long searchOptions, in unsigned long maxResults, in calIWcapRequestResultListener listener); */
  NS_IMETHOD SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) = 0;

  /**
     * Gets free-busy entries for calendar.
     * Results are notified to the passed listener instance.
     *
     * @param calId calid or rfc822addr
     * @param rangeStart start time of free-busy search
     * @param rangeEnd end time of free-busy search
     * @param bBusy whether to return busy entries or free entries
     * @param listener called with an array of calIPeriod objects
     * @return request object to track operation
     */
  /* calIWcapRequest getFreeBusyTimes (in string calId, in calIDateTime rangeStart, in calIDateTime rangeEnd, in boolean bBusy, in calIWcapRequestResultListener listener); */
  NS_IMETHOD GetFreeBusyTimes(const char *calId, calIDateTime *rangeStart, calIDateTime *rangeEnd, PRBool bBusy, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_CALIWCAPSESSION \
  NS_IMETHOD GetUri(nsIURI * *aUri); \
  NS_IMETHOD SetUri(nsIURI * aUri); \
  NS_IMETHOD GetUserId(char * *aUserId); \
  NS_IMETHOD GetIsLoggedIn(PRBool *aIsLoggedIn); \
  NS_IMETHOD GetDefaultCalendar(calIWcapCalendar * *aDefaultCalendar); \
  NS_IMETHOD SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIWcapRequestResultListener *listener, calIWcapRequest **_retval); \
  NS_IMETHOD GetFreeBusyTimes(const char *calId, calIDateTime *rangeStart, calIDateTime *rangeEnd, PRBool bBusy, calIWcapRequestResultListener *listener, calIWcapRequest **_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_CALIWCAPSESSION(_to) \
  NS_IMETHOD GetUri(nsIURI * *aUri) { return _to GetUri(aUri); } \
  NS_IMETHOD SetUri(nsIURI * aUri) { return _to SetUri(aUri); } \
  NS_IMETHOD GetUserId(char * *aUserId) { return _to GetUserId(aUserId); } \
  NS_IMETHOD GetIsLoggedIn(PRBool *aIsLoggedIn) { return _to GetIsLoggedIn(aIsLoggedIn); } \
  NS_IMETHOD GetDefaultCalendar(calIWcapCalendar * *aDefaultCalendar) { return _to GetDefaultCalendar(aDefaultCalendar); } \
  NS_IMETHOD SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) { return _to SearchForCalendars(searchString, searchOptions, maxResults, listener, _retval); } \
  NS_IMETHOD GetFreeBusyTimes(const char *calId, calIDateTime *rangeStart, calIDateTime *rangeEnd, PRBool bBusy, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) { return _to GetFreeBusyTimes(calId, rangeStart, rangeEnd, bBusy, listener, _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_CALIWCAPSESSION(_to) \
  NS_IMETHOD GetUri(nsIURI * *aUri) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUri(aUri); } \
  NS_IMETHOD SetUri(nsIURI * aUri) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetUri(aUri); } \
  NS_IMETHOD GetUserId(char * *aUserId) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUserId(aUserId); } \
  NS_IMETHOD GetIsLoggedIn(PRBool *aIsLoggedIn) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLoggedIn(aIsLoggedIn); } \
  NS_IMETHOD GetDefaultCalendar(calIWcapCalendar * *aDefaultCalendar) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultCalendar(aDefaultCalendar); } \
  NS_IMETHOD SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SearchForCalendars(searchString, searchOptions, maxResults, listener, _retval); } \
  NS_IMETHOD GetFreeBusyTimes(const char *calId, calIDateTime *rangeStart, calIDateTime *rangeEnd, PRBool bBusy, calIWcapRequestResultListener *listener, calIWcapRequest **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFreeBusyTimes(calId, rangeStart, rangeEnd, bBusy, listener, _retval); } 

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

/* Header file */
class _MYCLASS_ : public calIWcapSession
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_CALIWCAPSESSION

  _MYCLASS_();

private:
  ~_MYCLASS_();

protected:
  /* additional members */
};

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

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

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

/* attribute nsIURI uri; */
NS_IMETHODIMP _MYCLASS_::GetUri(nsIURI * *aUri)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP _MYCLASS_::SetUri(nsIURI * aUri)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute string userId; */
NS_IMETHODIMP _MYCLASS_::GetUserId(char * *aUserId)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute boolean isLoggedIn; */
NS_IMETHODIMP _MYCLASS_::GetIsLoggedIn(PRBool *aIsLoggedIn)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute calIWcapCalendar defaultCalendar; */
NS_IMETHODIMP _MYCLASS_::GetDefaultCalendar(calIWcapCalendar * *aDefaultCalendar)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIWcapRequest searchForCalendars (in string searchString, in unsigned long searchOptions, in unsigned long maxResults, in calIWcapRequestResultListener listener); */
NS_IMETHODIMP _MYCLASS_::SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIWcapRequestResultListener *listener, calIWcapRequest **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* calIWcapRequest getFreeBusyTimes (in string calId, in calIDateTime rangeStart, in calIDateTime rangeEnd, in boolean bBusy, in calIWcapRequestResultListener listener); */
NS_IMETHODIMP _MYCLASS_::GetFreeBusyTimes(const char *calId, calIDateTime *rangeStart, calIDateTime *rangeEnd, PRBool bBusy, calIWcapRequestResultListener *listener, calIWcapRequest **_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_calIWcapSession_h__ */
