Cupt
binaryversion.hpp
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright (C) 2010 by Eugene V. Lyubimkin *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License *
6 * (version 3 or above) as published by the Free Software Foundation. *
7 * *
8 * This program is distributed in the hope that it will be useful, *
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
11 * GNU General Public License for more details. *
12 * *
13 * You should have received a copy of the GNU GPL *
14 * along with this program; if not, write to the *
15 * Free Software Foundation, Inc., *
16 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA *
17 **************************************************************************/
18 #ifndef CUPT_CACHE_BINARYVERSION_SEEN
19 #define CUPT_CACHE_BINARYVERSION_SEEN
20 
22 
23 #include <cupt/hashsums.hpp>
24 #include <cupt/cache/version.hpp>
25 #include <cupt/cache/relation.hpp>
26 
27 namespace cupt {
28 namespace cache {
29 
31 struct CUPT_API BinaryVersion: public Version
32 {
35  {
37  enum Type { PreDepends, Depends, Recommends, Suggests, Enhances, Conflicts, Breaks, Replaces, Count };
38  static const string strings[];
39  static const char* rawStrings[];
40  };
41  string architecture;
42  uint32_t installedSize;
45  bool essential;
46  bool important;
47  RelationLine relations[RelationTypes::Count];
48  vector<Relation> provides;
49  string multiarch;
52  string description;
53  string descriptionHash;
54  string tags;
56 
57  bool isInstalled() const;
58  virtual bool areHashesEqual(const Version* other) const;
59 };
60 
61 } // namespace
62 } // namespace
63 
64 #endif
65 
cupt::cache::BinaryVersion::RelationTypes
relation types between binary versions
Definition: binaryversion.hpp:34
relation.hpp
cupt::cache::Version::FileRecord
file information
Definition: version.hpp:62
cupt::cache::BinaryVersion::file
FileRecord file
Version::FileRecord.
Definition: binaryversion.hpp:55
hashsums.hpp
cupt::cache::BinaryVersion::descriptionHash
string descriptionHash
MD5 hash sum value of the full description.
Definition: binaryversion.hpp:53
version.hpp
cupt::cache::Version
common version information
Definition: version.hpp:39
cupt::cache::BinaryVersion::tags
string tags
tags
Definition: binaryversion.hpp:54
cupt::cache::BinaryVersion::provides
vector< Relation > provides
Definition: binaryversion.hpp:48
cupt::cache::BinaryVersion
binary version info
Definition: binaryversion.hpp:31
cupt::cache::BinaryVersion::sourcePackageName
string sourcePackageName
source package name
Definition: binaryversion.hpp:43
cupt::cache::BinaryVersion::important
bool important
has version 'important' flag?
Definition: binaryversion.hpp:46
cupt::cache::RelationLine
array of relation expressions
Definition: relation.hpp:175
cupt::cache::BinaryVersion::sourceVersionString
string sourceVersionString
source version string
Definition: binaryversion.hpp:44
cupt::cache::BinaryVersion::installedSize
uint32_t installedSize
approximate size of unpacked file content in bytes
Definition: binaryversion.hpp:42
cupt::cache::BinaryVersion::RelationTypes::Type
Type
type
Definition: binaryversion.hpp:37
cupt::cache::BinaryVersion::essential
bool essential
has version 'essential' flag?
Definition: binaryversion.hpp:45
cupt::cache::BinaryVersion::architecture
string architecture
binary architecture
Definition: binaryversion.hpp:41