File indexing completed on 2024-04-28 05:42:09

0001 /***************************************************************************
0002  *   Copyright (C) 2007-2009 by Rajko Albrecht  ral@alwins-world.de        *
0003  *   https://kde.org/applications/development/org.kde.kdesvn               *
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 
0025 #ifndef SVNQT_CONFLICT_RESULT_H
0026 #define SVNQT_CONFLICT_RESULT_H
0027 
0028 struct svn_wc_conflict_result_t;
0029 
0030 #include <svn_types.h>
0031 #include <svnqt/pool.h>
0032 #include <svnqt/svnqt_defines.h>
0033 
0034 #include <QString>
0035 
0036 namespace svn
0037 {
0038 
0039 class SVNQT_EXPORT ConflictResult
0040 {
0041 public:
0042     enum ConflictChoice {
0043         //! let user make a call to resolve
0044         ChoosePostpone,
0045         ChooseBase,
0046         ChooseTheirsFull,
0047         ChooseMineFull,
0048         ChooseTheirsConflict,
0049         ChooseMineConflict,
0050         ChooseMerged
0051     };
0052     ConflictResult();
0053     //! Copy constructor
0054     /*! only useful wenn build with subversion 1.5 or newer
0055      */
0056     explicit ConflictResult(const svn_wc_conflict_result_t *);
0057 
0058     const QString &mergedFile() const
0059     {
0060         return m_MergedFile;
0061     }
0062     void setMergedFile(const QString &aMergedfile);
0063 
0064     ConflictChoice choice() const
0065     {
0066         return m_choice;
0067     }
0068     void setChoice(ConflictChoice aValue);
0069 
0070     const svn_wc_conflict_result_t *result(apr_pool_t *pool) const;
0071     void assignResult(svn_wc_conflict_result_t **aResult, apr_pool_t *pool) const;
0072 
0073 protected:
0074     ConflictChoice m_choice;
0075     //! Merged file
0076     /*! will only used if m_choice is ChooseMerged
0077      */
0078     QString m_MergedFile;
0079 };
0080 
0081 }
0082 
0083 #endif