/src/mozilla-central/xpcom/reflect/xptcall/xptcprivate.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
3 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | | |
6 | | /* All the xptcall private declarations - only include locally. */ |
7 | | |
8 | | #ifndef xptcprivate_h___ |
9 | | #define xptcprivate_h___ |
10 | | |
11 | | #include "xptcall.h" |
12 | | #include "nsAutoPtr.h" |
13 | | #include "mozilla/Attributes.h" |
14 | | |
15 | | #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__)) |
16 | | #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0; |
17 | | #else |
18 | | #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t) = 0; |
19 | | #endif |
20 | | |
21 | | #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0; |
22 | | |
23 | | class nsIXPTCStubBase : public nsISupports |
24 | | { |
25 | | public: |
26 | | #include "xptcstubsdef.inc" |
27 | | }; |
28 | | |
29 | | #undef STUB_ENTRY |
30 | | #undef SENTINEL_ENTRY |
31 | | |
32 | | #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__)) |
33 | | #define STUB_ENTRY(n) NS_IMETHOD Stub##n() override; |
34 | | #else |
35 | | #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t) override; |
36 | | #endif |
37 | | |
38 | | #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() override; |
39 | | |
40 | | class nsXPTCStubBase final : public nsIXPTCStubBase |
41 | | { |
42 | | public: |
43 | | NS_DECL_ISUPPORTS_INHERITED |
44 | | |
45 | | #include "xptcstubsdef.inc" |
46 | | |
47 | | nsXPTCStubBase(nsIXPTCProxy* aOuter, const nsXPTInterfaceInfo *aEntry) |
48 | 3 | : mOuter(aOuter), mEntry(aEntry) {} |
49 | | |
50 | | nsIXPTCProxy* mOuter; |
51 | | const nsXPTInterfaceInfo* mEntry; |
52 | | |
53 | 0 | ~nsXPTCStubBase() {} |
54 | | }; |
55 | | |
56 | | #undef STUB_ENTRY |
57 | | #undef SENTINEL_ENTRY |
58 | | |
59 | | #if defined(__clang__) || defined(__GNUC__) |
60 | | #define ATTRIBUTE_USED __attribute__ ((__used__)) |
61 | | #else |
62 | | #define ATTRIBUTE_USED |
63 | | #endif |
64 | | |
65 | | #endif /* xptcprivate_h___ */ |