Copy as Markdown

Other Tools

/*
* DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/places/mozISyncedBookmarksMirror.idl
*/
#ifndef __gen_mozISyncedBookmarksMirror_h__
#define __gen_mozISyncedBookmarksMirror_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 mozIPlacesPendingOperation; /* forward declaration */
class mozIStorageConnection; /* forward declaration */
class nsIPropertyBag; /* forward declaration */
/* starting interface: mozISyncedBookmarksMirrorProgressListener */
#define MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER_IID_STR "6239ffe3-6ffd-49ac-8b1d-958407395bf9"
#define MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER_IID \
{0x6239ffe3, 0x6ffd, 0x49ac, \
{ 0x8b, 0x1d, 0x95, 0x84, 0x07, 0x39, 0x5b, 0xf9 }}
class NS_NO_VTABLE mozISyncedBookmarksMirrorProgressListener : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozISyncedBookmarksMirrorProgressListener;
/* void onFetchLocalTree (in long long took, in long long itemCount, in long long deletedCount, in nsIPropertyBag problems); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnFetchLocalTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) = 0;
/* void onFetchRemoteTree (in long long took, in long long itemCount, in long long deletedCount, in nsIPropertyBag problems); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnFetchRemoteTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) = 0;
/* void onMerge (in long long took, in nsIPropertyBag counts); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnMerge(int64_t took, nsIPropertyBag *counts) = 0;
/* void onApply (in long long took); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnApply(int64_t took) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER \
NS_IMETHOD OnFetchLocalTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override; \
NS_IMETHOD OnFetchRemoteTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override; \
NS_IMETHOD OnMerge(int64_t took, nsIPropertyBag *counts) override; \
NS_IMETHOD OnApply(int64_t took) 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_MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER \
nsresult OnFetchLocalTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems); \
nsresult OnFetchRemoteTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems); \
nsresult OnMerge(int64_t took, nsIPropertyBag *counts); \
nsresult OnApply(int64_t took);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER(_to) \
NS_IMETHOD OnFetchLocalTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override { return _to OnFetchLocalTree(took, itemCount, deletedCount, problems); } \
NS_IMETHOD OnFetchRemoteTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override { return _to OnFetchRemoteTree(took, itemCount, deletedCount, problems); } \
NS_IMETHOD OnMerge(int64_t took, nsIPropertyBag *counts) override { return _to OnMerge(took, counts); } \
NS_IMETHOD OnApply(int64_t took) override { return _to OnApply(took); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZISYNCEDBOOKMARKSMIRRORPROGRESSLISTENER(_to) \
NS_IMETHOD OnFetchLocalTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFetchLocalTree(took, itemCount, deletedCount, problems); } \
NS_IMETHOD OnFetchRemoteTree(int64_t took, int64_t itemCount, int64_t deletedCount, nsIPropertyBag *problems) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFetchRemoteTree(took, itemCount, deletedCount, problems); } \
NS_IMETHOD OnMerge(int64_t took, nsIPropertyBag *counts) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMerge(took, counts); } \
NS_IMETHOD OnApply(int64_t took) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnApply(took); }
/* starting interface: mozISyncedBookmarksMirrorCallback */
#define MOZISYNCEDBOOKMARKSMIRRORCALLBACK_IID_STR "d23fdfea-92c8-409d-a516-08ae395d578f"
#define MOZISYNCEDBOOKMARKSMIRRORCALLBACK_IID \
{0xd23fdfea, 0x92c8, 0x409d, \
{ 0xa5, 0x16, 0x08, 0xae, 0x39, 0x5d, 0x57, 0x8f }}
class NS_NO_VTABLE mozISyncedBookmarksMirrorCallback : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZISYNCEDBOOKMARKSMIRRORCALLBACK_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozISyncedBookmarksMirrorCallback;
/* void handleSuccess (in boolean result); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HandleSuccess(bool result) = 0;
/* void handleError (in nsresult code, in AString message); */
JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD HandleError(nsresult code, const nsAString& message) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZISYNCEDBOOKMARKSMIRRORCALLBACK \
NS_IMETHOD HandleSuccess(bool result) override; \
NS_IMETHOD HandleError(nsresult code, const nsAString& message) 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_MOZISYNCEDBOOKMARKSMIRRORCALLBACK \
nsresult HandleSuccess(bool result); \
nsresult HandleError(nsresult code, const nsAString& message);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZISYNCEDBOOKMARKSMIRRORCALLBACK(_to) \
NS_IMETHOD HandleSuccess(bool result) override { return _to HandleSuccess(result); } \
NS_IMETHOD HandleError(nsresult code, const nsAString& message) override { return _to HandleError(code, message); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZISYNCEDBOOKMARKSMIRRORCALLBACK(_to) \
NS_IMETHOD HandleSuccess(bool result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleSuccess(result); } \
NS_IMETHOD HandleError(nsresult code, const nsAString& message) override { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleError(code, message); }
/* starting interface: mozISyncedBookmarksMerger */
#define MOZISYNCEDBOOKMARKSMERGER_IID_STR "f0a6217d-8344-4e68-9995-bbf5554be86e"
#define MOZISYNCEDBOOKMARKSMERGER_IID \
{0xf0a6217d, 0x8344, 0x4e68, \
{ 0x99, 0x95, 0xbb, 0xf5, 0x55, 0x4b, 0xe8, 0x6e }}
class NS_NO_VTABLE mozISyncedBookmarksMerger : public nsISupports {
public:
NS_INLINE_DECL_STATIC_IID(MOZISYNCEDBOOKMARKSMERGER_IID)
/* Used by ToJSValue to check which scriptable interface is implemented. */
using ScriptableInterfaceType = mozISyncedBookmarksMerger;
enum SyncedItemKinds : uint8_t {
KIND_BOOKMARK = 1,
KIND_QUERY = 2,
KIND_FOLDER = 3,
KIND_LIVEMARK = 4,
KIND_SEPARATOR = 5,
};
enum SyncedItemValidity : uint8_t {
VALIDITY_VALID = 1,
VALIDITY_REUPLOAD = 2,
VALIDITY_REPLACE = 3,
};
/* attribute mozIStorageConnection db; */
NS_IMETHOD GetDb(mozIStorageConnection **aDb) = 0;
NS_IMETHOD SetDb(mozIStorageConnection *aDb) = 0;
/* mozIPlacesPendingOperation merge (in long long localTimeSeconds, in long long remoteTimeSeconds, in mozISyncedBookmarksMirrorCallback callback); */
NS_IMETHOD Merge(int64_t localTimeSeconds, int64_t remoteTimeSeconds, mozISyncedBookmarksMirrorCallback *callback, mozIPlacesPendingOperation **_retval) = 0;
/* void reset (); */
NS_IMETHOD Reset(void) = 0;
};
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_MOZISYNCEDBOOKMARKSMERGER \
NS_IMETHOD GetDb(mozIStorageConnection **aDb) override; \
NS_IMETHOD SetDb(mozIStorageConnection *aDb) override; \
NS_IMETHOD Merge(int64_t localTimeSeconds, int64_t remoteTimeSeconds, mozISyncedBookmarksMirrorCallback *callback, mozIPlacesPendingOperation **_retval) override; \
NS_IMETHOD Reset(void) 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_MOZISYNCEDBOOKMARKSMERGER \
nsresult GetDb(mozIStorageConnection **aDb); \
nsresult SetDb(mozIStorageConnection *aDb); \
nsresult Merge(int64_t localTimeSeconds, int64_t remoteTimeSeconds, mozISyncedBookmarksMirrorCallback *callback, mozIPlacesPendingOperation **_retval); \
nsresult Reset(void);
/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_MOZISYNCEDBOOKMARKSMERGER(_to) \
NS_IMETHOD GetDb(mozIStorageConnection **aDb) override { return _to GetDb(aDb); } \
NS_IMETHOD SetDb(mozIStorageConnection *aDb) override { return _to SetDb(aDb); } \
NS_IMETHOD Merge(int64_t localTimeSeconds, int64_t remoteTimeSeconds, mozISyncedBookmarksMirrorCallback *callback, mozIPlacesPendingOperation **_retval) override { return _to Merge(localTimeSeconds, remoteTimeSeconds, callback, _retval); } \
NS_IMETHOD Reset(void) override { return _to Reset(); }
/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_MOZISYNCEDBOOKMARKSMERGER(_to) \
NS_IMETHOD GetDb(mozIStorageConnection **aDb) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDb(aDb); } \
NS_IMETHOD SetDb(mozIStorageConnection *aDb) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDb(aDb); } \
NS_IMETHOD Merge(int64_t localTimeSeconds, int64_t remoteTimeSeconds, mozISyncedBookmarksMirrorCallback *callback, mozIPlacesPendingOperation **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Merge(localTimeSeconds, remoteTimeSeconds, callback, _retval); } \
NS_IMETHOD Reset(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Reset(); }
#endif /* __gen_mozISyncedBookmarksMirror_h__ */