Bug 454708 - storage-Legacy can throw when calling ConvertToUnicode. r=gavin
[wine-gecko.git] / modules / oji / src / nsJVMConfigManager.cpp
bloba0b490f49543abc6aca6f4d69991721bf91accd1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is Sun Microsystems.
18 * Portions created by the Initial Developer are Copyright (C) 2003
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
22 * Pete Zha <pete.zha@sun.com> (original author)
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsJVMConfigManager.h"
40 NS_IMPL_ISUPPORTS1(nsJVMConfig, nsIJVMConfig)
42 nsJVMConfig::nsJVMConfig(const nsAString& aVersion, const nsAString& aType,
43 const nsAString& aOS, const nsAString& aArch,
44 nsIFile* aPath, nsIFile* aMozillaPluginPath,
45 const nsAString& aDescription) :
46 mVersion(aVersion),
47 mType(aType),
48 mOS(aOS),
49 mArch(aArch),
50 mPath(aPath),
51 mMozillaPluginPath(aMozillaPluginPath),
52 mDescription(aDescription)
56 nsJVMConfig::~nsJVMConfig()
60 /* readonly attribute AString version; */
61 NS_IMETHODIMP
62 nsJVMConfig::GetVersion(nsAString & aVersion)
64 aVersion = mVersion;
65 return NS_OK;
68 /* readonly attribute AString type; */
69 NS_IMETHODIMP
70 nsJVMConfig::GetType(nsAString & aType)
72 aType = mType;
73 return NS_OK;
76 /* readonly attribute AString os; */
77 NS_IMETHODIMP
78 nsJVMConfig::GetOS(nsAString & aOS)
80 aOS = mOS;
81 return NS_OK;
84 /* readonly attribute AString arch; */
85 NS_IMETHODIMP
86 nsJVMConfig::GetArch(nsAString & aArch)
88 aArch = mArch;
89 return NS_OK;
92 NS_IMETHODIMP
93 nsJVMConfig::GetPath(nsIFile** aPath)
95 NS_ENSURE_ARG_POINTER(aPath);
97 *aPath = mPath;
98 NS_IF_ADDREF(*aPath);
99 return NS_OK;
102 NS_IMETHODIMP
103 nsJVMConfig::GetMozillaPluginPath(nsIFile** aMozillaPluginPath)
105 NS_ENSURE_ARG_POINTER(aMozillaPluginPath);
107 *aMozillaPluginPath = mMozillaPluginPath;
108 NS_IF_ADDREF(*aMozillaPluginPath);
109 return NS_OK;
112 /* readonly attribute AString description; */
113 NS_IMETHODIMP
114 nsJVMConfig::GetDescription(nsAString & aDescription)
116 aDescription = mDescription;
117 return NS_OK;