Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/profile/nsIToolkitProfileService.idl
*/
#ifndef __gen_nsIToolkitProfileService_h__
#define __gen_nsIToolkitProfileService_h__
#include "nsISupports.h"
#include "nsTArray.h"
#include "js/Value.h"
#include "mozilla/AlreadyAddRefed.h"
#include "mozilla/Assertions.h"
#include "mozilla/DebugOnly.h"
/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class nsISimpleEnumerator; /* forward declaration */
class nsIFile; /* forward declaration */
class nsIToolkitProfile; /* forward declaration */
class nsIProfileLock; /* forward declaration */
/* starting interface: nsIToolkitProfileService */
#define NS_ITOOLKITPROFILESERVICE_IID_STR "1947899b-f369-48fa-89da-f7c37bb1e6bc"
#define NS_ITOOLKITPROFILESERVICE_IID \
{0x1947899b, 0xf369, 0x48fa, \
{ 0x89, 0xda, 0xf7, 0xc3, 0x7b, 0xb1, 0xe6, 0xbc }}
class NS_NO_VTABLE nsIToolkitProfileService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITOOLKITPROFILESERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsIToolkitProfileService;
/* [infallible] readonly attribute boolean isListOutdated; */
NS_IMETHOD GetIsListOutdated(bool *aIsListOutdated) = 0;
inline bool GetIsListOutdated()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetIsListOutdated(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
enum downgradeUIFlags : uint8_t {
hasSync = 1,
};
enum downgradeUIChoice : uint8_t {
quit = 0,
createNewProfile = 1,
};
enum profileManagerResult : uint8_t {
exit = 0,
launchWithProfile = 1,
restart = 2,
};
/* [infallible] attribute boolean startWithLastProfile; */
NS_IMETHOD GetStartWithLastProfile(bool *aStartWithLastProfile) = 0;
inline bool GetStartWithLastProfile()
{
bool result;
mozilla::DebugOnly<nsresult> rv = GetStartWithLastProfile(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
NS_IMETHOD SetStartWithLastProfile(bool aStartWithLastProfile) = 0;
/* [infallible] readonly attribute nsISimpleEnumerator profiles; */
NS_IMETHOD GetProfiles(nsISimpleEnumerator **aProfiles) = 0;
inline already_AddRefed<nsISimpleEnumerator> GetProfiles()
{
nsISimpleEnumerator* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetProfiles(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<nsISimpleEnumerator>(result);
}
/* [infallible] readonly attribute nsIToolkitProfile currentProfile; */
NS_IMETHOD GetCurrentProfile(nsIToolkitProfile **aCurrentProfile) = 0;
inline already_AddRefed<nsIToolkitProfile> GetCurrentProfile()
{
nsIToolkitProfile* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetCurrentProfile(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<nsIToolkitProfile>(result);
}
/* [infallible] readonly attribute nsIToolkitProfile groupProfile; */
NS_IMETHOD GetGroupProfile(nsIToolkitProfile **aGroupProfile) = 0;
inline already_AddRefed<nsIToolkitProfile> GetGroupProfile()
{
nsIToolkitProfile* result = nullptr;
mozilla::DebugOnly<nsresult> rv = GetGroupProfile(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return already_AddRefed<nsIToolkitProfile>(result);
}
/* attribute nsIToolkitProfile defaultProfile; */
NS_IMETHOD GetDefaultProfile(nsIToolkitProfile **aDefaultProfile) = 0;
NS_IMETHOD SetDefaultProfile(nsIToolkitProfile *aDefaultProfile) = 0;
/* boolean selectStartupProfile (in Array<ACString> aArgv, in boolean aIsResetting, in AUTF8String aUpdateChannel, in AUTF8String aLegacyInstallHash, out nsIFile aRootDir, out nsIFile aLocalDir, out nsIToolkitProfile aProfile); */
NS_IMETHOD SelectStartupProfile(const nsTArray<nsCString >& aArgv, bool aIsResetting, const nsACString& aUpdateChannel, const nsACString& aLegacyInstallHash, nsIFile **aRootDir, nsIFile **aLocalDir, nsIToolkitProfile **aProfile, bool *_retval) = 0;
/* nsIToolkitProfile getProfileByName (in AUTF8String aName); */
NS_IMETHOD GetProfileByName(const nsACString& aName, nsIToolkitProfile **_retval) = 0;
/* nsIToolkitProfile getProfileByDir (in nsIFile aRootDir, [optional] in nsIFile aLocalDir); */
NS_IMETHOD GetProfileByDir(nsIFile *aRootDir, nsIFile *aLocalDir, nsIToolkitProfile **_retval) = 0;
/* nsIToolkitProfile createProfile (in nsIFile aRootDir, in AUTF8String aName); */
NS_IMETHOD CreateProfile(nsIFile *aRootDir, const nsACString& aName, nsIToolkitProfile **_retval) = 0;
/* nsIToolkitProfile createUniqueProfile (in nsIFile aRootDir, in AUTF8String aNamePrefix); */
NS_IMETHOD CreateUniqueProfile(nsIFile *aRootDir, const nsACString& aNamePrefix, nsIToolkitProfile **_retval) = 0;
/* [infallible] readonly attribute unsigned long profileCount; */
NS_IMETHOD GetProfileCount(uint32_t *aProfileCount) = 0;
inline uint32_t GetProfileCount()
{
uint32_t result;
mozilla::DebugOnly<nsresult> rv = GetProfileCount(&result);
MOZ_ASSERT(NS_SUCCEEDED(rv));
return result;
}
/* void flush (); */
NS_IMETHOD Flush(void) = 0;
/* [implicit_jscontext] Promise asyncFlush (); */
NS_IMETHOD AsyncFlush(JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise asyncFlushCurrentProfile (); */
NS_IMETHOD AsyncFlushCurrentProfile(JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
/* [implicit_jscontext] Promise removeProfileFilesByPath (in nsIFile aRootDir, in nsIFile aLocalDir, in unsigned long aTimeout); */
NS_IMETHOD RemoveProfileFilesByPath(nsIFile *aRootDir, nsIFile *aLocalDir, uint32_t aTimeout, JSContext* cx, ::mozilla::dom::Promise * * _retval) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIToolkitProfileService, NS_ITOOLKITPROFILESERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSITOOLKITPROFILESERVICE \
using nsIToolkitProfileService::GetIsListOutdated; \
NS_IMETHOD GetIsListOutdated(bool *aIsListOutdated) override; \
using nsIToolkitProfileService::GetStartWithLastProfile; \
NS_IMETHOD GetStartWithLastProfile(bool *aStartWithLastProfile) override; \
NS_IMETHOD SetStartWithLastProfile(bool aStartWithLastProfile) override; \
using nsIToolkitProfileService::GetProfiles; \
NS_IMETHOD GetProfiles(nsISimpleEnumerator **aProfiles) override; \
using nsIToolkitProfileService::GetCurrentProfile; \
NS_IMETHOD GetCurrentProfile(nsIToolkitProfile **aCurrentProfile) override; \
using nsIToolkitProfileService::GetGroupProfile; \
NS_IMETHOD GetGroupProfile(nsIToolkitProfile **aGroupProfile) override; \
NS_IMETHOD GetDefaultProfile(nsIToolkitProfile **aDefaultProfile) override; \
NS_IMETHOD SetDefaultProfile(nsIToolkitProfile *aDefaultProfile) override; \
NS_IMETHOD SelectStartupProfile(const nsTArray<nsCString >& aArgv, bool aIsResetting, const nsACString& aUpdateChannel, const nsACString& aLegacyInstallHash, nsIFile **aRootDir, nsIFile **aLocalDir, nsIToolkitProfile **aProfile, bool *_retval) override; \
NS_IMETHOD GetProfileByName(const nsACString& aName, nsIToolkitProfile **_retval) override; \
NS_IMETHOD GetProfileByDir(nsIFile *aRootDir, nsIFile *aLocalDir, nsIToolkitProfile **_retval) override; \
NS_IMETHOD CreateProfile(nsIFile *aRootDir, const nsACString& aName, nsIToolkitProfile **_retval) override; \
NS_IMETHOD CreateUniqueProfile(nsIFile *aRootDir, const nsACString& aNamePrefix, nsIToolkitProfile **_retval) override; \
using nsIToolkitProfileService::GetProfileCount; \
NS_IMETHOD GetProfileCount(uint32_t *aProfileCount) override; \
NS_IMETHOD Flush(void) override; \
NS_IMETHOD AsyncFlush(JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD AsyncFlushCurrentProfile(JSContext* cx, ::mozilla::dom::Promise * * _retval) override; \
NS_IMETHOD RemoveProfileFilesByPath(nsIFile *aRootDir, nsIFile *aLocalDir, uint32_t aTimeout, JSContext* cx, ::mozilla::dom::Promise * * _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_NSITOOLKITPROFILESERVICE \
using nsIToolkitProfileService::GetIsListOutdated; \
nsresult GetIsListOutdated(bool *aIsListOutdated); \
using nsIToolkitProfileService::GetStartWithLastProfile; \
nsresult GetStartWithLastProfile(bool *aStartWithLastProfile); \
nsresult SetStartWithLastProfile(bool aStartWithLastProfile); \
using nsIToolkitProfileService::GetProfiles; \
nsresult GetProfiles(nsISimpleEnumerator **aProfiles); \
using nsIToolkitProfileService::GetCurrentProfile; \
nsresult GetCurrentProfile(nsIToolkitProfile **aCurrentProfile); \
using nsIToolkitProfileService::GetGroupProfile; \
nsresult GetGroupProfile(nsIToolkitProfile **aGroupProfile); \
nsresult GetDefaultProfile(nsIToolkitProfile **aDefaultProfile); \
nsresult SetDefaultProfile(nsIToolkitProfile *aDefaultProfile); \
nsresult SelectStartupProfile(const nsTArray<nsCString >& aArgv, bool aIsResetting, const nsACString& aUpdateChannel, const nsACString& aLegacyInstallHash, nsIFile **aRootDir, nsIFile **aLocalDir, nsIToolkitProfile **aProfile, bool *_retval); \
nsresult GetProfileByName(const nsACString& aName, nsIToolkitProfile **_retval); \
nsresult GetProfileByDir(nsIFile *aRootDir, nsIFile *aLocalDir, nsIToolkitProfile **_retval); \
nsresult CreateProfile(nsIFile *aRootDir, const nsACString& aName, nsIToolkitProfile **_retval); \
nsresult CreateUniqueProfile(nsIFile *aRootDir, const nsACString& aNamePrefix, nsIToolkitProfile **_retval); \
using nsIToolkitProfileService::GetProfileCount; \
nsresult GetProfileCount(uint32_t *aProfileCount); \
nsresult Flush(void); \
nsresult AsyncFlush(JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult AsyncFlushCurrentProfile(JSContext* cx, ::mozilla::dom::Promise * * _retval); \
nsresult RemoveProfileFilesByPath(nsIFile *aRootDir, nsIFile *aLocalDir, uint32_t aTimeout, JSContext* cx, ::mozilla::dom::Promise * * _retval);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSITOOLKITPROFILESERVICE(_to) \
using nsIToolkitProfileService::GetIsListOutdated; \
NS_IMETHOD GetIsListOutdated(bool *aIsListOutdated) override { return _to GetIsListOutdated(aIsListOutdated); } \
using nsIToolkitProfileService::GetStartWithLastProfile; \
NS_IMETHOD GetStartWithLastProfile(bool *aStartWithLastProfile) override { return _to GetStartWithLastProfile(aStartWithLastProfile); } \
NS_IMETHOD SetStartWithLastProfile(bool aStartWithLastProfile) override { return _to SetStartWithLastProfile(aStartWithLastProfile); } \
using nsIToolkitProfileService::GetProfiles; \
NS_IMETHOD GetProfiles(nsISimpleEnumerator **aProfiles) override { return _to GetProfiles(aProfiles); } \
using nsIToolkitProfileService::GetCurrentProfile; \
NS_IMETHOD GetCurrentProfile(nsIToolkitProfile **aCurrentProfile) override { return _to GetCurrentProfile(aCurrentProfile); } \
using nsIToolkitProfileService::GetGroupProfile; \
NS_IMETHOD GetGroupProfile(nsIToolkitProfile **aGroupProfile) override { return _to GetGroupProfile(aGroupProfile); } \
NS_IMETHOD GetDefaultProfile(nsIToolkitProfile **aDefaultProfile) override { return _to GetDefaultProfile(aDefaultProfile); } \
NS_IMETHOD SetDefaultProfile(nsIToolkitProfile *aDefaultProfile) override { return _to SetDefaultProfile(aDefaultProfile); } \
NS_IMETHOD SelectStartupProfile(const nsTArray<nsCString >& aArgv, bool aIsResetting, const nsACString& aUpdateChannel, const nsACString& aLegacyInstallHash, nsIFile **aRootDir, nsIFile **aLocalDir, nsIToolkitProfile **aProfile, bool *_retval) override { return _to SelectStartupProfile(aArgv, aIsResetting, aUpdateChannel, aLegacyInstallHash, aRootDir, aLocalDir, aProfile, _retval); } \
NS_IMETHOD GetProfileByName(const nsACString& aName, nsIToolkitProfile **_retval) override { return _to GetProfileByName(aName, _retval); } \
NS_IMETHOD GetProfileByDir(nsIFile *aRootDir, nsIFile *aLocalDir, nsIToolkitProfile **_retval) override { return _to GetProfileByDir(aRootDir, aLocalDir, _retval); } \
NS_IMETHOD CreateProfile(nsIFile *aRootDir, const nsACString& aName, nsIToolkitProfile **_retval) override { return _to CreateProfile(aRootDir, aName, _retval); } \
NS_IMETHOD CreateUniqueProfile(nsIFile *aRootDir, const nsACString& aNamePrefix, nsIToolkitProfile **_retval) override { return _to CreateUniqueProfile(aRootDir, aNamePrefix, _retval); } \
using nsIToolkitProfileService::GetProfileCount; \
NS_IMETHOD GetProfileCount(uint32_t *aProfileCount) override { return _to GetProfileCount(aProfileCount); } \
NS_IMETHOD Flush(void) override { return _to Flush(); } \
NS_IMETHOD AsyncFlush(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to AsyncFlush(cx, _retval); } \
NS_IMETHOD AsyncFlushCurrentProfile(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to AsyncFlushCurrentProfile(cx, _retval); } \
NS_IMETHOD RemoveProfileFilesByPath(nsIFile *aRootDir, nsIFile *aLocalDir, uint32_t aTimeout, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return _to RemoveProfileFilesByPath(aRootDir, aLocalDir, aTimeout, cx, _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_NSITOOLKITPROFILESERVICE(_to) \
NS_IMETHOD GetIsListOutdated(bool *aIsListOutdated) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsListOutdated(aIsListOutdated); } \
NS_IMETHOD GetStartWithLastProfile(bool *aStartWithLastProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStartWithLastProfile(aStartWithLastProfile); } \
NS_IMETHOD SetStartWithLastProfile(bool aStartWithLastProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStartWithLastProfile(aStartWithLastProfile); } \
NS_IMETHOD GetProfiles(nsISimpleEnumerator **aProfiles) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfiles(aProfiles); } \
NS_IMETHOD GetCurrentProfile(nsIToolkitProfile **aCurrentProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentProfile(aCurrentProfile); } \
NS_IMETHOD GetGroupProfile(nsIToolkitProfile **aGroupProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetGroupProfile(aGroupProfile); } \
NS_IMETHOD GetDefaultProfile(nsIToolkitProfile **aDefaultProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultProfile(aDefaultProfile); } \
NS_IMETHOD SetDefaultProfile(nsIToolkitProfile *aDefaultProfile) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDefaultProfile(aDefaultProfile); } \
NS_IMETHOD SelectStartupProfile(const nsTArray<nsCString >& aArgv, bool aIsResetting, const nsACString& aUpdateChannel, const nsACString& aLegacyInstallHash, nsIFile **aRootDir, nsIFile **aLocalDir, nsIToolkitProfile **aProfile, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectStartupProfile(aArgv, aIsResetting, aUpdateChannel, aLegacyInstallHash, aRootDir, aLocalDir, aProfile, _retval); } \
NS_IMETHOD GetProfileByName(const nsACString& aName, nsIToolkitProfile **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileByName(aName, _retval); } \
NS_IMETHOD GetProfileByDir(nsIFile *aRootDir, nsIFile *aLocalDir, nsIToolkitProfile **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileByDir(aRootDir, aLocalDir, _retval); } \
NS_IMETHOD CreateProfile(nsIFile *aRootDir, const nsACString& aName, nsIToolkitProfile **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProfile(aRootDir, aName, _retval); } \
NS_IMETHOD CreateUniqueProfile(nsIFile *aRootDir, const nsACString& aNamePrefix, nsIToolkitProfile **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateUniqueProfile(aRootDir, aNamePrefix, _retval); } \
NS_IMETHOD GetProfileCount(uint32_t *aProfileCount) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProfileCount(aProfileCount); } \
NS_IMETHOD Flush(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
NS_IMETHOD AsyncFlush(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncFlush(cx, _retval); } \
NS_IMETHOD AsyncFlushCurrentProfile(JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncFlushCurrentProfile(cx, _retval); } \
NS_IMETHOD RemoveProfileFilesByPath(nsIFile *aRootDir, nsIFile *aLocalDir, uint32_t aTimeout, JSContext* cx, ::mozilla::dom::Promise * * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveProfileFilesByPath(aRootDir, aLocalDir, aTimeout, cx, _retval); }
#define NS_PROFILESERVICE_CONTRACTID "@mozilla.org/toolkit/profile-service;1"
#endif /* __gen_nsIToolkitProfileService_h__ */