Copy as Markdown

Other Tools

//
// DO NOT EDIT. THIS FILE IS GENERATED FROM $SRCDIR/toolkit/components/kvstore/nsIKeyValue.idl
//
{static D: &[Interface] = &[
Interface {
name: "nsIKeyValueService",
base: Some("nsISupports"),
sync: true,
methods: Ok(&[
/* void getOrCreate (in nsIKeyValueDatabaseCallback callback, in AString path, in AUTF8String name); */
Method {
name: "GetOrCreate",
params: &[Param { name: "callback", ty: "*const nsIKeyValueDatabaseCallback" }, Param { name: "path", ty: "*const ::nsstring::nsAString" }, Param { name: "name", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* void getOrCreateWithOptions (in nsIKeyValueDatabaseCallback callback, in AString path, in AUTF8String name, [optional] in nsIKeyValueService_RecoveryStrategy recoveryStrategy); */
Method {
name: "GetOrCreateWithOptions",
params: &[Param { name: "callback", ty: "*const nsIKeyValueDatabaseCallback" }, Param { name: "path", ty: "*const ::nsstring::nsAString" }, Param { name: "name", ty: "*const ::nsstring::nsACString" }, Param { name: "recoveryStrategy", ty: " u8" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValueImporter createImporter (in AUTF8String type, in AString path); */
Method {
name: "CreateImporter",
params: &[Param { name: "type_", ty: "*const ::nsstring::nsACString" }, Param { name: "path", ty: "*const ::nsstring::nsAString" }, Param { name: "_retval", ty: "*mut*const nsIKeyValueImporter" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueImportSourceSpec",
base: Some("nsISupports"),
sync: true,
methods: Ok(&[
/* readonly attribute AString path; */
Method {
name: "GetPath",
params: &[Param { name: "aPath", ty: "*mut ::nsstring::nsAString" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValueDatabaseImportOptions addDatabase (in AUTF8String name); */
Method {
name: "AddDatabase",
params: &[Param { name: "name", ty: "*const ::nsstring::nsACString" }, Param { name: "_retval", ty: "*mut*const nsIKeyValueDatabaseImportOptions" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValueDatabaseImportOptions addAllDatabases (); */
Method {
name: "AddAllDatabases",
params: &[Param { name: "_retval", ty: "*mut*const nsIKeyValueDatabaseImportOptions" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueImporter",
base: Some("nsIKeyValueImportSourceSpec"),
sync: true,
methods: Ok(&[
/* readonly attribute AUTF8String type; */
Method {
name: "GetType",
params: &[Param { name: "aType", ty: "*mut ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValueImportSourceSpec addPath (in AString path); */
Method {
name: "AddPath",
params: &[Param { name: "path", ty: "*const ::nsstring::nsAString" }, Param { name: "_retval", ty: "*mut *const nsIKeyValueImportSourceSpec" }],
ret: "::nserror::nsresult",
},
/* void import (in nsIKeyValueVoidCallback callback); */
Method {
name: "Import",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueDatabaseImportOptions",
base: Some("nsISupports"),
sync: true,
methods: Ok(&[
/* nsIKeyValueDatabaseImportOptions setConflictPolicy (in nsIKeyValueImporter_ConflictPolicy conflictPolicy); */
Method {
name: "SetConflictPolicy",
params: &[Param { name: "conflictPolicy", ty: " u8" }, Param { name: "_retval", ty: "*mut *const nsIKeyValueDatabaseImportOptions" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValueDatabaseImportOptions setCleanupPolicy (in nsIKeyValueImporter_CleanupPolicy cleanupPolicy); */
Method {
name: "SetCleanupPolicy",
params: &[Param { name: "cleanupPolicy", ty: " u8" }, Param { name: "_retval", ty: "*mut *const nsIKeyValueDatabaseImportOptions" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueDatabase",
base: Some("nsISupports"),
sync: true,
methods: Ok(&[
/* void isEmpty (in nsIKeyValueVariantCallback callback); */
Method {
name: "IsEmpty",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVariantCallback" }],
ret: "::nserror::nsresult",
},
/* void count (in nsIKeyValueVariantCallback callback); */
Method {
name: "Count",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVariantCallback" }],
ret: "::nserror::nsresult",
},
/* void size (in nsIKeyValueVariantCallback callback); */
Method {
name: "Size",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVariantCallback" }],
ret: "::nserror::nsresult",
},
/* void put (in nsIKeyValueVoidCallback callback, in AUTF8String key, in nsIVariant value); */
Method {
name: "Put",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }, Param { name: "key", ty: "*const ::nsstring::nsACString" }, Param { name: "value", ty: "*const nsIVariant" }],
ret: "::nserror::nsresult",
},
/* void writeMany (in nsIKeyValueVoidCallback callback, in Array<nsIKeyValuePair> pairs); */
Method {
name: "WriteMany",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }, Param { name: "pairs", ty: "*const thin_vec::ThinVec<Option<RefPtr<nsIKeyValuePair>>>" }],
ret: "::nserror::nsresult",
},
/* void get (in nsIKeyValueVariantCallback callback, in AUTF8String key, [optional] in nsIVariant defaultValue); */
Method {
name: "Get",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVariantCallback" }, Param { name: "key", ty: "*const ::nsstring::nsACString" }, Param { name: "defaultValue", ty: "*const nsIVariant" }],
ret: "::nserror::nsresult",
},
/* void has (in nsIKeyValueVariantCallback callback, in AUTF8String key); */
Method {
name: "Has",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVariantCallback" }, Param { name: "key", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* void delete (in nsIKeyValueVoidCallback callback, in AUTF8String key); */
Method {
name: "Delete",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }, Param { name: "key", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* void deleteRange (in nsIKeyValueVoidCallback callback, [optional] in AUTF8String fromKey, [optional] in AUTF8String toKey); */
Method {
name: "DeleteRange",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }, Param { name: "fromKey", ty: "*const ::nsstring::nsACString" }, Param { name: "toKey", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* void clear (in nsIKeyValueVoidCallback callback); */
Method {
name: "Clear",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }],
ret: "::nserror::nsresult",
},
/* void enumerate (in nsIKeyValueEnumeratorCallback callback, [optional] in AUTF8String fromKey, [optional] in AUTF8String toKey); */
Method {
name: "Enumerate",
params: &[Param { name: "callback", ty: "*const nsIKeyValueEnumeratorCallback" }, Param { name: "fromKey", ty: "*const ::nsstring::nsACString" }, Param { name: "toKey", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* void close (in nsIKeyValueVoidCallback callback); */
Method {
name: "Close",
params: &[Param { name: "callback", ty: "*const nsIKeyValueVoidCallback" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValuePair",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* readonly attribute AUTF8String key; */
Method {
name: "GetKey",
params: &[Param { name: "aKey", ty: "*mut ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
/* readonly attribute nsIVariant value; */
Method {
name: "GetValue",
params: &[Param { name: "aValue", ty: "*mut *const nsIVariant" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueEnumerator",
base: Some("nsISupports"),
sync: true,
methods: Ok(&[
/* boolean hasMoreElements (); */
Method {
name: "HasMoreElements",
params: &[Param { name: "_retval", ty: "*mut bool" }],
ret: "::nserror::nsresult",
},
/* nsIKeyValuePair getNext (); */
Method {
name: "GetNext",
params: &[Param { name: "_retval", ty: "*mut *const nsIKeyValuePair" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueDatabaseCallback",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* void resolve (in nsIKeyValueDatabase database); */
Method {
name: "Resolve",
params: &[Param { name: "database", ty: "*const nsIKeyValueDatabase" }],
ret: "::nserror::nsresult",
},
/* void reject (in AUTF8String message); */
Method {
name: "Reject",
params: &[Param { name: "message", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueEnumeratorCallback",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* void resolve (in nsIKeyValueEnumerator enumerator); */
Method {
name: "Resolve",
params: &[Param { name: "enumerator", ty: "*const nsIKeyValueEnumerator" }],
ret: "::nserror::nsresult",
},
/* void reject (in AUTF8String message); */
Method {
name: "Reject",
params: &[Param { name: "message", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValuePairCallback",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* void resolve (in nsIKeyValuePair pair); */
Method {
name: "Resolve",
params: &[Param { name: "pair", ty: "*const nsIKeyValuePair" }],
ret: "::nserror::nsresult",
},
/* void reject (in AUTF8String message); */
Method {
name: "Reject",
params: &[Param { name: "message", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueVariantCallback",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* void resolve (in nsIVariant result); */
Method {
name: "Resolve",
params: &[Param { name: "result", ty: "*const nsIVariant" }],
ret: "::nserror::nsresult",
},
/* void reject (in AUTF8String message); */
Method {
name: "Reject",
params: &[Param { name: "message", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
]),
},
Interface {
name: "nsIKeyValueVoidCallback",
base: Some("nsISupports"),
sync: false,
methods: Ok(&[
/* void resolve (); */
Method {
name: "Resolve",
params: &[],
ret: "::nserror::nsresult",
},
/* void reject (in AUTF8String message); */
Method {
name: "Reject",
params: &[Param { name: "message", ty: "*const ::nsstring::nsACString" }],
ret: "::nserror::nsresult",
},
]),
},
]; D}