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

#ifndef __gen_nsIAbDirectoryQuery_h__
#define __gen_nsIAbDirectoryQuery_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 nsIAbDirSearchListener; /* forward declaration */

class nsIAbCard; /* forward declaration */

class nsIAbDirectory; /* forward declaration */


/* starting interface:    nsIAbDirectoryQueryArguments */
#define NS_IABDIRECTORYQUERYARGUMENTS_IID_STR "d6fcbedd-d574-4357-abf4-81565d867749"

#define NS_IABDIRECTORYQUERYARGUMENTS_IID \
  {0xd6fcbedd, 0xd574, 0x4357, \
    { 0xab, 0xf4, 0x81, 0x56, 0x5d, 0x86, 0x77, 0x49 }}

/**
 * The arguments for a query.
 *
 * Contains an expression for perform matches
 * and an array of properties which should be
 * returned if a match is found from the expression
 *
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIAbDirectoryQueryArguments : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABDIRECTORYQUERYARGUMENTS_IID)

  /**
     * Defines the boolean expression for
     * the matching of cards
     *
     */
  /* attribute nsISupports expression; */
  NS_SCRIPTABLE NS_IMETHOD GetExpression(nsISupports **aExpression) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetExpression(nsISupports *aExpression) = 0;

  /**
     * Defines if sub directories should be
     * queried 
     *
     */
  /* attribute boolean querySubDirectories; */
  NS_SCRIPTABLE NS_IMETHOD GetQuerySubDirectories(PRBool *aQuerySubDirectories) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetQuerySubDirectories(PRBool aQuerySubDirectories) = 0;

  /** 
     * A parameter which can be used to pass in data specific to a particular
     * type of addressbook.  
     */
  /* attribute nsISupports typeSpecificArg; */
  NS_SCRIPTABLE NS_IMETHOD GetTypeSpecificArg(nsISupports **aTypeSpecificArg) = 0;
  NS_SCRIPTABLE NS_IMETHOD SetTypeSpecificArg(nsISupports *aTypeSpecificArg) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbDirectoryQueryArguments, NS_IABDIRECTORYQUERYARGUMENTS_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIABDIRECTORYQUERYARGUMENTS \
  NS_SCRIPTABLE NS_IMETHOD GetExpression(nsISupports **aExpression); \
  NS_SCRIPTABLE NS_IMETHOD SetExpression(nsISupports *aExpression); \
  NS_SCRIPTABLE NS_IMETHOD GetQuerySubDirectories(PRBool *aQuerySubDirectories); \
  NS_SCRIPTABLE NS_IMETHOD SetQuerySubDirectories(PRBool aQuerySubDirectories); \
  NS_SCRIPTABLE NS_IMETHOD GetTypeSpecificArg(nsISupports **aTypeSpecificArg); \
  NS_SCRIPTABLE NS_IMETHOD SetTypeSpecificArg(nsISupports *aTypeSpecificArg); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIABDIRECTORYQUERYARGUMENTS(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetExpression(nsISupports **aExpression) { return _to GetExpression(aExpression); } \
  NS_SCRIPTABLE NS_IMETHOD SetExpression(nsISupports *aExpression) { return _to SetExpression(aExpression); } \
  NS_SCRIPTABLE NS_IMETHOD GetQuerySubDirectories(PRBool *aQuerySubDirectories) { return _to GetQuerySubDirectories(aQuerySubDirectories); } \
  NS_SCRIPTABLE NS_IMETHOD SetQuerySubDirectories(PRBool aQuerySubDirectories) { return _to SetQuerySubDirectories(aQuerySubDirectories); } \
  NS_SCRIPTABLE NS_IMETHOD GetTypeSpecificArg(nsISupports **aTypeSpecificArg) { return _to GetTypeSpecificArg(aTypeSpecificArg); } \
  NS_SCRIPTABLE NS_IMETHOD SetTypeSpecificArg(nsISupports *aTypeSpecificArg) { return _to SetTypeSpecificArg(aTypeSpecificArg); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIABDIRECTORYQUERYARGUMENTS(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetExpression(nsISupports **aExpression) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetExpression(aExpression); } \
  NS_SCRIPTABLE NS_IMETHOD SetExpression(nsISupports *aExpression) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetExpression(aExpression); } \
  NS_SCRIPTABLE NS_IMETHOD GetQuerySubDirectories(PRBool *aQuerySubDirectories) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetQuerySubDirectories(aQuerySubDirectories); } \
  NS_SCRIPTABLE NS_IMETHOD SetQuerySubDirectories(PRBool aQuerySubDirectories) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetQuerySubDirectories(aQuerySubDirectories); } \
  NS_SCRIPTABLE NS_IMETHOD GetTypeSpecificArg(nsISupports **aTypeSpecificArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTypeSpecificArg(aTypeSpecificArg); } \
  NS_SCRIPTABLE NS_IMETHOD SetTypeSpecificArg(nsISupports *aTypeSpecificArg) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetTypeSpecificArg(aTypeSpecificArg); } 

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

