Copy as Markdown
Other Tools
/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/places/nsINavBookmarksService.idl
*/
#ifndef __gen_nsINavBookmarksService_h__
#define __gen_nsINavBookmarksService_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 nsIFile; /* forward declaration */
class nsIURI; /* forward declaration */
class nsITransaction; /* forward declaration */
/* starting interface: nsINavBookmarksService */
#define NS_INAVBOOKMARKSSERVICE_IID_STR "24533891-afa6-4663-b72d-3143d03f1b04"
#define NS_INAVBOOKMARKSSERVICE_IID \
{0x24533891, 0xafa6, 0x4663, \
{ 0xb7, 0x2d, 0x31, 0x43, 0xd0, 0x3f, 0x1b, 0x04 }}
class NS_NO_VTABLE nsINavBookmarksService : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INAVBOOKMARKSSERVICE_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = nsINavBookmarksService;
/* readonly attribute long long tagsFolder; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTagsFolder(int64_t *aTagsFolder) = 0;
/* readonly attribute long long totalSyncChanges; */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetTotalSyncChanges(int64_t *aTotalSyncChanges) = 0;
enum {
DEFAULT_INDEX = -1,
TYPE_BOOKMARK = 1U,
TYPE_FOLDER = 2U,
TYPE_SEPARATOR = 3U,
TYPE_DYNAMIC_CONTAINER = 4U,
SOURCE_DEFAULT = 0U,
SOURCE_SYNC = 1U,
SOURCE_IMPORT = 2U,
SOURCE_SYNC_REPARENT_REMOVED_FOLDER_CHILDREN = 4U,
SOURCE_RESTORE = 5U,
SOURCE_RESTORE_ON_STARTUP = 6U,
SYNC_STATUS_UNKNOWN = 0U,
SYNC_STATUS_NEW = 1U,
SYNC_STATUS_NORMAL = 2U
};
/* [can_run_script] long long insertBookmark (in long long aParentId, in nsIURI aURI, in long aIndex, in AUTF8String aTitle, [optional] in ACString aGuid, [optional] in unsigned short aSource); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD InsertBookmark(int64_t aParentId, nsIURI *aURI, int32_t aIndex, const nsACString& aTitle, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) = 0;
/* [can_run_script] void removeItem (in long long aItemId, [optional] in unsigned short aSource); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveItem(int64_t aItemId, uint16_t aSource) = 0;
/* [can_run_script] long long createFolder (in long long aParentFolder, in AUTF8String name, in long index, [optional] in ACString aGuid, [optional] in unsigned short aSource); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD CreateFolder(int64_t aParentFolder, const nsACString& name, int32_t index, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) = 0;
/* [can_run_script] void setItemTitle (in long long aItemId, in AUTF8String aTitle, [optional] in unsigned short aSource); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemTitle(int64_t aItemId, const nsACString& aTitle, uint16_t aSource) = 0;
/* AUTF8String getItemTitle (in long long aItemId); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetItemTitle(int64_t aItemId, nsACString& _retval) = 0;
/* [can_run_script] void setItemLastModified (in long long aItemId, in PRTime aLastModified, [optional] in unsigned short aSource); */
JS_HAZ_CAN_RUN_SCRIPT MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemLastModified(int64_t aItemId, PRTime aLastModified, uint16_t aSource) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINavBookmarksService, NS_INAVBOOKMARKSSERVICE_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSINAVBOOKMARKSSERVICE \
NS_IMETHOD GetTagsFolder(int64_t *aTagsFolder) override; \
NS_IMETHOD GetTotalSyncChanges(int64_t *aTotalSyncChanges) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD InsertBookmark(int64_t aParentId, nsIURI *aURI, int32_t aIndex, const nsACString& aTitle, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveItem(int64_t aItemId, uint16_t aSource) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CreateFolder(int64_t aParentFolder, const nsACString& name, int32_t index, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemTitle(int64_t aItemId, const nsACString& aTitle, uint16_t aSource) override; \
NS_IMETHOD GetItemTitle(int64_t aItemId, nsACString& _retval) override; \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemLastModified(int64_t aItemId, PRTime aLastModified, uint16_t aSource) 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_NSINAVBOOKMARKSSERVICE \
nsresult GetTagsFolder(int64_t *aTagsFolder); \
nsresult GetTotalSyncChanges(int64_t *aTotalSyncChanges); \
MOZ_CAN_RUN_SCRIPT nsresult InsertBookmark(int64_t aParentId, nsIURI *aURI, int32_t aIndex, const nsACString& aTitle, const nsACString& aGuid, uint16_t aSource, int64_t *_retval); \
MOZ_CAN_RUN_SCRIPT nsresult RemoveItem(int64_t aItemId, uint16_t aSource); \
MOZ_CAN_RUN_SCRIPT nsresult CreateFolder(int64_t aParentFolder, const nsACString& name, int32_t index, const nsACString& aGuid, uint16_t aSource, int64_t *_retval); \
MOZ_CAN_RUN_SCRIPT nsresult SetItemTitle(int64_t aItemId, const nsACString& aTitle, uint16_t aSource); \
nsresult GetItemTitle(int64_t aItemId, nsACString& _retval); \
MOZ_CAN_RUN_SCRIPT nsresult SetItemLastModified(int64_t aItemId, PRTime aLastModified, uint16_t aSource);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_NSINAVBOOKMARKSSERVICE(_to) \
NS_IMETHOD GetTagsFolder(int64_t *aTagsFolder) override { return _to GetTagsFolder(aTagsFolder); } \
NS_IMETHOD GetTotalSyncChanges(int64_t *aTotalSyncChanges) override { return _to GetTotalSyncChanges(aTotalSyncChanges); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD InsertBookmark(int64_t aParentId, nsIURI *aURI, int32_t aIndex, const nsACString& aTitle, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override { return _to InsertBookmark(aParentId, aURI, aIndex, aTitle, aGuid, aSource, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveItem(int64_t aItemId, uint16_t aSource) override { return _to RemoveItem(aItemId, aSource); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CreateFolder(int64_t aParentFolder, const nsACString& name, int32_t index, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override { return _to CreateFolder(aParentFolder, name, index, aGuid, aSource, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemTitle(int64_t aItemId, const nsACString& aTitle, uint16_t aSource) override { return _to SetItemTitle(aItemId, aTitle, aSource); } \
NS_IMETHOD GetItemTitle(int64_t aItemId, nsACString& _retval) override { return _to GetItemTitle(aItemId, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemLastModified(int64_t aItemId, PRTime aLastModified, uint16_t aSource) override { return _to SetItemLastModified(aItemId, aLastModified, aSource); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_NSINAVBOOKMARKSSERVICE(_to) \
NS_IMETHOD GetTagsFolder(int64_t *aTagsFolder) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagsFolder(aTagsFolder); } \
NS_IMETHOD GetTotalSyncChanges(int64_t *aTotalSyncChanges) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTotalSyncChanges(aTotalSyncChanges); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD InsertBookmark(int64_t aParentId, nsIURI *aURI, int32_t aIndex, const nsACString& aTitle, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InsertBookmark(aParentId, aURI, aIndex, aTitle, aGuid, aSource, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD RemoveItem(int64_t aItemId, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveItem(aItemId, aSource); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD CreateFolder(int64_t aParentFolder, const nsACString& name, int32_t index, const nsACString& aGuid, uint16_t aSource, int64_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateFolder(aParentFolder, name, index, aGuid, aSource, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemTitle(int64_t aItemId, const nsACString& aTitle, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemTitle(aItemId, aTitle, aSource); } \
NS_IMETHOD GetItemTitle(int64_t aItemId, nsACString& _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetItemTitle(aItemId, _retval); } \
MOZ_CAN_RUN_SCRIPT NS_IMETHOD SetItemLastModified(int64_t aItemId, PRTime aLastModified, uint16_t aSource) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetItemLastModified(aItemId, aLastModified, aSource); }
#endif /* __gen_nsINavBookmarksService_h__ */