PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/mozilla/mozilla/dist/include/xpcom/nsIProxyObjectManager.h

http://kmbrasil.codeplex.com
C++ Header | 147 lines | 74 code | 31 blank | 42 comment | 0 complexity | dd5b7bb0553428b25bce5a3defc9ebb0 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM h:/projects/mozilla/mozilla/xpcom/proxy/public/nsIProxyObjectManager.idl
  3. */
  4. #ifndef __gen_nsIProxyObjectManager_h__
  5. #define __gen_nsIProxyObjectManager_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. class nsIEventQueue; /* forward declaration */
  14. /* starting interface: nsIProxyObjectManager */
  15. #define NS_IPROXYOBJECTMANAGER_IID_STR "eea90d43-b059-11d2-915e-c12b696c9333"
  16. #define NS_IPROXYOBJECTMANAGER_IID \
  17. {0xeea90d43, 0xb059, 0x11d2, \
  18. { 0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33 }}
  19. /**
  20. * See http://www.mozilla.org/projects/xpcom/Proxies.html
  21. */
  22. class NS_NO_VTABLE nsIProxyObjectManager : public nsISupports {
  23. public:
  24. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYOBJECTMANAGER_IID)
  25. /**
  26. * Constants for proxyType
  27. */
  28. /**
  29. * Synchronous: Block until result available, like function call.
  30. */
  31. enum { INVOKE_SYNC = 1 };
  32. /**
  33. * Asynchronous: Return without waiting for result.
  34. * (Warning: do not pass &pointers into stack when using this flag.)
  35. */
  36. enum { INVOKE_ASYNC = 2 };
  37. /**
  38. * Always create proxy even if for same thread as current thread.
  39. */
  40. enum { FORCE_PROXY_CREATION = 4 };
  41. /* void getProxyForObject (in nsIEventQueue destQueue, in nsIIDRef iid, in nsISupports object, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  42. NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) = 0;
  43. /* void getProxy (in nsIEventQueue destQueue, in nsIIDRef cid, in nsISupports aOuter, in nsIIDRef iid, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  44. NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) = 0;
  45. };
  46. /* Use this macro when declaring classes that implement this interface. */
  47. #define NS_DECL_NSIPROXYOBJECTMANAGER \
  48. NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result); \
  49. NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result);
  50. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  51. #define NS_FORWARD_NSIPROXYOBJECTMANAGER(_to) \
  52. NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) { return _to GetProxyForObject(destQueue, iid, object, proxyType, result); } \
  53. NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) { return _to GetProxy(destQueue, cid, aOuter, iid, proxyType, result); }
  54. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  55. #define NS_FORWARD_SAFE_NSIPROXYOBJECTMANAGER(_to) \
  56. NS_IMETHOD GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyForObject(destQueue, iid, object, proxyType, result); } \
  57. NS_IMETHOD GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxy(destQueue, cid, aOuter, iid, proxyType, result); }
  58. #if 0
  59. /* Use the code below as a template for the implementation class for this interface. */
  60. /* Header file */
  61. class nsProxyObjectManager : public nsIProxyObjectManager
  62. {
  63. public:
  64. NS_DECL_ISUPPORTS
  65. NS_DECL_NSIPROXYOBJECTMANAGER
  66. nsProxyObjectManager();
  67. private:
  68. ~nsProxyObjectManager();
  69. protected:
  70. /* additional members */
  71. };
  72. /* Implementation file */
  73. NS_IMPL_ISUPPORTS1(nsProxyObjectManager, nsIProxyObjectManager)
  74. nsProxyObjectManager::nsProxyObjectManager()
  75. {
  76. /* member initializers and constructor code */
  77. }
  78. nsProxyObjectManager::~nsProxyObjectManager()
  79. {
  80. /* destructor code */
  81. }
  82. /* void getProxyForObject (in nsIEventQueue destQueue, in nsIIDRef iid, in nsISupports object, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  83. NS_IMETHODIMP nsProxyObjectManager::GetProxyForObject(nsIEventQueue *destQueue, const nsIID & iid, nsISupports *object, PRInt32 proxyType, void * *result)
  84. {
  85. return NS_ERROR_NOT_IMPLEMENTED;
  86. }
  87. /* void getProxy (in nsIEventQueue destQueue, in nsIIDRef cid, in nsISupports aOuter, in nsIIDRef iid, in PRInt32 proxyType, [iid_is (iid), retval] out nsQIResult result); */
  88. NS_IMETHODIMP nsProxyObjectManager::GetProxy(nsIEventQueue *destQueue, const nsIID & cid, nsISupports *aOuter, const nsIID & iid, PRInt32 proxyType, void * *result)
  89. {
  90. return NS_ERROR_NOT_IMPLEMENTED;
  91. }
  92. /* End of implementation class template. */
  93. #endif
  94. #include "nsProxyEvent.h"
  95. #define NS_XPCOMPROXY_CONTRACTID "@mozilla.org/xpcomproxy;1"
  96. #define NS_XPCOMPROXY_CLASSNAME "XPCom Proxy"
  97. #define NS_PROXYEVENT_MANAGER_CID \
  98. { 0xeea90d41, \
  99. 0xb059, \
  100. 0x11d2, \
  101. {0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33}\
  102. }
  103. /**
  104. * Helper function for code that already has a link-time dependency on
  105. * libxpcom and needs to get proxies in a bunch of different places.
  106. * This way, the caller isn't forced to get the proxy object manager
  107. * themselves every single time, thus making the calling code more
  108. * readable.
  109. */
  110. extern NS_COM nsresult
  111. NS_GetProxyForObject(nsIEventQueue *destQueue,
  112. REFNSIID aIID,
  113. nsISupports* aObj,
  114. PRInt32 proxyType,
  115. void** aProxyObject);
  116. #endif /* __gen_nsIProxyObjectManager_h__ */