/* Header file */
class nsAbDirectoryQueryArguments : public nsIAbDirectoryQueryArguments
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIABDIRECTORYQUERYARGUMENTS

  nsAbDirectoryQueryArguments();

private:
  ~nsAbDirectoryQueryArguments();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAbDirectoryQueryArguments, nsIAbDirectoryQueryArguments)

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

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

/* attribute nsISupports expression; */
NS_IMETHODIMP nsAbDirectoryQueryArguments::GetExpression(nsISupports **aExpression)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAbDirectoryQueryArguments::SetExpression(nsISupports *aExpression)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute boolean querySubDirectories; */
NS_IMETHODIMP nsAbDirectoryQueryArguments::GetQuerySubDirectories(PRBool *aQuerySubDirectories)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAbDirectoryQueryArguments::SetQuerySubDirectories(PRBool aQuerySubDirectories)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsISupports typeSpecificArg; */
NS_IMETHODIMP nsAbDirectoryQueryArguments::GetTypeSpecificArg(nsISupports **aTypeSpecificArg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsAbDirectoryQueryArguments::SetTypeSpecificArg(nsISupports *aTypeSpecificArg)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIAbDirectoryQueryPropertyValue */
#define NS_IABDIRECTORYQUERYPROPERTYVALUE_IID_STR "3a6e0c0c-1dd2-11b2-b23d-ea3a8ccb333c"

#define NS_IABDIRECTORYQUERYPROPERTYVALUE_IID \
  {0x3a6e0c0c, 0x1dd2, 0x11b2, \
    { 0xb2, 0x3d, 0xea, 0x3a, 0x8c, 0xcb, 0x33, 0x3c }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIAbDirectoryQueryPropertyValue : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABDIRECTORYQUERYPROPERTYVALUE_IID)

  /**
     * The property which should be matched
     *
     * For example 'primaryEmail' or 'homePhone'
     * for card properties.
     *
     * Two further properties are defined that 
     * do not exist as properties on a card.
     *
     * 'card:nsIAbCard' which represents the interface
     * of a card component
     *
     */
  /* readonly attribute string name; */
  NS_SCRIPTABLE NS_IMETHOD GetName(char **aName) = 0;

  /**
     * The value of the property
     *
     */
  /* readonly attribute wstring value; */
  NS_SCRIPTABLE NS_IMETHOD GetValue(PRUnichar **aValue) = 0;

  /**
     * The value of the property
     * as an interface
     *
     * Only valid if the corresponding
     * property name is related to an
     * interface instead of a wstring
     *
     */
  /* readonly attribute nsISupports valueISupports; */
  NS_SCRIPTABLE NS_IMETHOD GetValueISupports(nsISupports **aValueISupports) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbDirectoryQueryPropertyValue, NS_IABDIRECTORYQUERYPROPERTYVALUE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIABDIRECTORYQUERYPROPERTYVALUE \
  NS_SCRIPTABLE NS_IMETHOD GetName(char **aName); \
  NS_SCRIPTABLE NS_IMETHOD GetValue(PRUnichar **aValue); \
  NS_SCRIPTABLE NS_IMETHOD GetValueISupports(nsISupports **aValueISupports); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIABDIRECTORYQUERYPROPERTYVALUE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetName(char **aName) { return _to GetName(aName); } \
  NS_SCRIPTABLE NS_IMETHOD GetValue(PRUnichar **aValue) { return _to GetValue(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD GetValueISupports(nsISupports **aValueISupports) { return _to GetValueISupports(aValueISupports); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIABDIRECTORYQUERYPROPERTYVALUE(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetName(char **aName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_SCRIPTABLE NS_IMETHOD GetValue(PRUnichar **aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aValue); } \
  NS_SCRIPTABLE NS_IMETHOD GetValueISupports(nsISupports **aValueISupports) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValueISupports(aValueISupports); } 

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

/* Header file */
class nsAbDirectoryQueryPropertyValue : public nsIAbDirectoryQueryPropertyValue
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIABDIRECTORYQUERYPROPERTYVALUE

  nsAbDirectoryQueryPropertyValue();

private:
  ~nsAbDirectoryQueryPropertyValue();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAbDirectoryQueryPropertyValue, nsIAbDirectoryQueryPropertyValue)

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

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

/* readonly attribute string name; */
NS_IMETHODIMP nsAbDirectoryQueryPropertyValue::GetName(char **aName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute wstring value; */
NS_IMETHODIMP nsAbDirectoryQueryPropertyValue::GetValue(PRUnichar **aValue)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsISupports valueISupports; */
NS_IMETHODIMP nsAbDirectoryQueryPropertyValue::GetValueISupports(nsISupports **aValueISupports)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIAbDirectoryQueryResultListener */
#define NS_IABDIRECTORYQUERYRESULTLISTENER_IID_STR "516e7ffa-69bc-41db-a493-dfb4895832f3"

#define NS_IABDIRECTORYQUERYRESULTLISTENER_IID \
  {0x516e7ffa, 0x69bc, 0x41db, \
    { 0xa4, 0x93, 0xdf, 0xb4, 0x89, 0x58, 0x32, 0xf3 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIAbDirectoryQueryResultListener : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABDIRECTORYQUERYRESULTLISTENER_IID)

  /**
     * Called when a match is found. May be called from a different thread to
     * the one that initiates the query.
     *
     * @param aCard An individual result associated returned from a query
     */
  /* void onQueryFoundCard (in nsIAbCard aCard); */
  NS_SCRIPTABLE NS_IMETHOD OnQueryFoundCard(nsIAbCard *aCard) = 0;

  /**
     * List of defined query results
     *
     */
  enum { queryResultMatch = 0 };

  enum { queryResultComplete = 1 };

  enum { queryResultStopped = 2 };

  enum { queryResultError = 3 };

  /**
     * Called when a query has finished. May be called from a different thread
     * to the one that initiates the query.
     *
     * @param aResult    A result code from the list above.
     *
     * @param aErrorCode An error code specific to the type of query.
     */
  /* void onQueryResult (in long aResult, in long aErrorCode); */
  NS_SCRIPTABLE NS_IMETHOD OnQueryResult(PRInt32 aResult, PRInt32 aErrorCode) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbDirectoryQueryResultListener, NS_IABDIRECTORYQUERYRESULTLISTENER_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIABDIRECTORYQUERYRESULTLISTENER \
  NS_SCRIPTABLE NS_IMETHOD OnQueryFoundCard(nsIAbCard *aCard); \
  NS_SCRIPTABLE NS_IMETHOD OnQueryResult(PRInt32 aResult, PRInt32 aErrorCode); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIABDIRECTORYQUERYRESULTLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnQueryFoundCard(nsIAbCard *aCard) { return _to OnQueryFoundCard(aCard); } \
  NS_SCRIPTABLE NS_IMETHOD OnQueryResult(PRInt32 aResult, PRInt32 aErrorCode) { return _to OnQueryResult(aResult, aErrorCode); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIABDIRECTORYQUERYRESULTLISTENER(_to) \
  NS_SCRIPTABLE NS_IMETHOD OnQueryFoundCard(nsIAbCard *aCard) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnQueryFoundCard(aCard); } \
  NS_SCRIPTABLE NS_IMETHOD OnQueryResult(PRInt32 aResult, PRInt32 aErrorCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnQueryResult(aResult, aErrorCode); } 

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

/* Header file */
class nsAbDirectoryQueryResultListener : public nsIAbDirectoryQueryResultListener
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIABDIRECTORYQUERYRESULTLISTENER

  nsAbDirectoryQueryResultListener();

private:
  ~nsAbDirectoryQueryResultListener();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAbDirectoryQueryResultListener, nsIAbDirectoryQueryResultListener)

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

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

/* void onQueryFoundCard (in nsIAbCard aCard); */
NS_IMETHODIMP nsAbDirectoryQueryResultListener::OnQueryFoundCard(nsIAbCard *aCard)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void onQueryResult (in long aResult, in long aErrorCode); */
NS_IMETHODIMP nsAbDirectoryQueryResultListener::OnQueryResult(PRInt32 aResult, PRInt32 aErrorCode)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIAbDirectoryQuery */
#define NS_IABDIRECTORYQUERY_IID_STR "60b5961c-ce61-47b3-aa99-6d865f734dee"

#define NS_IABDIRECTORYQUERY_IID \
  {0x60b5961c, 0xce61, 0x47b3, \
    { 0xaa, 0x99, 0x6d, 0x86, 0x5f, 0x73, 0x4d, 0xee }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIAbDirectoryQuery : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IABDIRECTORYQUERY_IID)

  /**
     * Initiates a query on a directory and sub-directories for properties
     * on cards
     *
     * @param aDirectory   A directory that the query may get extra details
     *                     from.
     *
     * @param aArguments   The properties and values to match value could of
     *                     type nsIAbDirectoryQueryMatchItem for matches other
     *                     than ?contains?
     *
     * @param aListener    The listener which will obtain individual query
     *                     results.
     *
     * @param aResultLimit Limits the number of results returned to a maximum
     *                     value.
     *
     * @param aTimeOut     The maximum length of time for the query
     *
     * @return             A context id for the query
     */
  /* long doQuery (in nsIAbDirectory aDirectory, in nsIAbDirectoryQueryArguments aArguments, in nsIAbDirSearchListener aListener, in long aResultLimit, in long aTimeOut); */
  NS_SCRIPTABLE NS_IMETHOD DoQuery(nsIAbDirectory *aDirectory, nsIAbDirectoryQueryArguments *aArguments, nsIAbDirSearchListener *aListener, PRInt32 aResultLimit, PRInt32 aTimeOut, PRInt32 *_retval NS_OUTPARAM) = 0;

  /**
     * Stops an existing query operation if
     * query operation is asynchronous
     *
     * The nsIAbDirectoryQueryResultListener will
     * be notified when query has stopped
     *
     * It is implementation specific if notification
     * synchronous or asynchronous
     *
     * @param contextID
     *        The unique number returned from
     *        the doQuery methods
     *
     */
  /* void stopQuery (in long contextID); */
  NS_SCRIPTABLE NS_IMETHOD StopQuery(PRInt32 contextID) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIAbDirectoryQuery, NS_IABDIRECTORYQUERY_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIABDIRECTORYQUERY \
  NS_SCRIPTABLE NS_IMETHOD DoQuery(nsIAbDirectory *aDirectory, nsIAbDirectoryQueryArguments *aArguments, nsIAbDirSearchListener *aListener, PRInt32 aResultLimit, PRInt32 aTimeOut, PRInt32 *_retval NS_OUTPARAM); \
  NS_SCRIPTABLE NS_IMETHOD StopQuery(PRInt32 contextID); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIABDIRECTORYQUERY(_to) \
  NS_SCRIPTABLE NS_IMETHOD DoQuery(nsIAbDirectory *aDirectory, nsIAbDirectoryQueryArguments *aArguments, nsIAbDirSearchListener *aListener, PRInt32 aResultLimit, PRInt32 aTimeOut, PRInt32 *_retval NS_OUTPARAM) { return _to DoQuery(aDirectory, aArguments, aListener, aResultLimit, aTimeOut, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD StopQuery(PRInt32 contextID) { return _to StopQuery(contextID); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIABDIRECTORYQUERY(_to) \
  NS_SCRIPTABLE NS_IMETHOD DoQuery(nsIAbDirectory *aDirectory, nsIAbDirectoryQueryArguments *aArguments, nsIAbDirSearchListener *aListener, PRInt32 aResultLimit, PRInt32 aTimeOut, PRInt32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->DoQuery(aDirectory, aArguments, aListener, aResultLimit, aTimeOut, _retval); } \
  NS_SCRIPTABLE NS_IMETHOD StopQuery(PRInt32 contextID) { return !_to ? NS_ERROR_NULL_POINTER : _to->StopQuery(contextID); } 

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

/* Header file */
class nsAbDirectoryQuery : public nsIAbDirectoryQuery
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIABDIRECTORYQUERY

  nsAbDirectoryQuery();

private:
  ~nsAbDirectoryQuery();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsAbDirectoryQuery, nsIAbDirectoryQuery)

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

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

/* long doQuery (in nsIAbDirectory aDirectory, in nsIAbDirectoryQueryArguments aArguments, in nsIAbDirSearchListener aListener, in long aResultLimit, in long aTimeOut); */
NS_IMETHODIMP nsAbDirectoryQuery::DoQuery(nsIAbDirectory *aDirectory, nsIAbDirectoryQueryArguments *aArguments, nsIAbDirSearchListener *aListener, PRInt32 aResultLimit, PRInt32 aTimeOut, PRInt32 *_retval NS_OUTPARAM)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void stopQuery (in long contextID); */
NS_IMETHODIMP nsAbDirectoryQuery::StopQuery(PRInt32 contextID)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsIAbDirectoryQuery_h__ */
