Bumping manifests a=b2g-bump
[gecko.git] / xpcom / glue / nsClassInfoImpl.cpp
blob0d49c720f6f81d7fb6159ce477765b1ddcbb2d18
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()
13 return 2;
16 NS_IMETHODIMP_(MozExternalRefCountType)
17 GenericClassInfo::Release()
19 return 1;
22 NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo)
24 NS_IMETHODIMP
25 GenericClassInfo::GetInterfaces(uint32_t* aCount, nsIID*** aArray)
27 return mData->getinterfaces(aCount, aArray);
30 NS_IMETHODIMP
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;
40 NS_IMETHODIMP
41 GenericClassInfo::GetContractID(char** aContractID)
43 NS_ERROR("GetContractID not implemented");
44 *aContractID = nullptr;
45 return NS_ERROR_NOT_IMPLEMENTED;
48 NS_IMETHODIMP
49 GenericClassInfo::GetClassDescription(char** aDescription)
51 *aDescription = nullptr;
52 return NS_ERROR_NOT_IMPLEMENTED;
55 NS_IMETHODIMP
56 GenericClassInfo::GetClassID(nsCID** aClassID)
58 NS_ERROR("GetClassID not implemented");
59 *aClassID = nullptr;
60 return NS_ERROR_NOT_IMPLEMENTED;
63 NS_IMETHODIMP
64 GenericClassInfo::GetImplementationLanguage(uint32_t* aLanguage)
66 *aLanguage = nsIProgrammingLanguage::CPLUSPLUS;
67 return NS_OK;
70 NS_IMETHODIMP
71 GenericClassInfo::GetFlags(uint32_t* aFlags)
73 *aFlags = mData->flags;
74 return NS_OK;
77 NS_IMETHODIMP
78 GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc)
80 *aClassIDNoAlloc = mData->cid;
81 return NS_OK;