File indexing completed on 2024-05-12 17:16:24

0001 /*
0002  * Port for usage with qt-framework and development for kdesvn
0003  * Copyright (C) 2005-2009 by Rajko Albrecht (ral@alwins-world.de)
0004  * http://kdesvn.alwins-world.de
0005  */
0006 /*
0007  * ====================================================================
0008  * Copyright (c) 2002-2005 The RapidSvn Group.  All rights reserved.
0009  * dev@rapidsvn.tigris.org
0010  *
0011  * This library is free software; you can redistribute it and/or
0012  * modify it under the terms of the GNU Lesser General Public
0013  * License as published by the Free Software Foundation; either
0014  * version 2.1 of the License, or (at your option) any later version.
0015  *
0016  * This library is distributed in the hope that it will be useful,
0017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0019  * Lesser General Public License for more details.
0020  *
0021  * You should have received a copy of the GNU Lesser General Public
0022  * License along with this library (in the file LGPL.txt); if not,
0023  * write to the Free Software Foundation, Inc., 51 Franklin St,
0024  * Fifth Floor, Boston, MA  02110-1301  USA
0025  *
0026  * This software consists of voluntary contributions made by many
0027  * individuals.  For exact contribution history, see the revision
0028  * history and logs, available at http://rapidsvn.tigris.org/.
0029  * ====================================================================
0030  */
0031 
0032 #ifndef SVNQT_LOG_ENTRY_H
0033 #define SVNQT_LOG_ENTRY_H
0034 
0035 #include <svnqt/svnqt_defines.h>
0036 #include <svnqt/datetime.h>
0037 
0038 #include <QList>
0039 #include <QString>
0040 #include <QVector>
0041 
0042 // apr
0043 #include <apr_time.h>
0044 
0045 // subversion api
0046 #include <svn_types.h>
0047 #include <svn_version.h>
0048 
0049 namespace svn
0050 {
0051 
0052 class StringArray;
0053 struct LogChangePathEntry
0054 {
0055     LogChangePathEntry() = default;
0056     LogChangePathEntry(const QString &path_,
0057                        char action_,
0058                        const QString &copyFromPath_,
0059                        const svn_revnum_t copyFromRevision_)
0060         : path(path_)
0061         , action(action_)
0062         , copyFromPath(copyFromPath_)
0063         , copyFromRevision(copyFromRevision_)
0064     {}
0065 
0066     QString path;
0067     char action = '\0';
0068     QString copyFromPath;
0069     //! future use or useful in backends
0070     QString copyToPath;
0071 
0072     qlonglong copyFromRevision;
0073     //! future use or useful in backends
0074     qlonglong copyToRevision;
0075 };
0076 
0077 typedef QVector<LogChangePathEntry> LogChangePathEntries;
0078 
0079 class SVNQT_EXPORT LogEntry
0080 {
0081 public:
0082     LogEntry();
0083     LogEntry(svn_log_entry_t *log_entry, const StringArray &excludeList);
0084 
0085     //! if -1 the entry is a fake entry and not real usable!
0086     qlonglong revision;
0087     qlonglong date; // apr_time
0088     QString author;
0089     QString message;
0090     LogChangePathEntries changedPaths;
0091     QList<qlonglong> m_MergedInRevisions;
0092 };
0093 }
0094 
0095 SVNQT_EXPORT QDataStream &operator<<(QDataStream &s, const svn::LogEntry &r);
0096 SVNQT_EXPORT QDataStream &operator<<(QDataStream &s, const svn::LogChangePathEntry &r);
0097 
0098 SVNQT_EXPORT QDataStream &operator>>(QDataStream &s, svn::LogEntry &r);
0099 SVNQT_EXPORT QDataStream &operator>>(QDataStream &s, svn::LogChangePathEntry &r);
0100 
0101 #endif
0102 /* -----------------------------------------------------------------
0103  * local variables:
0104  * eval: (load-file "../../rapidsvn-dev.el")
0105  * end:
0106  */