VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/vboxdeps.cpp@ 13057

最後變更 在這個檔案從13057是 11863,由 vboxsync 提交於 16 年 前

xpcom18a4: Yet another shot at the vtable for nsXPTCStubBase (ZTV14nsXPTCStubBase).

  • 屬性 svn:keywords 設為 Id
檔案大小: 1.4 KB
 
1/* The usual story: drag stuff from the libraries into the link. */
2
3
4#include <plstr.h>
5#include <prio.h>
6#include <nsDeque.h>
7#include <nsHashSets.h>
8#include <nsIPipe.h>
9#include <xptcall.h>
10#include "xpcom/proxy/src/nsProxyEventPrivate.h"
11
12uintptr_t deps[] =
13{
14 (uintptr_t)PL_strncpy,
15 (uintptr_t)PL_strchr,
16 (uintptr_t)PL_strncpyz,
17 (uintptr_t)PL_HashString,
18 (uintptr_t)PR_DestroyPollableEvent,
19 (uintptr_t)NS_NewPipe2,
20 0
21};
22
23class foobardep : public nsXPTCStubBase
24{
25public:
26 NS_IMETHOD_(nsrefcnt) AddRef(void)
27 {
28 return 1;
29 }
30
31 NS_IMETHOD_(nsrefcnt) Release(void)
32 {
33 return 0;
34 }
35
36 NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo** info)
37 {
38 (void)info;
39 return 0;
40 }
41
42 // call this method and return result
43 NS_IMETHOD CallMethod(PRUint16 methodIndex, const nsXPTMethodInfo* info, nsXPTCMiniVariant* params)
44 {
45 (void)methodIndex;
46 (void)info;
47 (void)params;
48 return 0;
49 }
50
51};
52
53
54
55void foodep(void)
56{
57 nsVoidHashSetSuper *a = new nsVoidHashSetSuper();
58 a->Init(123);
59 nsDeque *b = new nsDeque((nsDequeFunctor*)0);
60
61 //nsXPTCStubBase
62 nsProxyEventObject *c = new nsProxyEventObject();
63 c->Release();
64
65 foobardep *d = new foobardep();
66 nsXPTCStubBase *e = d;
67 e->Release();
68}
69
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette