1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_intl_l10n_RegistryBindings_h
6 #define mozilla_intl_l10n_RegistryBindings_h
8 #include "mozilla/intl/l10nregistry_ffi_generated.h"
10 #include "mozilla/RefPtr.h"
15 struct RefPtrTraits
<intl::ffi::FileSource
> {
16 static void AddRef(const intl::ffi::FileSource
* aPtr
) {
17 intl::ffi::l10nfilesource_addref(aPtr
);
19 static void Release(const intl::ffi::FileSource
* aPtr
) {
20 intl::ffi::l10nfilesource_release(aPtr
);
25 class DefaultDelete
<intl::ffi::GeckoFluentBundleIterator
> {
27 void operator()(intl::ffi::GeckoFluentBundleIterator
* aPtr
) const {
28 fluent_bundle_iterator_destroy(aPtr
);
33 class DefaultDelete
<intl::ffi::GeckoFluentBundleAsyncIteratorWrapper
> {
36 intl::ffi::GeckoFluentBundleAsyncIteratorWrapper
* aPtr
) const {
37 fluent_bundle_async_iterator_destroy(aPtr
);
42 struct RefPtrTraits
<intl::ffi::GeckoL10nRegistry
> {
43 static void AddRef(const intl::ffi::GeckoL10nRegistry
* aPtr
) {
44 intl::ffi::l10nregistry_addref(aPtr
);
46 static void Release(const intl::ffi::GeckoL10nRegistry
* aPtr
) {
47 intl::ffi::l10nregistry_release(aPtr
);
51 } // namespace mozilla