2009-03-20 23:28:16 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2009-04-13 20:29:41 +04:00
|
|
|
* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
|
2012-05-21 15:12:37 +04:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2009-03-20 23:28:16 +03:00
|
|
|
|
2009-06-12 00:18:58 +04:00
|
|
|
/**
|
|
|
|
* Note: This file is included by Variant.h.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef mozilla_storage_Variant_h__
|
|
|
|
# error "Do not include this file directly!"
|
|
|
|
#endif
|
2009-03-20 23:28:16 +03:00
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace storage {
|
|
|
|
|
2009-03-20 23:28:16 +03:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2009-04-10 21:20:12 +04:00
|
|
|
//// Variant_base
|
2009-03-20 23:28:16 +03:00
|
|
|
|
2013-07-19 06:24:15 +04:00
|
|
|
inline NS_IMPL_ADDREF(Variant_base) inline NS_IMPL_RELEASE(
|
2014-04-27 11:06:00 +04:00
|
|
|
Variant_base) inline NS_IMPL_QUERY_INTERFACE(Variant_base, nsIVariant)
|
2009-03-20 23:28:16 +03:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// nsIVariant
|
|
|
|
|
2018-11-20 04:20:05 +03:00
|
|
|
inline uint16_t Variant_base::GetDataType() {
|
|
|
|
return nsIDataType::VTYPE_VOID;
|
2009-03-20 23:28:16 +03:00
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsInt32(int32_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsInt64(int64_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsDouble(double *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsAUTF8String(nsACString &) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsAString(nsAString &) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsArray(uint16_t *, nsIID *, uint32_t *,
|
2009-04-10 21:20:12 +04:00
|
|
|
void **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsInt8(uint8_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsInt16(int16_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsUint8(uint8_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsUint16(uint16_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsUint32(uint32_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsUint64(uint64_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsFloat(float *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsBool(bool *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsChar(char *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2014-01-04 19:02:17 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsWChar(char16_t *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsID(nsID *) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsString(char **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2014-01-04 19:02:17 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsWString(char16_t **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsISupports(nsISupports **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsInterface(nsIID **, void **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsACString(nsACString &) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsStringWithSize(uint32_t *, char **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2012-08-22 19:56:38 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsWStringWithSize(uint32_t *,
|
2014-01-04 19:02:17 +04:00
|
|
|
char16_t **) {
|
2009-03-20 23:28:16 +03:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
2009-04-10 21:20:12 +04:00
|
|
|
|
2014-01-09 21:39:36 +04:00
|
|
|
inline NS_IMETHODIMP Variant_base::GetAsJSVal(JS::MutableHandle<JS::Value>) {
|
2009-09-01 20:45:05 +04:00
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 21:20:12 +04:00
|
|
|
} // namespace storage
|
|
|
|
} // namespace mozilla
|