Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsIProxyObjectManager.idl File Reference
import "nsISupports.idl";
#include "nsProxyEvent.h"

Go to the source code of this file.

Classes

interface  nsIProxyObjectManager
 See http://www.mozilla.org/projects/xpcom/Proxies.html. More...
class  nsProxyObject
class  nsProxyObjectCallInfo

Defines

#define NS_XPCOMPROXY_CONTRACTID   "@mozilla.org/xpcomproxy;1"
#define NS_XPCOMPROXY_CLASSNAME   "XPCom Proxy"
#define NS_PROXYEVENT_MANAGER_CID

Functions

NS_COM nsresult NS_GetProxyForObject (nsIEventQueue *destQueue, REFNSIID aIID, nsISupports *aObj, PRInt32 proxyType, void **aProxyObject)
 Helper function for code that already has a link-time dependency on libxpcom and needs to get proxies in a bunch of different places.

Define Documentation

Value:
{ 0xeea90d41,                                                                 \
  0xb059,                                                                     \
  0x11d2,                                                         \
 {0x91, 0x5e, 0xc1, 0x2b, 0x69, 0x6c, 0x93, 0x33}\
}

Definition at line 90 of file nsIProxyObjectManager.idl.

#define NS_XPCOMPROXY_CLASSNAME   "XPCom Proxy"

Definition at line 88 of file nsIProxyObjectManager.idl.

#define NS_XPCOMPROXY_CONTRACTID   "@mozilla.org/xpcomproxy;1"

Definition at line 87 of file nsIProxyObjectManager.idl.


Function Documentation

NS_COM nsresult NS_GetProxyForObject ( nsIEventQueue destQueue,
REFNSIID  aIID,
nsISupports *  aObj,
PRInt32  proxyType,
void **  aProxyObject 
)

Helper function for code that already has a link-time dependency on libxpcom and needs to get proxies in a bunch of different places.

This way, the caller isn't forced to get the proxy object manager themselves every single time, thus making the calling code more readable.

Definition at line 304 of file nsProxyObjectManager.cpp.

{
    static NS_DEFINE_CID(proxyObjMgrCID, NS_PROXYEVENT_MANAGER_CID);

    nsresult rv;    // temp for return value

    // get the proxy object manager
    //
    nsCOMPtr<nsIProxyObjectManager> proxyObjMgr = 
        do_GetService(proxyObjMgrCID, &rv);

    if (NS_FAILED(rv))
        return NS_ERROR_FAILURE;
    
    // and try to get the proxy object
    //
    return proxyObjMgr->GetProxyForObject(destQueue, aIID, aObj,
                                          proxyType, aProxyObject);
}

Here is the call graph for this function:

Here is the caller graph for this function: