/* * DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/xpcom/system/nsIGeolocationProvider.idl */ #ifndef __gen_nsIGeolocationProvider_h__ #define __gen_nsIGeolocationProvider_h__ #include "nsISupports.h" #include "js/GCAnnotations.h" /* 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 nsIDOMGeoPosition; /* forward declaration */ class nsIGeolocationPrompt; /* forward declaration */ /* starting interface: nsIGeolocationUpdate */ #define NS_IGEOLOCATIONUPDATE_IID_STR "643dc5e9-b911-4b2c-8d44-603162696baf" #define NS_IGEOLOCATIONUPDATE_IID \ {0x643dc5e9, 0xb911, 0x4b2c, \ { 0x8d, 0x44, 0x60, 0x31, 0x62, 0x69, 0x6b, 0xaf }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIGeolocationUpdate) nsIGeolocationUpdate : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IGEOLOCATIONUPDATE_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIGeolocationUpdate; /* void update (in nsIDOMGeoPosition position); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationUpdate_update) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Update(nsIDOMGeoPosition *position) = 0; /* [can_run_script] void notifyError (in unsigned short error); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationUpdate_notifyError) JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyError(uint16_t error) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIGEOLOCATIONUPDATE \ NS_IMETHOD Update(nsIDOMGeoPosition *position) override; \ MOZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyError(uint16_t error) 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_NSIGEOLOCATIONUPDATE \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationUpdate_update)\ nsresult Update(nsIDOMGeoPosition *position); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationUpdate_notifyError)\ MOZ_CAN_RUN_SCRIPT nsresult NotifyError(uint16_t error); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIGEOLOCATIONUPDATE(_to) \ NS_IMETHOD Update(nsIDOMGeoPosition *position) override { return _to Update(position); } \ MOZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyError(uint16_t error) override { return _to NotifyError(error); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIGEOLOCATIONUPDATE(_to) \ NS_IMETHOD Update(nsIDOMGeoPosition *position) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(position); } \ MOZ_CAN_RUN_SCRIPT NS_IMETHOD NotifyError(uint16_t error) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyError(error); } /* starting interface: nsIGeolocationProvider */ #define NS_IGEOLOCATIONPROVIDER_IID_STR "ac4a133b-9f92-4f7c-b369-d40cb6b17650" #define NS_IGEOLOCATIONPROVIDER_IID \ {0xac4a133b, 0x9f92, 0x4f7c, \ { 0xb3, 0x69, 0xd4, 0x0c, 0xb6, 0xb1, 0x76, 0x50 }} class NS_NO_VTABLE MOZ_BINDING(binding_to, idl, class, XPIDL_nsIGeolocationProvider) nsIGeolocationProvider : public nsISupports { public: NS_INLINE_DECL_STATIC_IID(NS_IGEOLOCATIONPROVIDER_IID) /* Used by ToJSValue to check which scriptable interface is implemented. */ using ScriptableInterfaceType = nsIGeolocationProvider; /* void startup (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_startup) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Startup(void) = 0; /* void watch (in nsIGeolocationUpdate callback); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_watch) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Watch(nsIGeolocationUpdate *callback) = 0; /* void shutdown (); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_shutdown) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Shutdown(void) = 0; /* void setHighAccuracy (in boolean enable); */ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_setHighAccuracy) JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD SetHighAccuracy(bool enable) = 0; }; /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIGEOLOCATIONPROVIDER \ NS_IMETHOD Startup(void) override; \ NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override; \ NS_IMETHOD Shutdown(void) override; \ NS_IMETHOD SetHighAccuracy(bool enable) 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_NSIGEOLOCATIONPROVIDER \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_startup)\ nsresult Startup(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_watch)\ nsresult Watch(nsIGeolocationUpdate *callback); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_shutdown)\ nsresult Shutdown(void); \ MOZ_BINDING(binding_to, idl, method, XPIDL_nsIGeolocationProvider_setHighAccuracy)\ nsresult SetHighAccuracy(bool enable); /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIGEOLOCATIONPROVIDER(_to) \ NS_IMETHOD Startup(void) override { return _to Startup(); } \ NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override { return _to Watch(callback); } \ NS_IMETHOD Shutdown(void) override { return _to Shutdown(); } \ NS_IMETHOD SetHighAccuracy(bool enable) override { return _to SetHighAccuracy(enable); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIGEOLOCATIONPROVIDER(_to) \ NS_IMETHOD Startup(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Startup(); } \ NS_IMETHOD Watch(nsIGeolocationUpdate *callback) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Watch(callback); } \ NS_IMETHOD Shutdown(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \ NS_IMETHOD SetHighAccuracy(bool enable) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetHighAccuracy(enable); } // %{C++:77-81 /* This must be implemented by geolocation providers. It must support nsIGeolocationProvider. */ #define NS_GEOLOCATION_PROVIDER_CONTRACTID "@mozilla.org/geolocation/provider;1" // %} #endif /* __gen_nsIGeolocationProvider_h__ */