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"
8 #include "nsIProgrammingLanguage.h"
10 NS_IMETHODIMP_(MozExternalRefCountType
)
11 GenericClassInfo::AddRef()
16 NS_IMETHODIMP_(MozExternalRefCountType
)
17 GenericClassInfo::Release()
22 NS_IMPL_QUERY_INTERFACE(GenericClassInfo
, nsIClassInfo
)
25 GenericClassInfo::GetInterfaces(uint32_t* aCount
, nsIID
*** aArray
)
27 return mData
->getinterfaces(aCount
, aArray
);
31 GenericClassInfo::GetHelperForLanguage(uint32_t aLanguage
,
32 nsISupports
** aHelper
)
34 if (mData
->getlanguagehelper
) {
35 return mData
->getlanguagehelper(aLanguage
, aHelper
);
37 return NS_ERROR_NOT_IMPLEMENTED
;
41 GenericClassInfo::GetContractID(char** aContractID
)
43 NS_ERROR("GetContractID not implemented");
44 *aContractID
= nullptr;
45 return NS_ERROR_NOT_IMPLEMENTED
;
49 GenericClassInfo::GetClassDescription(char** aDescription
)
51 *aDescription
= nullptr;
52 return NS_ERROR_NOT_IMPLEMENTED
;
56 GenericClassInfo::GetClassID(nsCID
** aClassID
)
58 NS_ERROR("GetClassID not implemented");
60 return NS_ERROR_NOT_IMPLEMENTED
;
64 GenericClassInfo::GetImplementationLanguage(uint32_t* aLanguage
)
66 *aLanguage
= nsIProgrammingLanguage::CPLUSPLUS
;
71 GenericClassInfo::GetFlags(uint32_t* aFlags
)
73 *aFlags
= mData
->flags
;
78 GenericClassInfo::GetClassIDNoAlloc(nsCID
* aClassIDNoAlloc
)
80 *aClassIDNoAlloc
= mData
->cid
;