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

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 #pragma once
0025 
0026 #include <QString>
0027 #include <svnqt/svnqt_defines.h>
0028 
0029 namespace svn
0030 {
0031 
0032 namespace repository
0033 {
0034 
0035 class CreateRepoParameterData;
0036 
0037 class SVNQT_EXPORT CreateRepoParameter
0038 {
0039     QString _path;
0040     QString _fstype;
0041     bool _bdbnosync;
0042     bool _bdbautologremove;
0043     bool _pre_1_5_compat;
0044     bool _pre_1_6_compat;
0045     bool _pre_1_8_compat;
0046 
0047 public:
0048     CreateRepoParameter()
0049         : _fstype(QLatin1String("fsfs"))
0050         , _bdbnosync(false)
0051         , _bdbautologremove(true)
0052         , _pre_1_5_compat(false)
0053         , _pre_1_6_compat(false)
0054         , _pre_1_8_compat(false)
0055     {
0056     }
0057 
0058     /** path to create
0059      * default is emtpy
0060      */
0061     const QString &path() const
0062     {
0063         return _path;
0064     }
0065     /** path to create
0066      * default is emtpy
0067      */
0068     CreateRepoParameter &path(const QString &path)
0069     {
0070         _path = path;
0071         return *this;
0072     }
0073     /** fs type of repository
0074      *
0075      * default is "fsfs"
0076      */
0077     const QString &fstype() const
0078     {
0079         return _fstype;
0080     }
0081     /** fs type of repository
0082      *
0083      * default is "fsfs"
0084      */
0085     CreateRepoParameter &fstype(const QString &fstype)
0086     {
0087         _fstype = fstype;
0088         return *this;
0089     }
0090     /** switch of syncing of bdb
0091      *
0092      * default is false
0093      */
0094     bool bdbnosync() const
0095     {
0096         return _bdbnosync;
0097     }
0098     /** switch of syncing of bdb
0099      *
0100      * default is false
0101      */
0102     CreateRepoParameter &bdbnosync(bool b)
0103     {
0104         _bdbnosync = b;
0105         return *this;
0106     }
0107     /** bdb automatic remove log
0108      *
0109      * default is true
0110      */
0111     bool bdbautologremove() const
0112     {
0113         return _bdbautologremove;
0114     }
0115     /** bdb automatic remove log
0116      *
0117      * default is true
0118      */
0119     CreateRepoParameter &bdbautologremove(bool b)
0120     {
0121         _bdbautologremove = b;
0122         return *this;
0123     }
0124 
0125     /** default is false */
0126     bool pre15_compat() const
0127     {
0128         return _pre_1_5_compat;
0129     }
0130     /** default is false */
0131     CreateRepoParameter &pre15_compat(bool b)
0132     {
0133         _pre_1_5_compat = b;
0134         return *this;
0135     }
0136     /** default is false */
0137     bool pre16_compat() const
0138     {
0139         return _pre_1_6_compat;
0140     }
0141     /** default is false */
0142     CreateRepoParameter &pre16_compat(bool b)
0143     {
0144         _pre_1_6_compat = b;
0145         return *this;
0146     }
0147     /** default is false */
0148     bool pre18_compat() const
0149     {
0150         return _pre_1_8_compat;
0151     }
0152     /** default is false */
0153     CreateRepoParameter &pre18_compat(bool b)
0154     {
0155         _pre_1_8_compat = b;
0156         return *this;
0157     }
0158 };
0159 
0160 } // namespace repository
0161 } // namespace svn