2014-06-30 19:39:45 +04: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-19 04:56:02 +04: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"
|
2017-10-20 18:46:40 +03:00
|
|
|
#include "nsString.h"
|
2014-06-19 04:56:02 +04:00
|
|
|
|
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType)
|
|
|
|
GenericClassInfo::AddRef() { return 2; }
|
|
|
|
|
|
|
|
NS_IMETHODIMP_(MozExternalRefCountType)
|
|
|
|
GenericClassInfo::Release() { return 1; }
|
|
|
|
|
|
|
|
NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo)
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-27 05:35:39 +04:00
|
|
|
GenericClassInfo::GetInterfaces(uint32_t* aCount, nsIID*** aArray) {
|
|
|
|
return mData->getinterfaces(aCount, aArray);
|
2014-06-19 04:56:02 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2015-03-29 17:52:54 +03:00
|
|
|
GenericClassInfo::GetScriptableHelper(nsIXPCScriptable** aHelper) {
|
|
|
|
if (mData->getscriptablehelper) {
|
|
|
|
return mData->getscriptablehelper(aHelper);
|
2014-06-27 05:35:39 +04:00
|
|
|
}
|
2014-06-19 04:56:02 +04:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2017-10-18 05:17:26 +03:00
|
|
|
GenericClassInfo::GetContractID(nsACString& aContractID) {
|
2014-06-19 04:56:02 +04:00
|
|
|
NS_ERROR("GetContractID not implemented");
|
2017-10-18 05:17:26 +03:00
|
|
|
aContractID.SetIsVoid(true);
|
2014-06-19 04:56:02 +04:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2017-10-18 05:17:26 +03:00
|
|
|
GenericClassInfo::GetClassDescription(nsACString& aDescription) {
|
|
|
|
aDescription.SetIsVoid(true);
|
2014-06-19 04:56:02 +04:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-27 05:35:39 +04:00
|
|
|
GenericClassInfo::GetClassID(nsCID** aClassID) {
|
2014-06-19 04:56:02 +04:00
|
|
|
NS_ERROR("GetClassID not implemented");
|
2014-06-27 05:35:39 +04:00
|
|
|
*aClassID = nullptr;
|
2014-06-19 04:56:02 +04:00
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
2014-06-27 05:35:39 +04:00
|
|
|
GenericClassInfo::GetFlags(uint32_t* aFlags) {
|
|
|
|
*aFlags = mData->flags;
|
2014-06-19 04:56:02 +04:00
|
|
|
return NS_OK;
|
|
|
|
}
|
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) {
|
|
|
|
*aClassIDNoAlloc = mData->cid;
|
|
|
|
return NS_OK;
|
|
|
|
}
|