File indexing completed on 2024-04-28 05:42:11
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_STATUS_H 0032 #define SVNQT_STATUS_H 0033 0034 // subversion api 0035 #include <svn_wc.h> 0036 0037 // svncpp 0038 #include <svnqt/dirent.h> 0039 #include <svnqt/entry.h> 0040 #include <svnqt/info_entry.h> 0041 #include <svnqt/lock_entry.h> 0042 #include <svnqt/pool.h> 0043 #include <svnqt/svnqt_defines.h> 0044 #include <svnqt/svnqttypes.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 &path() const; 0097 0098 /** 0099 * @return entry for this path 0100 * @retval entry.isValid () = false item is not versioned 0101 */ 0102 const Entry &entry() const; 0103 /** 0104 * @return The status of the node, based on the restructuring changes and if the 0105 * node has no restructuring changes the text and prop status 0106 */ 0107 svn_wc_status_kind nodeStatus() const; 0108 0109 /** 0110 * @return file status property enum of the "textual" component. 0111 */ 0112 svn_wc_status_kind textStatus() const; 0113 0114 /** 0115 * @return file status property enum of the "property" component. 0116 */ 0117 svn_wc_status_kind propStatus() const; 0118 0119 /** 0120 * @retval TRUE if under version control 0121 */ 0122 bool isVersioned() const; 0123 0124 /** 0125 * @retval TRUE if under version control and not ignored 0126 */ 0127 bool isRealVersioned() const; 0128 0129 /** 0130 * @retval TRUE if under version control and local modified 0131 */ 0132 bool isModified() const; 0133 0134 /** 0135 * @retval TRUE if locked 0136 */ 0137 bool isLocked() const; 0138 0139 /** 0140 * @retval TRUE if copied 0141 */ 0142 bool isCopied() const; 0143 0144 /** 0145 * @retval TRUE if switched 0146 */ 0147 bool isSwitched() const; 0148 /** 0149 * @return the entry's text status in the repository 0150 */ 0151 svn_wc_status_kind reposTextStatus() const; 0152 /** 0153 * @return the entry's prop status in the repository 0154 */ 0155 svn_wc_status_kind reposPropStatus() const; 0156 0157 const LockEntry &lockEntry() const; 0158 0159 bool validReposStatus() const; 0160 0161 bool validLocalStatus() const; 0162 0163 /** 0164 * assignment operator 0165 */ 0166 Status &operator=(const Status &); 0167 0168 private: 0169 Status_private *m_Data; 0170 }; 0171 } 0172 0173 #endif 0174 /* ----------------------------------------------------------------- 0175 * local variables: 0176 * eval: (load-file "../../rapidsvn-dev.el") 0177 * end: 0178 */