File indexing completed on 2024-04-28 05:42:09
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 0004 * * 0005 * This program is free software; you can redistribute it and/or * 0006 * modify it under the terms of the GNU Lesser General Public * 0007 * License as published by the Free Software Foundation; either * 0008 * version 2.1 of the License, or (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0013 * Lesser General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU Lesser General Public * 0016 * License along with this program (in the file LGPL.txt); if not, * 0017 * write to the Free Software Foundation, Inc., 51 Franklin St, * 0018 * Fifth Floor, Boston, MA 02110-1301 USA * 0019 * * 0020 * This software consists of voluntary contributions made by many * 0021 * individuals. For exact contribution history, see the revision * 0022 * history and logs, available at https://commits.kde.org/kdesvn. * 0023 ***************************************************************************/ 0024 #ifndef SVNCOMMITITEM_H 0025 #define SVNCOMMITITEM_H 0026 0027 #include <svnqt/client.h> 0028 0029 #include <apr.h> 0030 #include <svn_types.h> 0031 0032 // forward declarations 0033 struct svn_client_commit_item_t; 0034 // only used if build against svn 1.3 api 0035 struct svn_client_commit_item2_t; 0036 // only used if build against svn 1.5 api 0037 struct svn_client_commit_item3_t; 0038 0039 namespace svn 0040 { 0041 0042 /** 0043 @author Rajko Albrecht <ral@alwins-world.de> 0044 */ 0045 class SVNQT_EXPORT CommitItem 0046 { 0047 private: 0048 void init(); 0049 void convertprop(apr_array_header_t *); 0050 0051 protected: 0052 PropertiesMap m_CommitProperties; 0053 QString m_Path, m_Url, m_CopyFromUrl; 0054 svn_node_kind_t m_Kind; 0055 svn_revnum_t m_Revision, m_CopyFromRevision; 0056 apr_byte_t m_State; 0057 0058 public: 0059 //! constructor 0060 explicit CommitItem(const svn_client_commit_item_t *aSource = nullptr); 0061 //! constructor 0062 /*! 0063 * This one will only do something if build against subversion 1.3 0064 */ 0065 explicit CommitItem(const svn_client_commit_item2_t *); 0066 /*! 0067 * This one will only do something if build against subversion 1.5 0068 */ 0069 explicit CommitItem(const svn_client_commit_item3_t *); 0070 //! Destructor 0071 /*! 0072 * Not virtual 'cause no child class is needed 0073 */ 0074 ~CommitItem(); 0075 0076 const QString &path() const; 0077 const QString &url() const; 0078 const QString ©fromurl() const; 0079 const PropertiesMap &properties() const; 0080 svn_revnum_t revision() const; 0081 svn_revnum_t copyfromrevision() const; 0082 svn_node_kind_t kind() const; 0083 apr_byte_t state() const; 0084 //! Kind of action 0085 /*! 0086 * \return Char for type of action or 0 if unknown. Currently known is 0087 * <UL> 0088 * <LI>A - add</LI> 0089 * <LI>C - copy</LI> 0090 * <LI>D - deletion</LI> 0091 * <LI>M - Modify (content or property)</LI> 0092 * <LI>R - replaced</LI> 0093 * <LI>L - (un-)lock</LI> 0094 * </UL> 0095 */ 0096 char actionType() const; 0097 }; 0098 } 0099 0100 #endif