00001 // 00002 // aegis - project change supervisor 00003 // Copyright (C) 2005, 2006, 2008 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program. If not, see 00017 // <http://www.gnu.org/licenses/>. 00018 // 00019 00020 #ifndef LIBAEGIS_SIMPVERSTOOL_H 00021 #define LIBAEGIS_SIMPVERSTOOL_H 00022 00023 #include <common/nstring.h> 00024 #include <libaegis/compres_algo.h> 00025 #include <libaegis/output.h> 00026 00027 class rfc822; // forward 00028 class rfc822_functor; // forward 00029 class output_ty; // forward 00030 00058 class simple_version_tool 00059 { 00060 public: 00064 virtual ~simple_version_tool(); 00065 00075 simple_version_tool(const nstring &history_file_name, 00076 compression_algorithm_t comp_alg = compression_algorithm_not_set); 00077 00088 void checkin(const nstring &input_file_name, const rfc822 &meta_data); 00089 00098 void checkin(const nstring &input_file_name); 00099 00110 bool list(rfc822_functor &arg); 00111 00125 void checkout(const nstring &output_file_name, const nstring &version); 00126 00139 void checkout(output::pointer os, const nstring &version); 00140 00141 private: 00146 nstring history_file_name; 00147 00151 compression_algorithm_t compression_algorithm; 00152 00156 simple_version_tool(); 00157 00161 simple_version_tool(const simple_version_tool &); 00162 00166 simple_version_tool &operator=(const simple_version_tool &); 00167 }; 00168 00169 #endif // LIBAEGIS_SIMPVERSTOOL_H