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