michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "mozilla/ModuleUtils.h" michael@0: michael@0: #include "mozStorageService.h" michael@0: #include "mozStorageConnection.h" michael@0: #include "VacuumManager.h" michael@0: michael@0: #include "mozStorageCID.h" michael@0: michael@0: namespace mozilla { michael@0: namespace storage { michael@0: michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Service, michael@0: Service::getSingleton) michael@0: NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(VacuumManager, michael@0: VacuumManager::getSingleton) michael@0: michael@0: } // namespace storage michael@0: } // namespace mozilla michael@0: michael@0: NS_DEFINE_NAMED_CID(MOZ_STORAGE_SERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(VACUUMMANAGER_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kStorageCIDs[] = { michael@0: { &kMOZ_STORAGE_SERVICE_CID, false, nullptr, mozilla::storage::ServiceConstructor }, michael@0: { &kVACUUMMANAGER_CID, false, nullptr, mozilla::storage::VacuumManagerConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kStorageContracts[] = { michael@0: { MOZ_STORAGE_SERVICE_CONTRACTID, &kMOZ_STORAGE_SERVICE_CID }, michael@0: { VACUUMMANAGER_CONTRACTID, &kVACUUMMANAGER_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kStorageCategories[] = { michael@0: { "idle-daily", "MozStorage Vacuum Manager", VACUUMMANAGER_CONTRACTID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kStorageModule = { michael@0: mozilla::Module::kVersion, michael@0: kStorageCIDs, michael@0: kStorageContracts, michael@0: kStorageCategories michael@0: }; michael@0: michael@0: NSMODULE_DEFN(mozStorageModule) = &kStorageModule;