2009-03-20 20:28:16 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2009-04-13 16:29:41 +00:00
|
|
|
* vim: sw=2 ts=2 et lcs=trail\:.,tab\:>~ :
|
2012-05-21 11:12:37 +00: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 20:28:16 +00:00
|
|
|
|
2009-06-11 20:18:58 +00: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 20:28:16 +00:00
|
|
|
|
2009-04-10 17:20:12 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace storage {
|
|
|
|
|
2009-03-20 20:28:16 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2009-04-10 17:20:12 +00:00
|
|
|
//// Variant_base
|
2009-03-20 20:28:16 +00:00
|
|
|
|
2013-07-19 02:24:15 +00:00
|
|
|
inline NS_IMPL_ADDREF(Variant_base)
|
|
|
|
inline NS_IMPL_RELEASE(Variant_base)
|
2014-04-27 07:06:00 +00:00
|
|
|
inline NS_IMPL_QUERY_INTERFACE(
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base,
|
2009-03-20 20:28:16 +00:00
|
|
|
nsIVariant
|
|
|
|
)
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//// nsIVariant
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetDataType(uint16_t *_type)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
2009-06-24 22:04:49 +00:00
|
|
|
NS_ENSURE_ARG_POINTER(_type);
|
|
|
|
*_type = nsIDataType::VTYPE_VOID;
|
2009-03-20 20:28:16 +00:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsInt32(int32_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsInt64(int64_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsDouble(double *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsAUTF8String(nsACString &)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsAString(nsAString &)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsArray(uint16_t *,
|
2009-04-10 17:20:12 +00:00
|
|
|
nsIID *,
|
2012-08-22 15:56:38 +00:00
|
|
|
uint32_t *,
|
2009-04-10 17:20:12 +00:00
|
|
|
void **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsInt8(uint8_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsInt16(int16_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsUint8(uint8_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsUint16(uint16_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsUint32(uint32_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsUint64(uint64_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsFloat(float *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2011-09-29 06:19:26 +00:00
|
|
|
Variant_base::GetAsBool(bool *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsChar(char *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2014-01-04 15:02:17 +00:00
|
|
|
Variant_base::GetAsWChar(char16_t *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsID(nsID *)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsDOMString(nsAString &)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsString(char **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2014-01-04 15:02:17 +00:00
|
|
|
Variant_base::GetAsWString(char16_t **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsISupports(nsISupports **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsInterface(nsIID **,
|
|
|
|
void **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2009-04-10 17:20:12 +00:00
|
|
|
Variant_base::GetAsACString(nsACString &)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsStringWithSize(uint32_t *,
|
2009-04-10 17:20:12 +00:00
|
|
|
char **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-06-11 20:18:58 +00:00
|
|
|
inline
|
2009-03-20 20:28:16 +00:00
|
|
|
NS_IMETHODIMP
|
2012-08-22 15:56:38 +00:00
|
|
|
Variant_base::GetAsWStringWithSize(uint32_t *,
|
2014-01-04 15:02:17 +00:00
|
|
|
char16_t **)
|
2009-03-20 20:28:16 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
2009-04-10 17:20:12 +00:00
|
|
|
|
2009-09-01 16:45:05 +00:00
|
|
|
inline
|
|
|
|
NS_IMETHODIMP
|
2014-01-09 17:39:36 +00:00
|
|
|
Variant_base::GetAsJSVal(JS::MutableHandle<JS::Value>)
|
2009-09-01 16:45:05 +00:00
|
|
|
{
|
|
|
|
return NS_ERROR_CANNOT_CONVERT_DATA;
|
|
|
|
}
|
|
|
|
|
2009-04-10 17:20:12 +00:00
|
|
|
} // namespace storage
|
|
|
|
} // namespace mozilla
|