report_task.hh

Go to the documentation of this file.
00001 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
00002 
00003 /*
00004  * Copyright (c) 2006 Fernando J. Pereda
00005  *
00006  * This file is part of the Paludis package manager. Paludis is free software;
00007  * you can redistribute it and/or modify it under the terms of the GNU General
00008  * Public License version 2, as published by the Free Software Foundation.
00009  *
00010  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
00011  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00012  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
00013  * details.
00014  *
00015  * You should have received a copy of the GNU General Public License along with
00016  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
00017  * Place, Suite 330, Boston, MA  02111-1307  USA
00018  */
00019 
00020 #ifndef PALUDIS_GUARD_PALUDIS_REPORT_TASK_HH
00021 #define PALUDIS_GUARD_PALUDIS_REPORT_TASK_HH 1
00022 
00023 #include <paludis/util/instantiation_policy.hh>
00024 #include <paludis/util/private_implementation_pattern.hh>
00025 #include <paludis/repository.hh>
00026 #include <paludis/dep_tag-fwd.hh>
00027 
00028 /** \file
00029  * Declarations for ReportTask.
00030  *
00031  * \ingroup g_tasks
00032  *
00033  * \section Examples
00034  *
00035  * - None at this time.
00036  */
00037 
00038 namespace paludis
00039 {
00040     class Environment;
00041 
00042     /**
00043      * Task to report the current state of the system.
00044      *
00045      * \ingroup g_tasks
00046      * \nosubgrouping
00047      */
00048     class PALUDIS_VISIBLE ReportTask :
00049         PrivateImplementationPattern<ReportTask>,
00050         InstantiationPolicy<ReportTask, instantiation_method::NonCopyableTag>
00051     {
00052         protected:
00053             ///\name Basic operations
00054             ///\{
00055 
00056             ReportTask(Environment * const env);
00057 
00058             ///\}
00059 
00060         public:
00061             ///\name Basic operations
00062             ///\{
00063 
00064             virtual ~ReportTask();
00065 
00066             ///\}
00067 
00068             ///\name Event callbacks
00069             ///\{
00070 
00071             virtual void on_report_all_pre() = 0;
00072             virtual void on_report_check_package_pre(const QualifiedPackageName & p) = 0;
00073             virtual void on_report_package_success(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00074             virtual void on_report_package_failure_pre(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00075             virtual void on_report_package_is_masked(const std::tr1::shared_ptr<const PackageID> & id,
00076                     const std::tr1::shared_ptr<const PackageIDSequence> & origins) = 0;
00077             virtual void on_report_package_is_vulnerable_pre(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00078             virtual void on_report_package_is_vulnerable(const std::tr1::shared_ptr<const PackageID> & id, const GLSADepTag & glsa_tag) = 0;
00079             virtual void on_report_package_is_vulnerable_post(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00080             virtual void on_report_package_is_missing(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00081             virtual void on_report_package_is_unused(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00082             virtual void on_report_package_failure_post(const std::tr1::shared_ptr<const PackageID> & id) = 0;
00083             virtual void on_report_check_package_post(const QualifiedPackageName & p) = 0;
00084             virtual void on_report_all_post() = 0;
00085 
00086             ///\}
00087 
00088             /**
00089              * Run the task.
00090              */
00091             void execute();
00092     };
00093 }
00094 
00095 #endif

Generated on Mon Sep 21 10:36:08 2009 for paludis by  doxygen 1.5.4