1 /***************************************************************************
2  *   Copyright (C) 2007-2009 by Rajko Albrecht  ral@alwins-world.de        *
3  *   http://kdesvn.alwins-world.de/                                        *
4  *                                                                         *
5  * This program is free software; you can redistribute it and/or           *
6  * modify it under the terms of the GNU Lesser General Public              *
7  * License as published by the Free Software Foundation; either            *
8  * version 2.1 of the License, or (at your option) any later version.      *
9  *                                                                         *
10  * This program is distributed in the hope that it will be useful,         *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
13  * Lesser General Public License for more details.                         *
14  *                                                                         *
15  * You should have received a copy of the GNU Lesser General Public        *
16  * License along with this program (in the file LGPL.txt); if not,         *
17  * write to the Free Software Foundation, Inc., 51 Franklin St,            *
18  * Fifth Floor, Boston, MA  02110-1301  USA                                *
19  *                                                                         *
20  * This software consists of voluntary contributions made by many          *
21  * individuals.  For exact contribution history, see the revision          *
22  * history and logs, available at http://kdesvn.alwins-world.de.           *
23  ***************************************************************************/
24 
25 #ifndef SVNQT_TYPES_H
26 #define SVNQT_TYPES_H
27 
28 #include <QMap>
29 #include <QPair>
30 #include <QSharedPointer>
31 #include <QVector>
32 
33 namespace svn
34 {
35 // forward declarations
36 class AnnotateLine;
37 class Context;
38 class DirEntry;
39 class Entry;
40 class InfoEntry;
41 class LogEntry;
42 class Revision;
43 class Status;
44 class Targets;
45 class Path;
46 class StringArray;
47 class CommitItem;
48 class CopyParameter;
49 class DiffParameter;
50 class StatusParameter;
51 class LogParameter;
52 class PropertiesParameter;
53 class MergeParameter;
54 class CheckoutParameter;
55 class CommitParameter;
56 class AnnotateParameter;
57 class UpdateParameter;
58 
59 typedef QVector<AnnotateLine> AnnotatedFile;
60 typedef QSharedPointer<svn::Context> ContextP;
61 typedef QWeakPointer<svn::Context> ContextWP;
62 
63 typedef QVector<DirEntry> DirEntries;
64 typedef QVector<InfoEntry> InfoEntries;
65 /// simple list of log entries
66 typedef QVector<LogEntry> LogEntries;
67 
68 /// map of logentries - key is revision
69 typedef QMap<long, LogEntry> LogEntriesMap;
70 typedef QSharedPointer<LogEntriesMap> LogEntriesMapPtr;
71 
72 typedef QSharedPointer<Status> StatusPtr;
73 typedef QVector<StatusPtr> StatusEntries;
74 typedef QVector<Revision> Revisions;
75 
76 /** Range of Revision */
77 typedef QPair<Revision, Revision> RevisionRange;
78 /** list of revision ranges */
79 typedef QVector<RevisionRange> RevisionRanges;
80 
81 /// map of property names to values
82 typedef QMap<QString, QString> PropertiesMap;
83 /// pair of path, PropertiesMap
84 typedef QPair<QString, PropertiesMap> PathPropertiesMapEntry;
85 /// vector of path, Properties pairs
86 typedef QVector<PathPropertiesMapEntry> PathPropertiesMapList;
87 /// shared pointer for properties
88 typedef QSharedPointer<PathPropertiesMapList> PathPropertiesMapListPtr;
89 
90 typedef QVector<Path> Paths;
91 
92 typedef QVector<CommitItem> CommitItemList;
93 
94 //! Mapper enum for svn_depth_t
95 /*!
96  * Until subversion prior 1.5 is supported by this lib we must hide the svn_depth_t enum from interface.
97  * \since subversion 1.5 / svnqt 1.0
98  * \sa svn_depth_t
99  */
100 enum Depth {
101     DepthUnknown,
102     DepthExclude,
103     DepthEmpty,
104     DepthFiles,
105     DepthImmediates,
106     DepthInfinity
107 };
108 
109 //! For search specific server capabilities
110 /*!
111  * \since subversion 1.5
112  * when build with subversion earlier 1.5 this will not used.
113  * \sa svn_repos_has_capability
114  */
115 enum Capability {
116     CapabilityMergeinfo = 0,
117     CapabilityDepth,
118     CapabilityCommitRevProps,
119     CapabilityLogRevProps
120 };
121 
122 namespace repository
123 {
124 class CreateRepoParameter;
125 }
126 }
127 
128 #endif
129