aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild_entries.hh
blob: f1c6e8636cdfbc545a3a6e7440d9318004a169d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/* vim: set sw=4 sts=4 et foldmethod=syntax : */

/*
 * Copyright (c) 2006, 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_E_E_REPOSITORY_EBUILD_METADATA_HH
#define PALUDIS_GUARD_PALUDIS_REPOSITORIES_E_E_REPOSITORY_EBUILD_METADATA_HH 1

#include <paludis/repositories/e/e_repository_entries.hh>
#include <paludis/repositories/e/e_repository_params.hh>
#include <paludis/util/private_implementation_pattern.hh>

/** \file
 * Declaration for the EbuildEntries class.
 *
 * \ingroup grperepository
 */

namespace paludis
{
    class FSEntry;
    class ERepository;

    namespace erepository
    {
        /**
         * ERepositoryEntries handler for ebuilds.
         *
         * \ingroup grperepository
         */
        class PALUDIS_VISIBLE EbuildEntries :
            public ERepositoryEntries,
            private PrivateImplementationPattern<EbuildEntries>
        {
            private:
                std::string _guess_eapi(const QualifiedPackageName &, const FSEntry &) const;

            public:
                /**
                 * Create an EbuildEntries instance.
                 */
                static std::tr1::shared_ptr<ERepositoryEntries> make_ebuild_entries(const Environment * const,
                            ERepository * const, const ERepositoryParams &);

                ///\name Basic operations
                ///\{

                EbuildEntries(const Environment * const,
                        ERepository * const e_repository,
                        const ERepositoryParams &);

                virtual ~EbuildEntries();

                ///\}

                virtual void merge(const MergeParams &);

                virtual bool is_package_file(const QualifiedPackageName &, const FSEntry &) const
                    PALUDIS_ATTRIBUTE((warn_unused_result));

                virtual VersionSpec extract_package_file_version(const QualifiedPackageName &, const FSEntry &) const
                    PALUDIS_ATTRIBUTE((warn_unused_result));

                virtual const std::tr1::shared_ptr<const ERepositoryID> make_id(const QualifiedPackageName &, const FSEntry &) const
                    PALUDIS_ATTRIBUTE((warn_unused_result));

                virtual std::string get_environment_variable(const std::tr1::shared_ptr<const ERepositoryID> &, const std::string & var,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual void fetch(const std::tr1::shared_ptr<const ERepositoryID> &, const FetchActionOptions &,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual void pretend_fetch(const std::tr1::shared_ptr<const ERepositoryID> &, PretendFetchAction &,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual void install(const std::tr1::shared_ptr<const ERepositoryID> &, const InstallActionOptions &,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual bool pretend(const std::tr1::shared_ptr<const ERepositoryID> &,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual void info(const std::tr1::shared_ptr<const ERepositoryID> &,
                        const std::tr1::shared_ptr<const ERepositoryProfile> &) const;

                virtual std::string get_package_file_manifest_key(const FSEntry &, const QualifiedPackageName &) const;

                virtual std::string binary_ebuild_name(const QualifiedPackageName &, const VersionSpec &, const std::string &) const
                    PALUDIS_ATTRIBUTE((warn_unused_result));
        };
    }
}

#endif