Bug 634734 - Fennec ASSERTION: mFUnitsConvFactor not valid: mFUnitsConvFactor > 0...
[mozilla-central.git] / storage / src / Variant_inl.h
blob0bb279f641c89748b04dc66b207bb82d7e420e61
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 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
16 * The Original Code is mozilla.org code.
18 * The Initial Developer of the Original Code is
19 * Mozilla Corporation
20 * Portions created by the Initial Developer are Copyright (C) 2008
21 * the Initial Developer. All Rights Reserved.
23 * Contributor(s):
24 * Shawn Wilsher <me@shawnwilsher.com> (Original Author)
26 * Alternatively, the contents of this file may be used under the terms of
27 * either the GNU General Public License Version 2 or later (the "GPL"), or
28 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL.
38 * ***** END LICENSE BLOCK ***** */
40 /**
41 * Note: This file is included by Variant.h.
44 #ifndef mozilla_storage_Variant_h__
45 #error "Do not include this file directly!"
46 #endif
48 namespace mozilla {
49 namespace storage {
51 ////////////////////////////////////////////////////////////////////////////////
52 //// Variant_base
54 inline NS_IMPL_THREADSAFE_ADDREF(Variant_base)
55 inline NS_IMPL_THREADSAFE_RELEASE(Variant_base)
56 inline NS_IMPL_THREADSAFE_QUERY_INTERFACE1(
57 Variant_base,
58 nsIVariant
61 ////////////////////////////////////////////////////////////////////////////////
62 //// nsIVariant
64 inline
65 NS_IMETHODIMP
66 Variant_base::GetDataType(PRUint16 *_type)
68 NS_ENSURE_ARG_POINTER(_type);
69 *_type = nsIDataType::VTYPE_VOID;
70 return NS_OK;
73 inline
74 NS_IMETHODIMP
75 Variant_base::GetAsInt32(PRInt32 *)
77 return NS_ERROR_CANNOT_CONVERT_DATA;
80 inline
81 NS_IMETHODIMP
82 Variant_base::GetAsInt64(PRInt64 *)
84 return NS_ERROR_CANNOT_CONVERT_DATA;
87 inline
88 NS_IMETHODIMP
89 Variant_base::GetAsDouble(double *)
91 return NS_ERROR_CANNOT_CONVERT_DATA;
94 inline
95 NS_IMETHODIMP
96 Variant_base::GetAsAUTF8String(nsACString &)
98 return NS_ERROR_CANNOT_CONVERT_DATA;
101 inline
102 NS_IMETHODIMP
103 Variant_base::GetAsAString(nsAString &)
105 return NS_ERROR_CANNOT_CONVERT_DATA;
108 inline
109 NS_IMETHODIMP
110 Variant_base::GetAsArray(PRUint16 *,
111 nsIID *,
112 PRUint32 *,
113 void **)
115 return NS_ERROR_CANNOT_CONVERT_DATA;
118 inline
119 NS_IMETHODIMP
120 Variant_base::GetAsInt8(PRUint8 *)
122 return NS_ERROR_CANNOT_CONVERT_DATA;
125 inline
126 NS_IMETHODIMP
127 Variant_base::GetAsInt16(PRInt16 *)
129 return NS_ERROR_CANNOT_CONVERT_DATA;
132 inline
133 NS_IMETHODIMP
134 Variant_base::GetAsUint8(PRUint8 *)
136 return NS_ERROR_CANNOT_CONVERT_DATA;
139 inline
140 NS_IMETHODIMP
141 Variant_base::GetAsUint16(PRUint16 *)
143 return NS_ERROR_CANNOT_CONVERT_DATA;
146 inline
147 NS_IMETHODIMP
148 Variant_base::GetAsUint32(PRUint32 *)
150 return NS_ERROR_CANNOT_CONVERT_DATA;
153 inline
154 NS_IMETHODIMP
155 Variant_base::GetAsUint64(PRUint64 *)
157 return NS_ERROR_CANNOT_CONVERT_DATA;
160 inline
161 NS_IMETHODIMP
162 Variant_base::GetAsFloat(float *)
164 return NS_ERROR_CANNOT_CONVERT_DATA;
167 inline
168 NS_IMETHODIMP
169 Variant_base::GetAsBool(PRBool *)
171 return NS_ERROR_CANNOT_CONVERT_DATA;
174 inline
175 NS_IMETHODIMP
176 Variant_base::GetAsChar(char *)
178 return NS_ERROR_CANNOT_CONVERT_DATA;
181 inline
182 NS_IMETHODIMP
183 Variant_base::GetAsWChar(PRUnichar *)
185 return NS_ERROR_CANNOT_CONVERT_DATA;
188 inline
189 NS_IMETHODIMP
190 Variant_base::GetAsID(nsID *)
192 return NS_ERROR_CANNOT_CONVERT_DATA;
195 inline
196 NS_IMETHODIMP
197 Variant_base::GetAsDOMString(nsAString &)
199 return NS_ERROR_CANNOT_CONVERT_DATA;
202 inline
203 NS_IMETHODIMP
204 Variant_base::GetAsString(char **)
206 return NS_ERROR_CANNOT_CONVERT_DATA;
209 inline
210 NS_IMETHODIMP
211 Variant_base::GetAsWString(PRUnichar **)
213 return NS_ERROR_CANNOT_CONVERT_DATA;
216 inline
217 NS_IMETHODIMP
218 Variant_base::GetAsISupports(nsISupports **)
220 return NS_ERROR_CANNOT_CONVERT_DATA;
223 inline
224 NS_IMETHODIMP
225 Variant_base::GetAsInterface(nsIID **,
226 void **)
228 return NS_ERROR_CANNOT_CONVERT_DATA;
231 inline
232 NS_IMETHODIMP
233 Variant_base::GetAsACString(nsACString &)
235 return NS_ERROR_CANNOT_CONVERT_DATA;
238 inline
239 NS_IMETHODIMP
240 Variant_base::GetAsStringWithSize(PRUint32 *,
241 char **)
243 return NS_ERROR_CANNOT_CONVERT_DATA;
246 inline
247 NS_IMETHODIMP
248 Variant_base::GetAsWStringWithSize(PRUint32 *,
249 PRUnichar **)
251 return NS_ERROR_CANNOT_CONVERT_DATA;
254 inline
255 NS_IMETHODIMP
256 Variant_base::GetAsJSVal(jsval *)
258 return NS_ERROR_CANNOT_CONVERT_DATA;
261 } // namespace storage
262 } // namespace mozilla