Cupt
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
sourceversion.hpp
Go to the documentation of this file.
00001 /**************************************************************************
00002 *   Copyright (C) 2010 by Eugene V. Lyubimkin                             *
00003 *                                                                         *
00004 *   This program is free software; you can redistribute it and/or modify  *
00005 *   it under the terms of the GNU General Public License                  *
00006 *   (version 3 or above) as published by the Free Software Foundation.    *
00007 *                                                                         *
00008 *   This program is distributed in the hope that it will be useful,       *
00009 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00010 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00011 *   GNU General Public License for more details.                          *
00012 *                                                                         *
00013 *   You should have received a copy of the GNU GPL                        *
00014 *   along with this program; if not, write to the                         *
00015 *   Free Software Foundation, Inc.,                                       *
00016 *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA               *
00017 **************************************************************************/
00018 #ifndef CUPT_CACHE_SOURCEVERSION_SEEN
00019 #define CUPT_CACHE_SOURCEVERSION_SEEN
00020 
00022 
00023 #include <cupt/hashsums.hpp>
00024 #include <cupt/cache/version.hpp>
00025 #include <cupt/cache/relation.hpp>
00026 
00027 namespace cupt {
00028 namespace cache {
00029 
00031 struct CUPT_API SourceVersion: public Version
00032 {
00034     struct RelationTypes
00035     {
00037         enum Type { BuildDepends, BuildDependsIndep, BuildConflicts, BuildConflictsIndep, Count };
00038         static const string strings[]; 
00039         static const char* rawStrings[]; 
00040     };
00042 
00045     struct FileParts
00046     {
00048         enum Type { Tarball, Diff, Dsc, Count };
00049         static const string strings[]; 
00050     };
00051     ArchitecturedRelationLine relations[RelationTypes::Count]; 
00052     vector< FileRecord > files[FileParts::Count]; 
00053     vector< string > uploaders; 
00054     vector< string > binaryPackageNames; 
00055     vector< string > architectures; 
00056 
00057     virtual bool areHashesEqual(const shared_ptr< const Version >& other) const;
00058 
00060     static shared_ptr< SourceVersion > parseFromFile(const Version::InitializationParameters&);
00061 };
00062 
00063 } // namespace
00064 } // namespace
00065 
00066 #endif
00067 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator