michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIClassInfoImpl.h" michael@0: #include "nsIProgrammingLanguage.h" michael@0: michael@0: NS_IMETHODIMP_(MozExternalRefCountType) michael@0: GenericClassInfo::AddRef() michael@0: { michael@0: return 2; michael@0: } michael@0: michael@0: NS_IMETHODIMP_(MozExternalRefCountType) michael@0: GenericClassInfo::Release() michael@0: { michael@0: return 1; michael@0: } michael@0: michael@0: NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo) michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetInterfaces(uint32_t* countp, nsIID*** array) michael@0: { michael@0: return mData->getinterfaces(countp, array); michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetHelperForLanguage(uint32_t language, nsISupports** helper) michael@0: { michael@0: if (mData->getlanguagehelper) michael@0: return mData->getlanguagehelper(language, helper); michael@0: return NS_ERROR_NOT_IMPLEMENTED; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetContractID(char** contractid) michael@0: { michael@0: NS_ERROR("GetContractID not implemented"); michael@0: *contractid = nullptr; michael@0: return NS_ERROR_NOT_IMPLEMENTED; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetClassDescription(char** description) michael@0: { michael@0: *description = nullptr; michael@0: return NS_ERROR_NOT_IMPLEMENTED; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetClassID(nsCID** classid) michael@0: { michael@0: NS_ERROR("GetClassID not implemented"); michael@0: *classid = nullptr; michael@0: return NS_ERROR_NOT_IMPLEMENTED; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetImplementationLanguage(uint32_t* language) michael@0: { michael@0: *language = nsIProgrammingLanguage::CPLUSPLUS; michael@0: return NS_OK; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetFlags(uint32_t* flags) michael@0: { michael@0: *flags = mData->flags; michael@0: return NS_OK; michael@0: } michael@0: michael@0: NS_IMETHODIMP michael@0: GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) michael@0: { michael@0: *aClassIDNoAlloc = mData->cid; michael@0: return NS_OK; michael@0: }