/*
 * 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_calIOperation_h__
#include "calIOperation.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)

  /**
//      * Defines granted and denied permissions for a specific user or
//      * user domain. Specific user entries precede over domain entries.
//      *
//      * Examples:
//      * a) Allow all users availability and read access,
//      *    but jdoe only availability access:
//      *    defineAccessControl("@", AC_FREEBUSY | AC_COMP_READ);
//      *    defineAccessControl("jdoe", AC_FREEBUSY);
//      *
//      * b) Restrict jdoe to have no access:
//      *    defineAccessControl("jdoe", 0);
//      *
//      * Follow-up definition calls for the same user will overwrite previous
//      * definitions.
//      * 
//      * @param userId user that is affected by the access control bits
//      *               WCAP specific:
//      *                    - @ stands in for everybody
//      *                    xxx todo: change the above
//      * @param accessControlBits access control bits (above AC_ definitions)
//      * @param listener called when access control bits have been updated
//      * @return optional object to track operation
//      */
/**
//      * To reset a user's access control definition to the default ones
//      * that everybody is granted.
//      * In case the user has no specific access control definition,
//      * Components.results.NS_ERROR_INVALID_ARG is thrown.
//      *
//      * @param userId user id
//      * @param listener called when access control bits have been updated
//      * @return optional object to track operation
//      */
/**
//      * 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 optional 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 optional object to track operation
     */
  /* calIOperation searchForCalendars (in string searchString, in unsigned long searchOptions, in unsigned long maxResults, in calIGenericOperationListener listener); */
  NS_IMETHOD SearchForCalendars(const char *searchString, PRUint32 searchOptions, PRUint32 maxResults, calIGenericOperationListener *listener, calIOperation **_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, calIGenericOperationListener *listener, calIOperation **_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, calIGenericOperationListener *listener, calIOperation **_retval) { return _to SearchForCalendars(searchString, searchOptions, maxResults, 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, calIGenericOperationListener *listener, calIOperation **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SearchForCalendars(searchString, searchOptions, maxResults, 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;
}

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

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


#endif /* __gen_calIWcapSession_h__ */
