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

0001 /***************************************************************************
0002  *   Copyright (C) 2006-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 SVNREPOSITORYDATA_H
0025 #define SVNREPOSITORYDATA_H
0026 
0027 #include <svnqt/apr.h>
0028 #include <svnqt/helper.h>
0029 #include <svnqt/pool.h>
0030 #include <svnqt/revision.h>
0031 #include <svnqt/svnqt_defines.h>
0032 
0033 #include <QString>
0034 
0035 #include <svn_error.h>
0036 #include <svn_repos.h>
0037 
0038 namespace svn
0039 {
0040 
0041 namespace repository
0042 {
0043 
0044 class Repository;
0045 class RepositoryListener;
0046 class CreateRepoParameter;
0047 /**
0048     @author Rajko Albrecht <ral@alwins-world.de>
0049 */
0050 class SVNQT_NOEXPORT RepositoryData
0051 {
0052     friend class Repository;
0053 
0054 public:
0055     explicit RepositoryData(RepositoryListener *);
0056 
0057     virtual ~RepositoryData();
0058     void Close();
0059     svn_error_t *Open(const QString &);
0060     svn_error_t *CreateOpen(const CreateRepoParameter &params);
0061 
0062     void reposFsWarning(const QString &msg);
0063     svn_error_t *dump(const QString &output, const svn::Revision &start, const svn::Revision &end, bool incremental, bool use_deltas);
0064     svn_error_t *loaddump(const QString &dump, svn_repos_load_uuid uuida, const QString &parentFolder, bool usePre, bool usePost, bool validateProps);
0065     static svn_error_t *hotcopy(const QString &src, const QString &dest, bool cleanlogs);
0066 
0067 protected:
0068     Pool m_Pool;
0069     svn_repos_t *m_Repository;
0070     RepositoryListener *m_Listener;
0071 
0072 private:
0073     static void warning_func(void *baton, svn_error_t *err);
0074     static void repo_notify_func(void *baton, const svn_repos_notify_t *notify, apr_pool_t *scratch_pool);
0075     static svn_error_t *cancel_func(void *baton);
0076 };
0077 
0078 }
0079 
0080 }
0081 
0082 #endif