no bug - Import translations from android-l10n r=release a=l10n CLOSED TREE
[gecko.git] / intl / l10n / RegistryBindings.h
blob916082e5cfae9316d458ba53ecd9055fe77dc8af
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"
12 namespace mozilla {
14 template <>
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);
24 template <>
25 class DefaultDelete<intl::ffi::GeckoFluentBundleIterator> {
26 public:
27 void operator()(intl::ffi::GeckoFluentBundleIterator* aPtr) const {
28 fluent_bundle_iterator_destroy(aPtr);
32 template <>
33 class DefaultDelete<intl::ffi::GeckoFluentBundleAsyncIteratorWrapper> {
34 public:
35 void operator()(
36 intl::ffi::GeckoFluentBundleAsyncIteratorWrapper* aPtr) const {
37 fluent_bundle_async_iterator_destroy(aPtr);
41 template <>
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
53 #endif