remove Glib::ustring from libardour; allow any characters except '/' and '\' in paths...
[ardour.git] / libs / ardour / ardour / export_timespan.h
1 /*
2     Copyright (C) 2008 Paul Davis
3     Author: Sakari Bergen
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License
16     along with this program; if not, write to the Free Software
17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 */
20
21 #ifndef __ardour_export_timespan_h__
22 #define __ardour_export_timespan_h__
23
24 #include <map>
25 #include <list>
26 #include <string>
27
28 #include "ardour/export_status.h"
29 #include "ardour/export_channel.h"
30 #include "ardour/ardour.h"
31
32 namespace ARDOUR
33 {
34
35 class ExportChannel;
36 class ExportTempFile;
37
38 class ExportTimespan
39 {
40   private:
41         typedef boost::shared_ptr<ExportStatus> ExportStatusPtr;
42
43   private:
44         friend class ExportElementFactory;
45         ExportTimespan (ExportStatusPtr status, nframes_t frame_rate);
46
47   public:
48         ~ExportTimespan ();
49
50         std::string name () const { return _name; }
51         void set_name (std::string name) { _name = name; }
52
53         std::string range_id () const { return _range_id; }
54         void set_range_id (std::string range_id) { _range_id = range_id; }
55
56         void set_range (nframes_t start, nframes_t end);
57         nframes_t get_length () const { return end_frame - start_frame; }
58         nframes_t get_start () const { return start_frame; }
59         nframes_t get_end () const { return end_frame; }
60
61   private:
62
63         ExportStatusPtr status;
64
65         nframes_t      start_frame;
66         nframes_t      end_frame;
67         nframes_t      position;
68         nframes_t      frame_rate;
69
70         std::string _name;
71         std::string _range_id;
72
73 };
74
75 } // namespace ARDOUR
76
77 #endif /* __ardour_export_timespan_h__ */