File indexing completed on 2024-05-12 17:16:22
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 http://kdesvn.alwins-world.de. * 0023 ***************************************************************************/ 0024 #ifndef SVNCOMMITITEM_H 0025 #define SVNCOMMITITEM_H 0026 0027 #include <svnqt/client.h> 0028 0029 #include <svn_types.h> 0030 #include <apr.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 0048 private: 0049 void init(); 0050 void convertprop(apr_array_header_t *); 0051 0052 protected: 0053 PropertiesMap m_CommitProperties; 0054 QString m_Path, m_Url, m_CopyFromUrl; 0055 svn_node_kind_t m_Kind; 0056 svn_revnum_t m_Revision, m_CopyFromRevision; 0057 apr_byte_t m_State; 0058 0059 public: 0060 //! constructor 0061 explicit CommitItem(const svn_client_commit_item_t *aSource = nullptr); 0062 //! constructor 0063 /*! 0064 * This one will only do something if build against subversion 1.3 0065 */ 0066 explicit CommitItem(const svn_client_commit_item2_t *); 0067 /*! 0068 * This one will only do something if build against subversion 1.5 0069 */ 0070 explicit CommitItem(const svn_client_commit_item3_t *); 0071 //! Destructor 0072 /*! 0073 * Not virtual 'cause no child class is needed 0074 */ 0075 ~CommitItem(); 0076 0077 const QString &path()const; 0078 const QString &url()const; 0079 const QString ©fromurl()const; 0080 const PropertiesMap &properties()const; 0081 svn_revnum_t revision()const; 0082 svn_revnum_t copyfromrevision()const; 0083 svn_node_kind_t kind()const; 0084 apr_byte_t state()const; 0085 //! Kind of action 0086 /*! 0087 * \return Char for type of action or 0 if unknown. Currently known is 0088 * <UL> 0089 * <LI>A - add</LI> 0090 * <LI>C - copy</LI> 0091 * <LI>D - deletion</LI> 0092 * <LI>M - Modify (content or property)</LI> 0093 * <LI>R - replaced</LI> 0094 * <LI>L - (un-)lock</LI> 0095 * </UL> 0096 */ 0097 char actionType()const; 0098 }; 0099 0100 } 0101 0102 #endif