xpcom/reflect/xptcall/src/xptcprivate.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/reflect/xptcall/src/xptcprivate.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,67 @@
     1.4 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/* All the xptcall private declarations - only include locally. */
    1.10 +
    1.11 +#ifndef xptcprivate_h___
    1.12 +#define xptcprivate_h___
    1.13 +
    1.14 +#include "xptcall.h"
    1.15 +#include "nsAutoPtr.h"
    1.16 +#include "mozilla/Attributes.h"
    1.17 +
    1.18 +class xptiInterfaceEntry;
    1.19 +
    1.20 +#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
    1.21 +#define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
    1.22 +#else
    1.23 +#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;
    1.24 +#endif
    1.25 +
    1.26 +#define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n() = 0;
    1.27 +
    1.28 +class nsIXPTCStubBase : public nsISupports
    1.29 +{
    1.30 +public:
    1.31 +#include "xptcstubsdef.inc"
    1.32 +};
    1.33 +
    1.34 +#undef STUB_ENTRY
    1.35 +#undef SENTINEL_ENTRY
    1.36 +
    1.37 +#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
    1.38 +#define STUB_ENTRY(n) NS_IMETHOD Stub##n();
    1.39 +#else
    1.40 +#define STUB_ENTRY(n) NS_IMETHOD Stub##n(uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t,uint64_t);
    1.41 +#endif
    1.42 +
    1.43 +#define SENTINEL_ENTRY(n) NS_IMETHOD Sentinel##n();
    1.44 +
    1.45 +class nsXPTCStubBase MOZ_FINAL : public nsIXPTCStubBase
    1.46 +{
    1.47 +public:
    1.48 +    NS_DECL_ISUPPORTS_INHERITED
    1.49 +
    1.50 +#include "xptcstubsdef.inc"
    1.51 +
    1.52 +    nsXPTCStubBase(nsIXPTCProxy* aOuter, xptiInterfaceEntry *aEntry) :
    1.53 +        mOuter(aOuter), mEntry(aEntry) { }
    1.54 +
    1.55 +    nsIXPTCProxy*          mOuter;
    1.56 +    xptiInterfaceEntry*    mEntry;
    1.57 +
    1.58 +    ~nsXPTCStubBase() { }
    1.59 +};
    1.60 +
    1.61 +#undef STUB_ENTRY
    1.62 +#undef SENTINEL_ENTRY
    1.63 +
    1.64 +#if defined(__clang__) || defined(__GNUC__)
    1.65 +#define ATTRIBUTE_USED __attribute__ ((__used__))
    1.66 +#else
    1.67 +#define ATTRIBUTE_USED
    1.68 +#endif
    1.69 +
    1.70 +#endif /* xptcprivate_h___ */

mercurial