Bug 1938677 - Don't rebuild all snapshots when refreshing a single line. r=rsafaeian...
[gecko.git] / storage / Variant_inl.h
blob15601534a2d42cc00aba61a78bb4e3217d914c09
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/. */
7 /**
8 * Note: This file is included by Variant.h.
9 */
11 #ifndef mozilla_storage_Variant_h__
12 # error "Do not include this file directly!"
13 #endif
15 #include "js/RootingAPI.h"
16 #include "js/Value.h"
18 namespace mozilla {
19 namespace storage {
21 ////////////////////////////////////////////////////////////////////////////////
22 //// Variant_base
24 inline NS_IMPL_ADDREF(Variant_base) inline NS_IMPL_RELEASE(
25 Variant_base) inline NS_IMPL_QUERY_INTERFACE(Variant_base, nsIVariant,
26 nsIInterfaceRequestor)
28 ////////////////////////////////////////////////////////////////////////////////
29 //// nsIVariant
31 inline uint16_t Variant_base::GetDataType() {
32 return nsIDataType::VTYPE_VOID;
35 inline NS_IMETHODIMP Variant_base::GetAsInt32(int32_t*) {
36 return NS_ERROR_CANNOT_CONVERT_DATA;
39 inline NS_IMETHODIMP Variant_base::GetAsInt64(int64_t*) {
40 return NS_ERROR_CANNOT_CONVERT_DATA;
43 inline NS_IMETHODIMP Variant_base::GetAsDouble(double*) {
44 return NS_ERROR_CANNOT_CONVERT_DATA;
47 inline NS_IMETHODIMP Variant_base::GetAsAUTF8String(nsACString&) {
48 return NS_ERROR_CANNOT_CONVERT_DATA;
51 inline NS_IMETHODIMP Variant_base::GetAsAString(nsAString&) {
52 return NS_ERROR_CANNOT_CONVERT_DATA;
55 inline NS_IMETHODIMP Variant_base::GetAsArray(uint16_t*, nsIID*, uint32_t*,
56 void**) {
57 return NS_ERROR_CANNOT_CONVERT_DATA;
60 inline NS_IMETHODIMP Variant_base::GetAsInt8(uint8_t*) {
61 return NS_ERROR_CANNOT_CONVERT_DATA;
64 inline NS_IMETHODIMP Variant_base::GetAsInt16(int16_t*) {
65 return NS_ERROR_CANNOT_CONVERT_DATA;
68 inline NS_IMETHODIMP Variant_base::GetAsUint8(uint8_t*) {
69 return NS_ERROR_CANNOT_CONVERT_DATA;
72 inline NS_IMETHODIMP Variant_base::GetAsUint16(uint16_t*) {
73 return NS_ERROR_CANNOT_CONVERT_DATA;
76 inline NS_IMETHODIMP Variant_base::GetAsUint32(uint32_t*) {
77 return NS_ERROR_CANNOT_CONVERT_DATA;
80 inline NS_IMETHODIMP Variant_base::GetAsUint64(uint64_t*) {
81 return NS_ERROR_CANNOT_CONVERT_DATA;
84 inline NS_IMETHODIMP Variant_base::GetAsFloat(float*) {
85 return NS_ERROR_CANNOT_CONVERT_DATA;
88 inline NS_IMETHODIMP Variant_base::GetAsBool(bool*) {
89 return NS_ERROR_CANNOT_CONVERT_DATA;
92 inline NS_IMETHODIMP Variant_base::GetAsChar(char*) {
93 return NS_ERROR_CANNOT_CONVERT_DATA;
96 inline NS_IMETHODIMP Variant_base::GetAsWChar(char16_t*) {
97 return NS_ERROR_CANNOT_CONVERT_DATA;
100 inline NS_IMETHODIMP Variant_base::GetAsID(nsID*) {
101 return NS_ERROR_CANNOT_CONVERT_DATA;
104 inline NS_IMETHODIMP Variant_base::GetAsString(char**) {
105 return NS_ERROR_CANNOT_CONVERT_DATA;
108 inline NS_IMETHODIMP Variant_base::GetAsWString(char16_t**) {
109 return NS_ERROR_CANNOT_CONVERT_DATA;
112 inline NS_IMETHODIMP Variant_base::GetAsISupports(nsISupports**) {
113 return NS_ERROR_CANNOT_CONVERT_DATA;
116 inline NS_IMETHODIMP Variant_base::GetAsInterface(nsIID**, void**) {
117 return NS_ERROR_CANNOT_CONVERT_DATA;
120 inline NS_IMETHODIMP Variant_base::GetAsACString(nsACString&) {
121 return NS_ERROR_CANNOT_CONVERT_DATA;
124 inline NS_IMETHODIMP Variant_base::GetAsStringWithSize(uint32_t*, char**) {
125 return NS_ERROR_CANNOT_CONVERT_DATA;
128 inline NS_IMETHODIMP Variant_base::GetAsWStringWithSize(uint32_t*, char16_t**) {
129 return NS_ERROR_CANNOT_CONVERT_DATA;
132 inline NS_IMETHODIMP Variant_base::GetAsJSVal(JS::MutableHandle<JS::Value>) {
133 return NS_ERROR_CANNOT_CONVERT_DATA;
136 } // namespace storage
137 } // namespace mozilla