2014-06-30 08:39:45 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-06-18 17:56:02 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsIClassInfoImpl.h"
|
|
|
|
#include "nsIProgrammingLanguage.h"
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType)
|
|
|
|
GenericClassInfo::AddRef()
|
|
|
|
{
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType)
|
|
|
|
GenericClassInfo::Release()
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetInterfaces(uint32_t* aCount, nsIID*** aArray)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
2014-06-26 18:35:39 -07:00
|
|
|
return mData->getinterfaces(aCount, aArray);
|
2014-06-18 17:56:02 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetHelperForLanguage(uint32_t aLanguage,
|
|
|
|
nsISupports** aHelper)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
2014-06-26 18:35:39 -07:00
|
|
|
if (mData->getlanguagehelper) {
|
|
|
|
return mData->getlanguagehelper(aLanguage, aHelper);
|
|
|
|
}
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetContractID(char** aContractID)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
|
|
|
NS_ERROR("GetContractID not implemented");
|
2014-06-26 18:35:39 -07:00
|
|
|
*aContractID = nullptr;
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetClassDescription(char** aDescription)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
2014-06-26 18:35:39 -07:00
|
|
|
*aDescription = nullptr;
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetClassID(nsCID** aClassID)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
|
|
|
NS_ERROR("GetClassID not implemented");
|
2014-06-26 18:35:39 -07:00
|
|
|
*aClassID = nullptr;
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetImplementationLanguage(uint32_t* aLanguage)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
2014-06-26 18:35:39 -07:00
|
|
|
*aLanguage = nsIProgrammingLanguage::CPLUSPLUS;
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-26 18:35:39 -07:00
|
|
|
GenericClassInfo::GetFlags(uint32_t* aFlags)
|
2014-06-18 17:56:02 -07:00
|
|
|
{
|
2014-06-26 18:35:39 -07:00
|
|
|
*aFlags = mData->flags;
|
2014-06-18 17:56:02 -07:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
|
|
|
|
{
|
|
|
|
*aClassIDNoAlloc = mData->cid;
|
|
|
|
return NS_OK;
|
|
|
|
}
|