/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/mozilla-central-macosx-xulrunner/build/dom/interfaces/geolocation/nsIGeolocationPrompt.idl
 */

#ifndef __gen_nsIGeolocationPrompt_h__
#define __gen_nsIGeolocationPrompt_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 nsIURI; /* forward declaration */

class nsIDOMWindow; /* forward declaration */

class nsIDOMElement; /* forward declaration */

class nsIDOMGeoPosition; /* forward declaration */

class nsIGeolocationPrompt; /* forward declaration */


/* starting interface:    nsIGeolocationRequest */
#define NS_IGEOLOCATIONREQUEST_IID_STR "f2aefde1-8e38-48b3-bbb8-bd6c4ae1ac8a"

#define NS_IGEOLOCATIONREQUEST_IID \
  {0xf2aefde1, 0x8e38, 0x48b3, \
    { 0xbb, 0xb8, 0xbd, 0x6c, 0x4a, 0xe1, 0xac, 0x8a }}

/**
 * Interface allows access to a geolocation and is passed to
 * the nsIGeolocationPrompt so that the application can approve
 * or deny the request.
 */
class NS_NO_VTABLE NS_SCRIPTABLE nsIGeolocationRequest : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGEOLOCATIONREQUEST_IID)

  /* readonly attribute nsIURI requestingURI; */
  NS_SCRIPTABLE NS_IMETHOD GetRequestingURI(nsIURI **aRequestingURI) = 0;

  /* readonly attribute nsIDOMWindow requestingWindow; */
  NS_SCRIPTABLE NS_IMETHOD GetRequestingWindow(nsIDOMWindow **aRequestingWindow) = 0;

  /* readonly attribute nsIDOMElement requestingElement; */
  NS_SCRIPTABLE NS_IMETHOD GetRequestingElement(nsIDOMElement **aRequestingElement) = 0;

  /* void cancel (); */
  NS_SCRIPTABLE NS_IMETHOD Cancel(void) = 0;

  /* void allow (); */
  NS_SCRIPTABLE NS_IMETHOD Allow(void) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIGeolocationRequest, NS_IGEOLOCATIONREQUEST_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIGEOLOCATIONREQUEST \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingURI(nsIURI **aRequestingURI); \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingWindow(nsIDOMWindow **aRequestingWindow); \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingElement(nsIDOMElement **aRequestingElement); \
  NS_SCRIPTABLE NS_IMETHOD Cancel(void); \
  NS_SCRIPTABLE NS_IMETHOD Allow(void); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIGEOLOCATIONREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingURI(nsIURI **aRequestingURI) { return _to GetRequestingURI(aRequestingURI); } \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingWindow(nsIDOMWindow **aRequestingWindow) { return _to GetRequestingWindow(aRequestingWindow); } \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingElement(nsIDOMElement **aRequestingElement) { return _to GetRequestingElement(aRequestingElement); } \
  NS_SCRIPTABLE NS_IMETHOD Cancel(void) { return _to Cancel(); } \
  NS_SCRIPTABLE NS_IMETHOD Allow(void) { return _to Allow(); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIGEOLOCATIONREQUEST(_to) \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingURI(nsIURI **aRequestingURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestingURI(aRequestingURI); } \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingWindow(nsIDOMWindow **aRequestingWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestingWindow(aRequestingWindow); } \
  NS_SCRIPTABLE NS_IMETHOD GetRequestingElement(nsIDOMElement **aRequestingElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetRequestingElement(aRequestingElement); } \
  NS_SCRIPTABLE NS_IMETHOD Cancel(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Cancel(); } \
  NS_SCRIPTABLE NS_IMETHOD Allow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Allow(); } 

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

/* Header file */
class nsGeolocationRequest : public nsIGeolocationRequest
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIGEOLOCATIONREQUEST

  nsGeolocationRequest();

private:
  ~nsGeolocationRequest();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsGeolocationRequest, nsIGeolocationRequest)

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

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

/* readonly attribute nsIURI requestingURI; */
NS_IMETHODIMP nsGeolocationRequest::GetRequestingURI(nsIURI **aRequestingURI)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMWindow requestingWindow; */
NS_IMETHODIMP nsGeolocationRequest::GetRequestingWindow(nsIDOMWindow **aRequestingWindow)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* readonly attribute nsIDOMElement requestingElement; */
NS_IMETHODIMP nsGeolocationRequest::GetRequestingElement(nsIDOMElement **aRequestingElement)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void cancel (); */
NS_IMETHODIMP nsGeolocationRequest::Cancel()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

/* void allow (); */
NS_IMETHODIMP nsGeolocationRequest::Allow()
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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


/* starting interface:    nsIGeolocationPrompt */
#define NS_IGEOLOCATIONPROMPT_IID_STR "2300c895-1bee-4297-912c-a57082f3e936"

#define NS_IGEOLOCATIONPROMPT_IID \
  {0x2300c895, 0x1bee, 0x4297, \
    { 0x91, 0x2c, 0xa5, 0x70, 0x82, 0xf3, 0xe9, 0x36 }}

class NS_NO_VTABLE NS_SCRIPTABLE nsIGeolocationPrompt : public nsISupports {
 public: 

  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGEOLOCATIONPROMPT_IID)

  /**
 * Interface provides a way for the application to handle
 * the UI prompts associated with geo position.
 */
/**
   * Called when a request has been made to access geolocation data
   */
  /* void prompt (in nsIGeolocationRequest request); */
  NS_SCRIPTABLE NS_IMETHOD Prompt(nsIGeolocationRequest *request) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(nsIGeolocationPrompt, NS_IGEOLOCATIONPROMPT_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIGEOLOCATIONPROMPT \
  NS_SCRIPTABLE NS_IMETHOD Prompt(nsIGeolocationRequest *request); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSIGEOLOCATIONPROMPT(_to) \
  NS_SCRIPTABLE NS_IMETHOD Prompt(nsIGeolocationRequest *request) { return _to Prompt(request); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSIGEOLOCATIONPROMPT(_to) \
  NS_SCRIPTABLE NS_IMETHOD Prompt(nsIGeolocationRequest *request) { return !_to ? NS_ERROR_NULL_POINTER : _to->Prompt(request); } 

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

/* Header file */
class nsGeolocationPrompt : public nsIGeolocationPrompt
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIGEOLOCATIONPROMPT

  nsGeolocationPrompt();

private:
  ~nsGeolocationPrompt();

protected:
  /* additional members */
};

/* Implementation file */
NS_IMPL_ISUPPORTS1(nsGeolocationPrompt, nsIGeolocationPrompt)

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

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

/* void prompt (in nsIGeolocationRequest request); */
NS_IMETHODIMP nsGeolocationPrompt::Prompt(nsIGeolocationRequest *request)
{
    return NS_ERROR_NOT_IMPLEMENTED;
}

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

/*  
    This must be implemented by embedders.  It must support
    nsIGeolocationPrompt.
*/
#define NS_GEOLOCATION_PROMPT_CONTRACTID   "@mozilla.org/geolocation/prompt;1"

#endif /* __gen_nsIGeolocationPrompt_h__ */
