/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- * * The contents of this file are subject to the Netscape Public License * Version 1.0 (the "NPL"); you may not use this file except in * compliance with the NPL. You may obtain a copy of the NPL at * http://www.mozilla.org/NPL/ * * Software distributed under the NPL is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL * for the specific language governing rights and limitations under the * NPL. * * The Initial Developer of this code under the NPL is Netscape * Communications Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All Rights * Reserved. */ #include "nsCOMPtr.h" #include "nsIModule.h" #include "nscore.h" #include "nsIComponentManager.h" #include "nsIServiceManager.h" #include "nsIGenericFactory.h" #include "nsINetDataCache.h" #include "nsINetDataCacheManager.h" #include "nsMemCacheCID.h" #include "nsMemCache.h" #include "nsNetDiskCache.h" #include "nsNetDiskCacheCID.h" #include "nsCacheManager.h" // Factory method to create a new nsMemCache instance. Used // by nsNetDataCacheModule NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsMemCache, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsNetDiskCache, Init) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsCacheManager, Init) static nsModuleComponentInfo components[] = { { NS_MEM_CACHE_FACTORY_CID, nsMemCacheConstructor, NS_NETWORK_MEMORY_CACHE_PROGID, "Memory Cache"}, { NS_NETDISKCACHE_CID, nsNetDiskCacheConstructor, NS_NETWORK_FILE_CACHE_PROGID, "File Cache"}, { NS_CACHE_MANAGER_CID, nsCacheManagerConstructor, NS_NETWORK_CACHE_MANAGER_PROGID,"Cache Manager"} }; NS_IMPL_MODULE(nsNetDataCacheModule, components) NS_IMPL_NSGETMODULE(nsNetDataCacheModule)