2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsCOMPtr.h"
|
2010-06-10 11:11:40 -07:00
|
|
|
#include "mozilla/ModuleUtils.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "mozStorageService.h"
|
|
|
|
#include "mozStorageConnection.h"
|
2010-10-19 06:46:49 -07:00
|
|
|
#include "VacuumManager.h"
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "mozStorageCID.h"
|
|
|
|
|
2009-03-31 07:26:16 -07:00
|
|
|
namespace mozilla {
|
|
|
|
namespace storage {
|
|
|
|
|
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(Service,
|
|
|
|
Service::getSingleton)
|
2010-10-19 06:46:49 -07:00
|
|
|
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(VacuumManager,
|
|
|
|
VacuumManager::getSingleton)
|
2009-03-31 07:26:16 -07:00
|
|
|
|
|
|
|
} // namespace storage
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2010-06-10 11:11:40 -07:00
|
|
|
NS_DEFINE_NAMED_CID(MOZ_STORAGE_SERVICE_CID);
|
2010-10-19 06:46:49 -07:00
|
|
|
NS_DEFINE_NAMED_CID(VACUUMMANAGER_CID);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2010-06-10 11:11:40 -07:00
|
|
|
static const mozilla::Module::CIDEntry kStorageCIDs[] = {
|
|
|
|
{ &kMOZ_STORAGE_SERVICE_CID, false, NULL, mozilla::storage::ServiceConstructor },
|
2010-10-19 06:46:49 -07:00
|
|
|
{ &kVACUUMMANAGER_CID, false, NULL, mozilla::storage::VacuumManagerConstructor },
|
2010-06-10 11:11:40 -07:00
|
|
|
{ NULL }
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
2010-06-10 11:11:40 -07:00
|
|
|
static const mozilla::Module::ContractIDEntry kStorageContracts[] = {
|
|
|
|
{ MOZ_STORAGE_SERVICE_CONTRACTID, &kMOZ_STORAGE_SERVICE_CID },
|
2010-10-19 06:46:49 -07:00
|
|
|
{ VACUUMMANAGER_CONTRACTID, &kVACUUMMANAGER_CID },
|
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module::CategoryEntry kStorageCategories[] = {
|
2010-10-19 06:46:51 -07:00
|
|
|
{ "idle-daily", "MozStorage Vacuum Manager", VACUUMMANAGER_CONTRACTID },
|
2010-06-10 11:11:40 -07:00
|
|
|
{ NULL }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const mozilla::Module kStorageModule = {
|
|
|
|
mozilla::Module::kVersion,
|
|
|
|
kStorageCIDs,
|
2010-10-19 06:46:49 -07:00
|
|
|
kStorageContracts,
|
|
|
|
kStorageCategories
|
2010-06-10 11:11:40 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
NSMODULE_DEFN(mozStorageModule) = &kStorageModule;
|