Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions
nsServiceManagerUtils.h File Reference
#include "nsIServiceManager.h"
#include "nsCOMPtr.h"

Go to the source code of this file.

Classes

class  nsGetServiceFromCategory

Functions

const nsGetServiceByCID do_GetService (const nsCID &aCID)
const nsGetServiceByCIDWithError do_GetService (const nsCID &aCID, nsresult *error)
const nsGetServiceByContractID do_GetService (const char *aContractID)
const
nsGetServiceByContractIDWithError 
do_GetService (const char *aContractID, nsresult *error)
const nsGetServiceFromCategory do_GetServiceFromCategory (const char *category, const char *entry, nsresult *error=0)
NS_COM_GLUE nsresult CallGetService (const nsCID &aClass, const nsIID &aIID, void **aResult)
NS_COM_GLUE nsresult CallGetService (const char *aContractID, const nsIID &aIID, void **aResult)
template<class DestinationType >
nsresult CallGetService (const nsCID &aClass, DestinationType **aDestination)
template<class DestinationType >
nsresult CallGetService (const char *aContractID, DestinationType **aDestination)

Function Documentation

NS_COM_GLUE nsresult CallGetService ( const nsCID aClass,
const nsIID aIID,
void **  aResult 
)

Definition at line 54 of file nsComponentManagerUtils.cpp.

{
    nsCOMPtr<nsIServiceManager> servMgr;
    nsresult status = NS_GetServiceManager(getter_AddRefs(servMgr));
    if (servMgr)
        status = servMgr->GetService(aCID, aIID, aResult);
    return status;
}

Here is the call graph for this function:

NS_COM_GLUE nsresult CallGetService ( const char *  aContractID,
const nsIID aIID,
void **  aResult 
)

Definition at line 64 of file nsComponentManagerUtils.cpp.

{
    nsCOMPtr<nsIServiceManager> servMgr;
    nsresult status = NS_GetServiceManager(getter_AddRefs(servMgr));
    if (servMgr)
        status = servMgr->GetServiceByContractID(aContractID, aIID, aResult);
    return status;
}

Here is the call graph for this function:

template<class DestinationType >
nsresult CallGetService ( const nsCID aClass,
DestinationType **  aDestination 
) [inline]

Definition at line 109 of file nsServiceManagerUtils.h.

{
    NS_PRECONDITION(aDestination, "null parameter");
    
    return CallGetService(aClass,
                          NS_GET_IID(DestinationType),
                          NS_REINTERPRET_CAST(void**, aDestination));
}

Here is the call graph for this function:

template<class DestinationType >
nsresult CallGetService ( const char *  aContractID,
DestinationType **  aDestination 
) [inline]

Definition at line 122 of file nsServiceManagerUtils.h.

{
    NS_PRECONDITION(aContractID, "null parameter");
    NS_PRECONDITION(aDestination, "null parameter");
    
    return CallGetService(aContractID,
                          NS_GET_IID(DestinationType),
                          NS_REINTERPRET_CAST(void**, aDestination));
}

Here is the call graph for this function:

const nsGetServiceByCID do_GetService ( const nsCID aCID) [inline]

Definition at line 46 of file nsServiceManagerUtils.h.

{
    return nsGetServiceByCID(aCID);
}
const nsGetServiceByCIDWithError do_GetService ( const nsCID aCID,
nsresult error 
) [inline]

Definition at line 53 of file nsServiceManagerUtils.h.

{
    return nsGetServiceByCIDWithError(aCID, error);
}
const nsGetServiceByContractID do_GetService ( const char *  aContractID) [inline]

Definition at line 60 of file nsServiceManagerUtils.h.

{
    return nsGetServiceByContractID(aContractID);
}
const nsGetServiceByContractIDWithError do_GetService ( const char *  aContractID,
nsresult error 
) [inline]

Definition at line 67 of file nsServiceManagerUtils.h.

{
    return nsGetServiceByContractIDWithError(aContractID, error);
}
const nsGetServiceFromCategory do_GetServiceFromCategory ( const char *  category,
const char *  entry,
nsresult error = 0 
) [inline]

Definition at line 93 of file nsServiceManagerUtils.h.

{
    return nsGetServiceFromCategory(category, entry, error);
}

Here is the caller graph for this function: