xpcom/reflect/xptcall/src/xptcprivate.h

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:7784a4157e44
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 class xptiInterfaceEntry;
16
17 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
18 #define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
19 #else
20 #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;
21 #endif
22
23 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0;
24
25 class nsIXPTCStubBase : public nsISupports
26 {
27 public:
28 #include "xptcstubsdef.inc"
29 };
30
31 #undef STUB_ENTRY
32 #undef SENTINEL_ENTRY
33
34 #if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
35 #define STUB_ENTRY(n) NS_IMETHOD Stub##n();
36 #else
37 #define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t);
38 #endif
39
40 #define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n();
41
42 class nsXPTCStubBase MOZ_FINAL : public nsIXPTCStubBase
43 {
44 public:
45 NS_DECL_ISUPPORTS_INHERITED
46
47 #include "xptcstubsdef.inc"
48
49 nsXPTCStubBase(nsIXPTCProxy* aOuter, xptiInterfaceEntry *aEntry) :
50 mOuter(aOuter), mEntry(aEntry) { }
51
52 nsIXPTCProxy* mOuter;
53 xptiInterfaceEntry* mEntry;
54
55 ~nsXPTCStubBase() { }
56 };
57
58 #undef STUB_ENTRY
59 #undef SENTINEL_ENTRY
60
61 #if defined(__clang__) || defined(__GNUC__)
62 #define ATTRIBUTE_USED __attribute__ ((__used__))
63 #else
64 #define ATTRIBUTE_USED
65 #endif
66
67 #endif /* xptcprivate_h___ */

mercurial