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

#ifndef __gen_nsILDAPConnection_h__
#define __gen_nsILDAPConnection_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 nsILDAPOperation; /* forward declaration */

class nsILDAPMessageListener; /* forward declaration */

class nsILDAPURL; /* forward declaration */

#define NS_LDAPCONNECTION_CONTRACTID "@mozilla.org/network/ldap-connection;1" 

/* starting interface:    nsILDAPConnection */
#define NS_ILDAPCONNECTION_IID_STR "360c1ff7-15e3-4ffe-b4b8-0eda72ebc096"

#define NS_ILDAPCONNECTION_IID \
  {0x360c1ff7, 0x15e3, 0x4ffe, \
    { 0xb4, 0xb8, 0x0e, 0xda, 0x72, 0xeb, 0xc0, 0x96 }}

class NS_NO_VTABLE nsILDAPConnection : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILDAPCONNECTION_IID)

  /* readonly attribute wstring errorString; */
  NS_IMETHOD GetErrorString(char16_t * *aErrorString) = 0;

  /* readonly attribute AUTF8String bindName; */
  NS_IMETHOD GetBindName(nsACString & aBindName) = 0;

  /* attribute nsISupports closure; */
  NS_IMETHOD GetClosure(nsISupports * *aClosure) = 0;
  NS_IMETHOD SetClosure(nsISupports *aClosure) = 0;

  /* void init (in nsILDAPURL aUrl, in AUTF8String aBindName, in nsILDAPMessageListener aMessageListener, in nsISupports aClosure, in unsigned long aVersion); */
  NS_IMETHOD Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion) = 0;

  enum {
    VERSION2 = 2U,
    VERSION3 = 3U
  };

  /* long getLdErrno (out AUTF8String matched, out AUTF8String s); */
  NS_IMETHOD GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsILDAPConnection, NS_ILDAPCONNECTION_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSILDAPCONNECTION \
  NS_IMETHOD GetErrorString(char16_t * *aErrorString) override; \
  NS_IMETHOD GetBindName(nsACString & aBindName) override; \
  NS_IMETHOD GetClosure(nsISupports * *aClosure) override; \
  NS_IMETHOD SetClosure(nsISupports *aClosure) override; \
  NS_IMETHOD Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion) override; \
  NS_IMETHOD GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_NSILDAPCONNECTION \
  NS_METHOD GetErrorString(char16_t * *aErrorString); \
  NS_METHOD GetBindName(nsACString & aBindName); \
  NS_METHOD GetClosure(nsISupports * *aClosure); \
  NS_METHOD SetClosure(nsISupports *aClosure); \
  NS_METHOD Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion); \
  NS_METHOD GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSILDAPCONNECTION(_to) \
  NS_IMETHOD GetErrorString(char16_t * *aErrorString) override { return _to GetErrorString(aErrorString); } \
  NS_IMETHOD GetBindName(nsACString & aBindName) override { return _to GetBindName(aBindName); } \
  NS_IMETHOD GetClosure(nsISupports * *aClosure) override { return _to GetClosure(aClosure); } \
  NS_IMETHOD SetClosure(nsISupports *aClosure) override { return _to SetClosure(aClosure); } \
  NS_IMETHOD Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion) override { return _to Init(aUrl, aBindName, aMessageListener, aClosure, aVersion); } \
  NS_IMETHOD GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval) override { return _to GetLdErrno(matched, s, _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_NSILDAPCONNECTION(_to) \
  NS_IMETHOD GetErrorString(char16_t * *aErrorString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetErrorString(aErrorString); } \
  NS_IMETHOD GetBindName(nsACString & aBindName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBindName(aBindName); } \
  NS_IMETHOD GetClosure(nsISupports * *aClosure) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClosure(aClosure); } \
  NS_IMETHOD SetClosure(nsISupports *aClosure) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetClosure(aClosure); } \
  NS_IMETHOD Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aUrl, aBindName, aMessageListener, aClosure, aVersion); } \
  NS_IMETHOD GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLdErrno(matched, s, _retval); } 

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

/* Header file */
class nsLDAPConnection : public nsILDAPConnection
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSILDAPCONNECTION

  nsLDAPConnection();

private:
  ~nsLDAPConnection();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS(nsLDAPConnection, nsILDAPConnection)

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

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

/* readonly attribute wstring errorString; */
NS_IMETHODIMP nsLDAPConnection::GetErrorString(char16_t * *aErrorString)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute AUTF8String bindName; */
NS_IMETHODIMP nsLDAPConnection::GetBindName(nsACString & aBindName)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* attribute nsISupports closure; */
NS_IMETHODIMP nsLDAPConnection::GetClosure(nsISupports * *aClosure)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}
NS_IMETHODIMP nsLDAPConnection::SetClosure(nsISupports *aClosure)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void init (in nsILDAPURL aUrl, in AUTF8String aBindName, in nsILDAPMessageListener aMessageListener, in nsISupports aClosure, in unsigned long aVersion); */
NS_IMETHODIMP nsLDAPConnection::Init(nsILDAPURL *aUrl, const nsACString & aBindName, nsILDAPMessageListener *aMessageListener, nsISupports *aClosure, uint32_t aVersion)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* long getLdErrno (out AUTF8String matched, out AUTF8String s); */
NS_IMETHODIMP nsLDAPConnection::GetLdErrno(nsACString & matched, nsACString & s, int32_t *_retval)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


#endif /* __gen_nsILDAPConnection_h__ */
