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!"
18 ////////////////////////////////////////////////////////////////////////////////
21 inline NS_IMPL_THREADSAFE_ADDREF(Variant_base
)
22 inline NS_IMPL_THREADSAFE_RELEASE(Variant_base
)
23 inline NS_IMPL_THREADSAFE_QUERY_INTERFACE1(
28 ////////////////////////////////////////////////////////////////////////////////
33 Variant_base::GetDataType(uint16_t *_type
)
35 NS_ENSURE_ARG_POINTER(_type
);
36 *_type
= nsIDataType::VTYPE_VOID
;
42 Variant_base::GetAsInt32(int32_t *)
44 return NS_ERROR_CANNOT_CONVERT_DATA
;
49 Variant_base::GetAsInt64(int64_t *)
51 return NS_ERROR_CANNOT_CONVERT_DATA
;
56 Variant_base::GetAsDouble(double *)
58 return NS_ERROR_CANNOT_CONVERT_DATA
;
63 Variant_base::GetAsAUTF8String(nsACString
&)
65 return NS_ERROR_CANNOT_CONVERT_DATA
;
70 Variant_base::GetAsAString(nsAString
&)
72 return NS_ERROR_CANNOT_CONVERT_DATA
;
77 Variant_base::GetAsArray(uint16_t *,
82 return NS_ERROR_CANNOT_CONVERT_DATA
;
87 Variant_base::GetAsInt8(uint8_t *)
89 return NS_ERROR_CANNOT_CONVERT_DATA
;
94 Variant_base::GetAsInt16(int16_t *)
96 return NS_ERROR_CANNOT_CONVERT_DATA
;
101 Variant_base::GetAsUint8(uint8_t *)
103 return NS_ERROR_CANNOT_CONVERT_DATA
;
108 Variant_base::GetAsUint16(uint16_t *)
110 return NS_ERROR_CANNOT_CONVERT_DATA
;
115 Variant_base::GetAsUint32(uint32_t *)
117 return NS_ERROR_CANNOT_CONVERT_DATA
;
122 Variant_base::GetAsUint64(uint64_t *)
124 return NS_ERROR_CANNOT_CONVERT_DATA
;
129 Variant_base::GetAsFloat(float *)
131 return NS_ERROR_CANNOT_CONVERT_DATA
;
136 Variant_base::GetAsBool(bool *)
138 return NS_ERROR_CANNOT_CONVERT_DATA
;
143 Variant_base::GetAsChar(char *)
145 return NS_ERROR_CANNOT_CONVERT_DATA
;
150 Variant_base::GetAsWChar(PRUnichar
*)
152 return NS_ERROR_CANNOT_CONVERT_DATA
;
157 Variant_base::GetAsID(nsID
*)
159 return NS_ERROR_CANNOT_CONVERT_DATA
;
164 Variant_base::GetAsDOMString(nsAString
&)
166 return NS_ERROR_CANNOT_CONVERT_DATA
;
171 Variant_base::GetAsString(char **)
173 return NS_ERROR_CANNOT_CONVERT_DATA
;
178 Variant_base::GetAsWString(PRUnichar
**)
180 return NS_ERROR_CANNOT_CONVERT_DATA
;
185 Variant_base::GetAsISupports(nsISupports
**)
187 return NS_ERROR_CANNOT_CONVERT_DATA
;
192 Variant_base::GetAsInterface(nsIID
**,
195 return NS_ERROR_CANNOT_CONVERT_DATA
;
200 Variant_base::GetAsACString(nsACString
&)
202 return NS_ERROR_CANNOT_CONVERT_DATA
;
207 Variant_base::GetAsStringWithSize(uint32_t *,
210 return NS_ERROR_CANNOT_CONVERT_DATA
;
215 Variant_base::GetAsWStringWithSize(uint32_t *,
218 return NS_ERROR_CANNOT_CONVERT_DATA
;
223 Variant_base::GetAsJSVal(JS::Value
*)
225 return NS_ERROR_CANNOT_CONVERT_DATA
;
228 } // namespace storage
229 } // namespace mozilla