1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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/. */
6 /* All the xptcall private declarations - only include locally. */
8 #ifndef xptcprivate_h___
9 #define xptcprivate_h___
12 #include "mozilla/Attributes.h"
14 #if !defined(__ia64) || \
15 (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
16 # define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
18 # define STUB_ENTRY(n) \
19 NS_IMETHOD Stub##n(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, \
20 uint64_t, uint64_t, uint64_t) = 0;
23 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0;
25 class nsIXPTCStubBase
: public nsISupports
{
27 #include "xptcstubsdef.inc"
33 #if !defined(__ia64) || \
34 (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
35 # define STUB_ENTRY(n) NS_IMETHOD Stub##n() override;
37 # define STUB_ENTRY(n) \
38 NS_IMETHOD Stub##n(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t, \
39 uint64_t, uint64_t, uint64_t) override;
42 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() override;
44 class nsXPTCStubBase final
: public nsIXPTCStubBase
{
46 NS_DECL_ISUPPORTS_INHERITED
48 #include "xptcstubsdef.inc"
50 nsXPTCStubBase(nsIXPTCProxy
* aOuter
, const nsXPTInterfaceInfo
* aEntry
)
51 : mOuter(aOuter
), mEntry(aEntry
) {}
54 const nsXPTInterfaceInfo
* mEntry
;
56 ~nsXPTCStubBase() = default;
62 #if defined(__clang__) || defined(__GNUC__)
63 # define ATTRIBUTE_USED __attribute__((__used__))
65 # define ATTRIBUTE_USED
68 #endif /* xptcprivate_h___ */