1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsIClassInfoImpl.h"
10 NS_IMETHODIMP_(MozExternalRefCountType
)
11 GenericClassInfo::AddRef() { return 2; }
13 NS_IMETHODIMP_(MozExternalRefCountType
)
14 GenericClassInfo::Release() { return 1; }
16 NS_IMPL_QUERY_INTERFACE(GenericClassInfo
, nsIClassInfo
)
19 GenericClassInfo::GetInterfaces(nsTArray
<nsIID
>& aArray
) {
20 return mData
->getinterfaces(aArray
);
24 GenericClassInfo::GetScriptableHelper(nsIXPCScriptable
** aHelper
) {
25 if (mData
->getscriptablehelper
) {
26 return mData
->getscriptablehelper(aHelper
);
28 return NS_ERROR_NOT_IMPLEMENTED
;
32 GenericClassInfo::GetContractID(nsACString
& aContractID
) {
33 NS_ERROR("GetContractID not implemented");
34 aContractID
.SetIsVoid(true);
35 return NS_ERROR_NOT_IMPLEMENTED
;
39 GenericClassInfo::GetClassDescription(nsACString
& aDescription
) {
40 aDescription
.SetIsVoid(true);
41 return NS_ERROR_NOT_IMPLEMENTED
;
45 GenericClassInfo::GetClassID(nsCID
** aClassID
) {
46 NS_ERROR("GetClassID not implemented");
48 return NS_ERROR_NOT_IMPLEMENTED
;
52 GenericClassInfo::GetFlags(uint32_t* aFlags
) {
53 *aFlags
= mData
->flags
;
58 GenericClassInfo::GetClassIDNoAlloc(nsCID
* aClassIDNoAlloc
) {
59 *aClassIDNoAlloc
= mData
->cid
;