Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsProxyObjectManager.cpp File Reference
#include "nsProxyEvent.h"
#include "nsIProxyObjectManager.h"
#include "nsProxyEventPrivate.h"
#include "nsIProxyCreateInstance.h"
#include "nsIComponentManager.h"
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"
#include "nsIEventQueueService.h"
#include "nsIThread.h"

Go to the source code of this file.

Classes

class  nsProxyCreateInstance

Functions

static NS_DEFINE_CID (kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID)
static PRBool PurgeProxyClasses (nsHashKey *aKey, void *aData, void *closure)
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.

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:

static PRBool PurgeProxyClasses ( nsHashKey *  aKey,
void aData,
void closure 
) [static]

Definition at line 121 of file nsProxyObjectManager.cpp.

Here is the caller graph for this function: