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

#ifndef __gen_nsILDAPAutoCompleteSession_h__
#define __gen_nsILDAPAutoCompleteSession_h__


#ifndef __gen_nsIAutoCompleteSession_h__
#include "nsIAutoCompleteSession.h"
#endif

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsILDAPURL; /* forward declaration */


/* starting interface:    nsILDAPAutoCompleteSession */
#define NS_ILDAPAUTOCOMPLETESESSION_IID_STR "82b6a78e-1dd2-11b2-a3d0-876e20e7b350"

#define NS_ILDAPAUTOCOMPLETESESSION_IID \
  {0x82b6a78e, 0x1dd2, 0x11b2, \
    { 0xa3, 0xd0, 0x87, 0x6e, 0x20, 0xe7, 0xb3, 0x50 }}

/**
 * Extends nsIAutoCompleteSession to have various LDAP-specific parameters.
 * and output format.
 */
class NS_NO_VTABLE nsILDAPAutoCompleteSession : public nsIAutoCompleteSession {
 public: 

  NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILDAPAUTOCOMPLETESESSION_IID)

  /**
     * A template used to construct the RFC 1960 LDAP search filter to use 
     * while autocompleting.  
     *
     * XXX syntax to-be-determined in an upcoming checkin
     * 
     * @exception NS_ERROR_NULL_POINTER     NULL pointer passed to getter
     * @exception NS_ERROR_OUT_OF_MEMORY    Getter couldn't allocate string
     */
  /* attribute wstring filterTemplate; */
  NS_IMETHOD GetFilterTemplate(PRUnichar * *aFilterTemplate) = 0;
  NS_IMETHOD SetFilterTemplate(const PRUnichar * aFilterTemplate) = 0;

  /**
     * A template for formatting the autocompletion results.  
     * 
     * XXX syntax to-be-determined
     *
     * @exception NS_ERROR_NULL_POINTER     NULL pointer passed to getter
     * @exception NS_ERROR_OUT_OF_MEMORY    Getter couldn't allocate string
     */
  /* attribute wstring outputFormat; */
  NS_IMETHOD GetOutputFormat(PRUnichar * *aOutputFormat) = 0;
  NS_IMETHOD SetOutputFormat(const PRUnichar * aOutputFormat) = 0;

  /**
     * If non-zero, limit lookups to at most this many entries.  If this
     * limit is hit during a lookup, the search will simply return 
     * |nsIAutoCompleteStatus::ignored|.
     *
     * @exception NS_ERROR_NULL_POINTER  NULL pointer passed to getter
     */
  /* attribute long sizeLimit; */
  NS_IMETHOD GetSizeLimit(PRInt32 *aSizeLimit) = 0;
  NS_IMETHOD SetSizeLimit(PRInt32 aSizeLimit) = 0;

  /**
     * Strings shorter than this will return |nsIAutoCompleteStatus::ignored|
     * rather than triggering a search.  This allows browsers to be
     * configured to not search on substrings so short that they
     * aren't indexed by the LDAP server (such searches can use significantly 
     * more server resources and return a very large number of entries).
     * The default is 0, meaning that no such limit is in effect.
     * 
     * @exception NS_ERROR_NULL_POINTER  NULL pointer passed to getter
     */
  /* attribute unsigned long minStringLength; */
  NS_IMETHOD GetMinStringLength(PRUint32 *aMinStringLength) = 0;
  NS_IMETHOD SetMinStringLength(PRUint32 aMinStringLength) = 0;

  /**
     * LDAP server to complete against, in ldap: URL format.  
     * May change to an nsILDAPServer once that infrastructure lands.
     *
     * @exception NS_ERROR_NULL_POINTER     NULL pointer passed to getter    
     */
  /* attribute nsILDAPURL serverURL; */
  NS_IMETHOD GetServerURL(nsILDAPURL * *aServerURL) = 0;
  NS_IMETHOD SetServerURL(nsILDAPURL * aServerURL) = 0;

};

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILDAPAUTOCOMPLETESESSION \
  NS_IMETHOD GetFilterTemplate(PRUnichar * *aFilterTemplate); \
  NS_IMETHOD SetFilterTemplate(const PRUnichar * aFilterTemplate); \
  NS_IMETHOD GetOutputFormat(PRUnichar * *aOutputFormat); \
  NS_IMETHOD SetOutputFormat(const PRUnichar * aOutputFormat); \
  NS_IMETHOD GetSizeLimit(PRInt32 *aSizeLimit); \
  NS_IMETHOD SetSizeLimit(PRInt32 aSizeLimit); \
  NS_IMETHOD GetMinStringLength(PRUint32 *aMinStringLength); \
  NS_IMETHOD SetMinStringLength(PRUint32 aMinStringLength); \
  NS_IMETHOD GetServerURL(nsILDAPURL * *aServerURL); \
  NS_IMETHOD SetServerURL(nsILDAPURL * aServerURL); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILDAPAUTOCOMPLETESESSION(_to) \
  NS_IMETHOD GetFilterTemplate(PRUnichar * *aFilterTemplate) { return _to ## GetFilterTemplate(aFilterTemplate); } \
  NS_IMETHOD SetFilterTemplate(const PRUnichar * aFilterTemplate) { return _to ## SetFilterTemplate(aFilterTemplate); } \
  NS_IMETHOD GetOutputFormat(PRUnichar * *aOutputFormat) { return _to ## GetOutputFormat(aOutputFormat); } \
  NS_IMETHOD SetOutputFormat(const PRUnichar * aOutputFormat) { return _to ## SetOutputFormat(aOutputFormat); } \
  NS_IMETHOD GetSizeLimit(PRInt32 *aSizeLimit) { return _to ## GetSizeLimit(aSizeLimit); } \
  NS_IMETHOD SetSizeLimit(PRInt32 aSizeLimit) { return _to ## SetSizeLimit(aSizeLimit); } \
  NS_IMETHOD GetMinStringLength(PRUint32 *aMinStringLength) { return _to ## GetMinStringLength(aMinStringLength); } \
  NS_IMETHOD SetMinStringLength(PRUint32 aMinStringLength) { return _to ## SetMinStringLength(aMinStringLength); } \
  NS_IMETHOD GetServerURL(nsILDAPURL * *aServerURL) { return _to ## GetServerURL(aServerURL); } \
  NS_IMETHOD SetServerURL(nsILDAPURL * aServerURL) { return _to ## SetServerURL(aServerURL); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSILDAPAUTOCOMPLETESESSION(_to) \
  NS_IMETHOD GetFilterTemplate(PRUnichar * *aFilterTemplate) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->GetFilterTemplate(aFilterTemplate); } \
  NS_IMETHOD SetFilterTemplate(const PRUnichar * aFilterTemplate) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->SetFilterTemplate(aFilterTemplate); } \
  NS_IMETHOD GetOutputFormat(PRUnichar * *aOutputFormat) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->GetOutputFormat(aOutputFormat); } \
  NS_IMETHOD SetOutputFormat(const PRUnichar * aOutputFormat) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->SetOutputFormat(aOutputFormat); } \
  NS_IMETHOD GetSizeLimit(PRInt32 *aSizeLimit) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->GetSizeLimit(aSizeLimit); } \
  NS_IMETHOD SetSizeLimit(PRInt32 aSizeLimit) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->SetSizeLimit(aSizeLimit); } \
  NS_IMETHOD GetMinStringLength(PRUint32 *aMinStringLength) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->GetMinStringLength(aMinStringLength); } \
  NS_IMETHOD SetMinStringLength(PRUint32 aMinStringLength) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->SetMinStringLength(aMinStringLength); } \
  NS_IMETHOD GetServerURL(nsILDAPURL * *aServerURL) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->GetServerURL(aServerURL); } \
  NS_IMETHOD SetServerURL(nsILDAPURL * aServerURL) { return !_to ## ? NS_ERROR_NULL_POINTER : _to ##->SetServerURL(aServerURL); } 

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

/* Header file */
class nsLDAPAutoCompleteSession : public nsILDAPAutoCompleteSession
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILDAPAUTOCOMPLETESESSION

  nsLDAPAutoCompleteSession();
  virtual ~nsLDAPAutoCompleteSession();
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsLDAPAutoCompleteSession, nsILDAPAutoCompleteSession)

nsLDAPAutoCompleteSession::nsLDAPAutoCompleteSession()
{
  NS_INIT_ISUPPORTS();
  /* member initializers and constructor code */
}

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

/* attribute wstring filterTemplate; */
NS_IMETHODIMP nsLDAPAutoCompleteSession::GetFilterTemplate(PRUnichar * *aFilterTemplate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPAutoCompleteSession::SetFilterTemplate(const PRUnichar * aFilterTemplate)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute wstring outputFormat; */
NS_IMETHODIMP nsLDAPAutoCompleteSession::GetOutputFormat(PRUnichar * *aOutputFormat)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPAutoCompleteSession::SetOutputFormat(const PRUnichar * aOutputFormat)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute long sizeLimit; */
NS_IMETHODIMP nsLDAPAutoCompleteSession::GetSizeLimit(PRInt32 *aSizeLimit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPAutoCompleteSession::SetSizeLimit(PRInt32 aSizeLimit)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute unsigned long minStringLength; */
NS_IMETHODIMP nsLDAPAutoCompleteSession::GetMinStringLength(PRUint32 *aMinStringLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPAutoCompleteSession::SetMinStringLength(PRUint32 aMinStringLength)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsILDAPURL serverURL; */
NS_IMETHODIMP nsLDAPAutoCompleteSession::GetServerURL(nsILDAPURL * *aServerURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPAutoCompleteSession::SetServerURL(nsILDAPURL * aServerURL)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsILDAPAutoCompleteSession_h__ */
