File indexing completed on 2024-04-28 05:42:10
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 * https://kde.org/applications/development/org.kde.kdesvn 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 #ifndef SVNQT_ENTRY_H 0032 #define SVNQT_ENTRY_H 0033 0034 // svncpp 0035 #include <svnqt/dirent.h> 0036 #include <svnqt/info_entry.h> 0037 #include <svnqt/lock_entry.h> 0038 #include <svnqt/pool.h> 0039 #include <svnqt/svnqt_defines.h> 0040 #include <svnqt/svnqttypes.h> 0041 0042 // subversion api 0043 #include <svn_wc.h> 0044 0045 #include <QString> 0046 0047 namespace svn 0048 { 0049 class Entry_private; 0050 /** 0051 * C++ API for Subversion. 0052 * This class wraps around @a svn_wc_entry_t. 0053 */ 0054 class SVNQT_EXPORT Entry 0055 { 0056 public: 0057 /** 0058 * default constructor. if @a src is set, 0059 * copy its contents. 0060 * 0061 * If @a src is not set (=0) this will be 0062 * a non-versioned entry. This can be checked 0063 * later with @a isValid (). 0064 * 0065 * @param src another entry to copy from 0066 */ 0067 explicit Entry(const svn_client_status_t *src = nullptr); 0068 0069 /** 0070 * copy constructor 0071 */ 0072 Entry(const Entry &src); 0073 0074 /** 0075 * converting constructr 0076 */ 0077 Entry(const QString &url, const DirEntry &src); 0078 /** 0079 * converting constructr 0080 */ 0081 Entry(const QString &url, const InfoEntry &src); 0082 0083 /** 0084 * destructor 0085 */ 0086 virtual ~Entry(); 0087 0088 /** 0089 * returns whether this is a valid=versioned 0090 * entry. 0091 * 0092 * @return is entry valid 0093 * @retval true valid entry 0094 * @retval false invalid or unversioned entry 0095 */ 0096 bool isValid() const; 0097 /** 0098 * @return entry's name 0099 */ 0100 const QString &name() const; 0101 /** 0102 * @return base revision 0103 */ 0104 svn_revnum_t revision() const; 0105 /** 0106 * @return url in repository 0107 */ 0108 const QUrl &url() const; 0109 0110 /** 0111 * @return canonical repository url 0112 */ 0113 const QUrl &repos() const; 0114 /** 0115 * @return repository uuid 0116 */ 0117 const QString &uuid() const; 0118 /** 0119 * @return node kind (file, dir, ...) 0120 */ 0121 svn_node_kind_t kind() const; 0122 0123 /** 0124 * @return TRUE if copied 0125 */ 0126 bool isCopied() const; 0127 0128 /** 0129 * @return last revision this was changed 0130 */ 0131 svn_revnum_t cmtRev() const; 0132 0133 /** 0134 * @return last date this was changed 0135 */ 0136 const DateTime &cmtDate() const; 0137 0138 /** 0139 * @return last commit author of this file 0140 */ 0141 const QString &cmtAuthor() const; 0142 0143 /** 0144 * @return lock for that entry 0145 * @since subversion 1.2 0146 */ 0147 const LockEntry &lockEntry() const; 0148 0149 /** 0150 * @return true if entry is marked as dir 0151 */ 0152 bool isDir() const; 0153 /** 0154 * assignment operator 0155 */ 0156 Entry &operator=(const Entry &); 0157 bool isFile() const; 0158 0159 private: 0160 Entry_private *m_Data; 0161 }; 0162 0163 } 0164 0165 #endif 0166 /* ----------------------------------------------------------------- 0167 * local variables: 0168 * eval: (load-file "../../rapidsvn-dev.el") 0169 * end: 0170 */