/src/mozilla-central/xpcom/base/nsClassInfoImpl.cpp
Line | Count | Source (jump to first uncovered line) |
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/. */ |
6 | | |
7 | | #include "nsIClassInfoImpl.h" |
8 | | #include "nsString.h" |
9 | | |
10 | | NS_IMETHODIMP_(MozExternalRefCountType) |
11 | | GenericClassInfo::AddRef() |
12 | 20 | { |
13 | 20 | return 2; |
14 | 20 | } |
15 | | |
16 | | NS_IMETHODIMP_(MozExternalRefCountType) |
17 | | GenericClassInfo::Release() |
18 | 14 | { |
19 | 14 | return 1; |
20 | 14 | } |
21 | | |
22 | | NS_IMPL_QUERY_INTERFACE(GenericClassInfo, nsIClassInfo) |
23 | | |
24 | | NS_IMETHODIMP |
25 | | GenericClassInfo::GetInterfaces(uint32_t* aCount, nsIID*** aArray) |
26 | 6 | { |
27 | 6 | return mData->getinterfaces(aCount, aArray); |
28 | 6 | } |
29 | | |
30 | | NS_IMETHODIMP |
31 | | GenericClassInfo::GetScriptableHelper(nsIXPCScriptable** aHelper) |
32 | 14 | { |
33 | 14 | if (mData->getscriptablehelper) { |
34 | 9 | return mData->getscriptablehelper(aHelper); |
35 | 9 | } |
36 | 5 | return NS_ERROR_NOT_IMPLEMENTED; |
37 | 5 | } |
38 | | |
39 | | NS_IMETHODIMP |
40 | | GenericClassInfo::GetContractID(nsACString& aContractID) |
41 | 0 | { |
42 | 0 | NS_ERROR("GetContractID not implemented"); |
43 | 0 | aContractID.SetIsVoid(true); |
44 | 0 | return NS_ERROR_NOT_IMPLEMENTED; |
45 | 0 | } |
46 | | |
47 | | NS_IMETHODIMP |
48 | | GenericClassInfo::GetClassDescription(nsACString& aDescription) |
49 | 0 | { |
50 | 0 | aDescription.SetIsVoid(true); |
51 | 0 | return NS_ERROR_NOT_IMPLEMENTED; |
52 | 0 | } |
53 | | |
54 | | NS_IMETHODIMP |
55 | | GenericClassInfo::GetClassID(nsCID** aClassID) |
56 | 0 | { |
57 | 0 | NS_ERROR("GetClassID not implemented"); |
58 | 0 | *aClassID = nullptr; |
59 | 0 | return NS_ERROR_NOT_IMPLEMENTED; |
60 | 0 | } |
61 | | |
62 | | NS_IMETHODIMP |
63 | | GenericClassInfo::GetFlags(uint32_t* aFlags) |
64 | 0 | { |
65 | 0 | *aFlags = mData->flags; |
66 | 0 | return NS_OK; |
67 | 0 | } |
68 | | |
69 | | NS_IMETHODIMP |
70 | | GenericClassInfo::GetClassIDNoAlloc(nsCID* aClassIDNoAlloc) |
71 | 0 | { |
72 | 0 | *aClassIDNoAlloc = mData->cid; |
73 | 0 | return NS_OK; |
74 | 0 | } |