Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
nsImageModule.cpp File Reference
#include "nsImgBuildDefines.h"
#include "nsIGenericFactory.h"
#include "nsIModule.h"
#include "nsICategoryManager.h"
#include "nsXPCOMCID.h"
#include "nsServiceManagerUtils.h"
#include "imgCache.h"
#include "imgContainer.h"
#include "imgLoader.h"
#include "imgRequest.h"
#include "imgRequestProxy.h"

Go to the source code of this file.

Functions

static NS_METHOD ImageRegisterProc (nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const char *componentType, const nsModuleComponentInfo *info)
static NS_METHOD ImageUnregisterProc (nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const nsModuleComponentInfo *info)
 imglib_Initialize (nsIModule *aSelf)
 imglib_Shutdown (nsIModule *aSelf)

Variables

static const char * gImageMimeTypes []
static const nsModuleComponentInfo components []

Function Documentation

static NS_METHOD ImageRegisterProc ( nsIComponentManager aCompMgr,
nsIFile aPath,
const char *  registryLocation,
const char *  componentType,
const nsModuleComponentInfo info 
) [static]

Definition at line 167 of file nsImageModule.cpp.

                                                                      {
  nsresult rv;
  nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
  if (NS_FAILED(rv))
    return rv;
  for (unsigned i = 0; i < sizeof(gImageMimeTypes)/sizeof(*gImageMimeTypes); i++) {
    catMan->AddCategoryEntry("Gecko-Content-Viewers", gImageMimeTypes[i],
                             "@mozilla.org/content/document-loader-factory;1",
                             PR_TRUE, PR_TRUE, nsnull);
  }

  catMan->AddCategoryEntry("content-sniffing-services", "@mozilla.org/image/loader;1",
                           "@mozilla.org/image/loader;1", PR_TRUE, PR_TRUE,
                           nsnull);
  return NS_OK;
}

Here is the call graph for this function:

static NS_METHOD ImageUnregisterProc ( nsIComponentManager aCompMgr,
nsIFile aPath,
const char *  registryLocation,
const nsModuleComponentInfo info 
) [static]

Definition at line 188 of file nsImageModule.cpp.

                                                                        {
  nsresult rv;
  nsCOMPtr<nsICategoryManager> catMan(do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv));
  if (NS_FAILED(rv))
    return rv;
  for (unsigned i = 0; i < sizeof(gImageMimeTypes)/sizeof(*gImageMimeTypes); i++)
    catMan->DeleteCategoryEntry("Gecko-Content-Viewers", gImageMimeTypes[i], PR_TRUE);

  return NS_OK;
}

Here is the call graph for this function:

Definition at line 311 of file nsImageModule.cpp.

{
  imgCache::Init();
  return NS_OK;
}

Here is the call graph for this function:

imglib_Shutdown ( nsIModule aSelf)

Definition at line 318 of file nsImageModule.cpp.

{
  imgCache::Shutdown();
#ifdef IMG_BUILD_DECODER_gif
  nsGifShutdown();
#endif
}

Here is the call graph for this function:


Variable Documentation

Definition at line 202 of file nsImageModule.cpp.

const char* gImageMimeTypes[] [static]
Initial value:
 {






















}

Definition at line 142 of file nsImageModule.cpp.