File indexing completed on 2024-05-12 17:16:25
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 #ifndef SVNQT_STATUS_H 0032 #define SVNQT_STATUS_H 0033 0034 // subversion api 0035 #include <svn_wc.h> 0036 0037 // svncpp 0038 #include <svnqt/svnqttypes.h> 0039 #include <svnqt/entry.h> 0040 #include <svnqt/pool.h> 0041 #include <svnqt/lock_entry.h> 0042 #include <svnqt/dirent.h> 0043 #include <svnqt/info_entry.h> 0044 #include <svnqt/svnqt_defines.h> 0045 0046 namespace svn 0047 { 0048 /** 0049 * Subversion status API. This class wraps around 0050 * @a svn_wc_status_t. 0051 * 0052 * @see svn_wc.h 0053 * @see svn_wc_status_t 0054 */ 0055 class Status_private; 0056 0057 class SVNQT_EXPORT Status 0058 { 0059 public: 0060 /** 0061 * copy constructor 0062 */ 0063 Status(const Status &src); 0064 0065 /** 0066 * default constructor 0067 * 0068 * @param path path for this status entry 0069 * @param status status entry 0070 */ 0071 explicit Status(const QString &path = QString()); 0072 /** 0073 * default constructor 0074 * 0075 * @param path path for this status entry 0076 * @param status status entry 0077 */ 0078 explicit Status(const char *path, const svn_client_status_t *status); 0079 /** 0080 * converting constructor 0081 */ 0082 Status(const QString &path, const DirEntry &src); 0083 /** 0084 * converting constructor 0085 */ 0086 Status(const QString &path, const InfoEntry &src); 0087 0088 /** 0089 * destructor 0090 */ 0091 virtual ~Status(); 0092 0093 /** 0094 * @return path of status entry 0095 */ 0096 const QString & 0097 path() const; 0098 0099 /** 0100 * @return entry for this path 0101 * @retval entry.isValid () = false item is not versioned 0102 */ 0103 const Entry & 0104 entry() const; 0105 /** 0106 * @return The status of the node, based on the restructuring changes and if the 0107 * node has no restructuring changes the text and prop status 0108 */ 0109 svn_wc_status_kind 0110 nodeStatus() const; 0111 0112 /** 0113 * @return file status property enum of the "textual" component. 0114 */ 0115 svn_wc_status_kind 0116 textStatus() const; 0117 0118 /** 0119 * @return file status property enum of the "property" component. 0120 */ 0121 svn_wc_status_kind 0122 propStatus() const; 0123 0124 /** 0125 * @retval TRUE if under version control 0126 */ 0127 bool 0128 isVersioned() const; 0129 0130 /** 0131 * @retval TRUE if under version control and not ignored 0132 */ 0133 bool 0134 isRealVersioned()const; 0135 0136 /** 0137 * @retval TRUE if under version control and local modified 0138 */ 0139 bool 0140 isModified()const; 0141 0142 /** 0143 * @retval TRUE if locked 0144 */ 0145 bool 0146 isLocked() const; 0147 0148 /** 0149 * @retval TRUE if copied 0150 */ 0151 bool 0152 isCopied() const; 0153 0154 /** 0155 * @retval TRUE if switched 0156 */ 0157 bool 0158 isSwitched() const; 0159 /** 0160 * @return the entry's text status in the repository 0161 */ 0162 svn_wc_status_kind 0163 reposTextStatus() const; 0164 /** 0165 * @return the entry's prop status in the repository 0166 */ 0167 svn_wc_status_kind 0168 reposPropStatus() const; 0169 0170 const LockEntry & 0171 lockEntry() const; 0172 0173 bool 0174 validReposStatus()const; 0175 0176 bool 0177 validLocalStatus()const; 0178 0179 /** 0180 * assignment operator 0181 */ 0182 Status & 0183 operator = (const Status &); 0184 private: 0185 Status_private *m_Data; 0186 }; 0187 } 0188 0189 #endif 0190 /* ----------------------------------------------------------------- 0191 * local variables: 0192 * eval: (load-file "../../rapidsvn-dev.el") 0193 * end: 0194 */