1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 * vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 * Note: This file is included by Variant.h.
11 #ifndef mozilla_storage_Variant_h__
12 # error "Do not include this file directly!"
15 #include "js/RootingAPI.h"
21 ////////////////////////////////////////////////////////////////////////////////
24 inline NS_IMPL_ADDREF(Variant_base
) inline NS_IMPL_RELEASE(
25 Variant_base
) inline NS_IMPL_QUERY_INTERFACE(Variant_base
, nsIVariant
)
27 ////////////////////////////////////////////////////////////////////////////////
30 inline uint16_t Variant_base::GetDataType() {
31 return nsIDataType::VTYPE_VOID
;
34 inline NS_IMETHODIMP
Variant_base::GetAsInt32(int32_t*) {
35 return NS_ERROR_CANNOT_CONVERT_DATA
;
38 inline NS_IMETHODIMP
Variant_base::GetAsInt64(int64_t*) {
39 return NS_ERROR_CANNOT_CONVERT_DATA
;
42 inline NS_IMETHODIMP
Variant_base::GetAsDouble(double*) {
43 return NS_ERROR_CANNOT_CONVERT_DATA
;
46 inline NS_IMETHODIMP
Variant_base::GetAsAUTF8String(nsACString
&) {
47 return NS_ERROR_CANNOT_CONVERT_DATA
;
50 inline NS_IMETHODIMP
Variant_base::GetAsAString(nsAString
&) {
51 return NS_ERROR_CANNOT_CONVERT_DATA
;
54 inline NS_IMETHODIMP
Variant_base::GetAsArray(uint16_t*, nsIID
*, uint32_t*,
56 return NS_ERROR_CANNOT_CONVERT_DATA
;
59 inline NS_IMETHODIMP
Variant_base::GetAsInt8(uint8_t*) {
60 return NS_ERROR_CANNOT_CONVERT_DATA
;
63 inline NS_IMETHODIMP
Variant_base::GetAsInt16(int16_t*) {
64 return NS_ERROR_CANNOT_CONVERT_DATA
;
67 inline NS_IMETHODIMP
Variant_base::GetAsUint8(uint8_t*) {
68 return NS_ERROR_CANNOT_CONVERT_DATA
;
71 inline NS_IMETHODIMP
Variant_base::GetAsUint16(uint16_t*) {
72 return NS_ERROR_CANNOT_CONVERT_DATA
;
75 inline NS_IMETHODIMP
Variant_base::GetAsUint32(uint32_t*) {
76 return NS_ERROR_CANNOT_CONVERT_DATA
;
79 inline NS_IMETHODIMP
Variant_base::GetAsUint64(uint64_t*) {
80 return NS_ERROR_CANNOT_CONVERT_DATA
;
83 inline NS_IMETHODIMP
Variant_base::GetAsFloat(float*) {
84 return NS_ERROR_CANNOT_CONVERT_DATA
;
87 inline NS_IMETHODIMP
Variant_base::GetAsBool(bool*) {
88 return NS_ERROR_CANNOT_CONVERT_DATA
;
91 inline NS_IMETHODIMP
Variant_base::GetAsChar(char*) {
92 return NS_ERROR_CANNOT_CONVERT_DATA
;
95 inline NS_IMETHODIMP
Variant_base::GetAsWChar(char16_t
*) {
96 return NS_ERROR_CANNOT_CONVERT_DATA
;
99 inline NS_IMETHODIMP
Variant_base::GetAsID(nsID
*) {
100 return NS_ERROR_CANNOT_CONVERT_DATA
;
103 inline NS_IMETHODIMP
Variant_base::GetAsString(char**) {
104 return NS_ERROR_CANNOT_CONVERT_DATA
;
107 inline NS_IMETHODIMP
Variant_base::GetAsWString(char16_t
**) {
108 return NS_ERROR_CANNOT_CONVERT_DATA
;
111 inline NS_IMETHODIMP
Variant_base::GetAsISupports(nsISupports
**) {
112 return NS_ERROR_CANNOT_CONVERT_DATA
;
115 inline NS_IMETHODIMP
Variant_base::GetAsInterface(nsIID
**, void**) {
116 return NS_ERROR_CANNOT_CONVERT_DATA
;
119 inline NS_IMETHODIMP
Variant_base::GetAsACString(nsACString
&) {
120 return NS_ERROR_CANNOT_CONVERT_DATA
;
123 inline NS_IMETHODIMP
Variant_base::GetAsStringWithSize(uint32_t*, char**) {
124 return NS_ERROR_CANNOT_CONVERT_DATA
;
127 inline NS_IMETHODIMP
Variant_base::GetAsWStringWithSize(uint32_t*, char16_t
**) {
128 return NS_ERROR_CANNOT_CONVERT_DATA
;
131 inline NS_IMETHODIMP
Variant_base::GetAsJSVal(JS::MutableHandle
<JS::Value
>) {
132 return NS_ERROR_CANNOT_CONVERT_DATA
;
135 } // namespace storage
136 } // namespace mozilla