/* vim: set sw=4 sts=4 et foldmethod=syntax : *//* * Copyright (c) 2007, 2008 Ciaran McCreesh * * This file is part of the Paludis package manager. Paludis is free software; * you can redistribute it and/or modify it under the terms of the GNU General * Public License version 2, as published by the Free Software Foundation. * * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef PALUDIS_GUARD_PALUDIS_REPOSITORIES_GEMS_GEMS_REPOSITORY_HH#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_GEMS_GEMS_REPOSITORY_HH 1#include<paludis/repository.hh>#include<paludis/repositories/gems/params-fwd.hh>#include<paludis/util/private_implementation_pattern.hh>#include<tr1/memory>namespacepaludis{/** * Repository for Gem packages. * * \ingroup grpgemsrepository * \nosubgrouping */classPALUDIS_VISIBLEGemsRepository:publicRepository,privatePrivateImplementationPattern<GemsRepository>,publicstd::tr1::enable_shared_from_this<GemsRepository>{private:PrivateImplementationPattern<GemsRepository>::ImpPtr&_imp;void_add_metadata_keys()const;voidneed_category_names()const;voidneed_ids()const;protected:virtualvoidneed_keys_added()const;public:/** * Constructor. */GemsRepository(constgems::RepositoryParams&);/** * Destructor. */~GemsRepository();virtualvoidinvalidate();virtualvoidinvalidate_masks();/* Repository */virtualstd::tr1::shared_ptr<constPackageIDSequence>package_ids(constQualifiedPackageName&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::tr1::shared_ptr<constQualifiedPackageNameSet>package_names(constCategoryNamePart&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::tr1::shared_ptr<constCategoryNamePartSet>category_names()constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolhas_package_named(constQualifiedPackageName&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolhas_category_named(constCategoryNamePart&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolsome_ids_might_support_action(constSupportsActionTestBase&)const;/* Keys */virtualconststd::tr1::shared_ptr<constMetadataValueKey<std::string>>format_key()const;virtualconststd::tr1::shared_ptr<constMetadataValueKey<FSEntry>>location_key()const;virtualconststd::tr1::shared_ptr<constMetadataValueKey<FSEntry>>installed_root_key()const;///\name RepositoryFactory functions///\{staticRepositoryNamerepository_factory_name(constEnvironment*constenv,conststd::tr1::function<std::string(conststd::string&)>&);staticstd::tr1::shared_ptr<Repository>repository_factory_create(Environment*constenv,conststd::tr1::function<std::string(conststd::string&)>&);staticstd::tr1::shared_ptr<constRepositoryNameSet>repository_factory_dependencies(constEnvironment*constenv,conststd::tr1::function<std::string(conststd::string&)>&);///\}};}#endif