2013-07-08 13:33:15 -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/. */
|
|
|
|
|
2010-06-10 11:11:11 -07:00
|
|
|
#include "nsIClassInfoImpl.h"
|
|
|
|
#include "nsIProgrammingLanguage.h"
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(nsrefcnt)
|
|
|
|
GenericClassInfo::AddRef()
|
|
|
|
{
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(nsrefcnt)
|
|
|
|
GenericClassInfo::Release()
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMPL_QUERY_INTERFACE1(GenericClassInfo, nsIClassInfo)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
GenericClassInfo::GetInterfaces(uint32_t* countp, nsIID*** array)
|
2010-06-10 11:11:11 -07:00
|
|
|
{
|
|
|
|
return mData->getinterfaces(countp, array);
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
GenericClassInfo::GetHelperForLanguage(uint32_t language, nsISupports** helper)
|
2010-06-10 11:11:11 -07:00
|
|
|
{
|
|
|
|
if (mData->getlanguagehelper)
|
|
|
|
return mData->getlanguagehelper(language, helper);
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetContractID(char** contractid)
|
|
|
|
{
|
|
|
|
NS_ERROR("GetContractID not implemented");
|
2013-10-10 13:41:39 -07:00
|
|
|
*contractid = nullptr;
|
2010-06-10 11:11:11 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetClassDescription(char** description)
|
|
|
|
{
|
2013-10-10 13:41:39 -07:00
|
|
|
*description = nullptr;
|
2010-06-10 11:11:11 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetClassID(nsCID** classid)
|
|
|
|
{
|
|
|
|
NS_ERROR("GetClassID not implemented");
|
2013-10-10 13:41:39 -07:00
|
|
|
*classid = nullptr;
|
2010-06-10 11:11:11 -07:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
GenericClassInfo::GetImplementationLanguage(uint32_t* language)
|
2010-06-10 11:11:11 -07:00
|
|
|
{
|
|
|
|
*language = nsIProgrammingLanguage::CPLUSPLUS;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2012-08-22 08:56:38 -07:00
|
|
|
GenericClassInfo::GetFlags(uint32_t* flags)
|
2010-06-10 11:11:11 -07:00
|
|
|
{
|
|
|
|
*flags = mData->flags;
|
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
|
|
|
|
{
|
2010-06-22 09:59:57 -07:00
|
|
|
*aClassIDNoAlloc = mData->cid;
|
|
|
|
return NS_OK;
|
2010-06-10 11:11:11 -07:00
|
|
|
}
|