Ardour  8.12
inflater.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2022 Paul Davis <paul@linuxaudiosystems.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __libpbd_inflater_h__
20 #define __libpbd_inflater_h__
21 
22 #include <string>
23 
24 #include "pbd/file_archive.h"
25 #include "pbd/libpbd_visibility.h"
26 #include "pbd/progress.h"
27 
28 namespace PBD {
29  class Thread;
30 }
31 
32 namespace PBD {
33 
35 {
36  public:
37  Inflater (std::string const & archive_path, std::string const & destdir);
39 
40  int start ();
41  bool running() const { return thread != 0; }
42  int status() const { return _status; }
43 
44  PBD::Signal1<void, float> Progress;
45 
46 private:
48  int _status;
49  std::string archive_path;
50  std::string destdir;
51 
53 
54  void set_overall_progress (float p);
55 };
56 
57 } /* namespace */
58 
59 #endif
Inflater(std::string const &archive_path, std::string const &destdir)
int status() const
Definition: inflater.h:42
bool running() const
Definition: inflater.h:41
PBD::Thread * thread
Definition: inflater.h:47
void threaded_inflate()
std::string archive_path
Definition: inflater.h:49
std::string destdir
Definition: inflater.h:50
void set_overall_progress(float p)
PBD::Signal1< void, float > Progress
Definition: inflater.h:44
#define LIBPBD_API
Definition: axis_view.h:42