/* vim: set sw=4 sts=4 et foldmethod=syntax : *//* * Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011 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_VIRTUALS_VIRTUALS_REPOSITORY_HH#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_VIRTUALS_VIRTUALS_REPOSITORY_HH 1#include<paludis/repository.hh>#include<paludis/util/map-fwd.hh>#include<memory>namespacepaludis{/** * A repository holding packages representing virtuals. * * \ingroup grpvirtualsrepository */classPALUDIS_VISIBLEVirtualsRepository:publicRepository,publicstd::enable_shared_from_this<VirtualsRepository>{private:Pimp<VirtualsRepository>_imp;protected:virtualvoidneed_keys_added()const;public:///\name Basic operations///\{VirtualsRepository(constEnvironment*constenv);virtual~VirtualsRepository();///\}///\name RepositoryFactory functions///\{staticRepositoryNamerepository_factory_name(constEnvironment*constenv,conststd::function<std::string(conststd::string&)>&);staticstd::shared_ptr<Repository>repository_factory_create(constEnvironment*constenv,conststd::function<std::string(conststd::string&)>&);staticstd::shared_ptr<constRepositoryNameSet>repository_factory_dependencies(constEnvironment*constenv,conststd::function<std::string(conststd::string&)>&);///\}virtualstd::shared_ptr<constCategoryNamePartSet>unimportant_category_names(constRepositoryContentMayExcludes&)const;virtualvoidinvalidate();virtualconstboolis_unimportant()const;virtualconststd::shared_ptr<constSet<std::string>>maybe_expand_licence_nonrecursively(conststd::string&)const;/* Repository */virtualstd::shared_ptr<constPackageIDSequence>package_ids(constQualifiedPackageName&,constRepositoryContentMayExcludes&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::shared_ptr<constQualifiedPackageNameSet>package_names(constCategoryNamePart&,constRepositoryContentMayExcludes&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualstd::shared_ptr<constCategoryNamePartSet>category_names(constRepositoryContentMayExcludes&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolhas_package_named(constQualifiedPackageName&,constRepositoryContentMayExcludes&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolhas_category_named(constCategoryNamePart&,constRepositoryContentMayExcludes&)constPALUDIS_ATTRIBUTE((warn_unused_result));virtualboolsome_ids_might_support_action(constSupportsActionTestBase&)const;virtualboolsome_ids_might_not_be_masked()const;virtualboolsync(conststd::string&,conststd::string&,conststd::shared_ptr<OutputManager>&)const;/* Keys */virtualconststd::shared_ptr<constMetadataValueKey<std::string>>format_key()const;virtualconststd::shared_ptr<constMetadataValueKey<FSPath>>location_key()const;virtualconststd::shared_ptr<constMetadataValueKey<FSPath>>installed_root_key()const;virtualconststd::shared_ptr<constMetadataCollectionKey<Map<std::string,std::string>>>sync_host_key()const;///\name Set methods///\{virtualvoidpopulate_sets()const;///\}virtualHookResultperform_hook(constHook&hook,conststd::shared_ptr<OutputManager>&)PALUDIS_ATTRIBUTE((warn_unused_result));};}#endif