1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_CVS_H
26 #define __SYNFIG_CVS_H
28 /* === H E A D E R S ======================================================= */
30 #include <synfig/string.h>
33 /* === M A C R O S ========================================================= */
35 /* === T Y P E D E F S ===================================================== */
37 /* === C L A S S E S & S T R U C T S ======================================= */
43 synfig::String file_name_;
47 bool update_available_;
49 synfig::String cvs_version_;
50 time_t original_timestamp_;
54 void calc_repository_info();
56 CVSInfo(const synfig::String& file_name);
60 void set_file_name(const synfig::String& file_name);
62 // READ OPERATIONS --------------------------------------------------
64 //! Returns TRUE if \a file_name is in a sandbox
65 bool in_sandbox()const;
67 //! Returns TRUE if \a file_name is in the repository
68 bool in_repository()const;
70 //! Returns TRUE if \a file_name has modifications not yet on the repository
71 bool is_modified()const;
73 //! Returns TRUE if there is a new version of \a file_name on the repository
74 bool is_updated()const;
76 //! Returns the CVS version string
77 const synfig::String& get_cvs_version()const;
79 //! Returns the unix timestamp of the repository file
80 const time_t &get_original_timestamp()const;
82 //! Returns the unix timestamp of the checked out file
83 time_t get_current_timestamp()const;
86 synfig::String get_cvs_root()const;
88 //! Returns the name of the module
89 synfig::String get_cvs_module()const;
91 // WRITE OPERATIONS -------------------------------------------------
93 void cvs_add(const synfig::String& message=synfig::String());
97 void cvs_commit(const synfig::String& message=synfig::String());
98 }; // END of class CVSInfo
100 }; // END of namespace synfigapp
102 /* === E N D =============================================================== */