projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove C++11'ism
[ardour.git]
/
libs
/
ardour
/
ardour
/
file_source.h
diff --git
a/libs/ardour/ardour/file_source.h
b/libs/ardour/ardour/file_source.h
index 52dca18feb4505741fcfe6f77038fb6d6691fb96..7452e9fb5baca961d96d5d2293194124ee04d8c5 100644
(file)
--- a/
libs/ardour/ardour/file_source.h
+++ b/
libs/ardour/ardour/file_source.h
@@
-28,7
+28,7
@@
namespace ARDOUR {
namespace ARDOUR {
-class MissingSource : public std::exception
+class
LIBARDOUR_API
MissingSource : public std::exception
{
public:
MissingSource (const std::string& p, DataType t) throw ()
{
public:
MissingSource (const std::string& p, DataType t) throw ()
@@
-42,11
+42,11
@@
class MissingSource : public std::exception
};
/** A source associated with a file on disk somewhere */
};
/** A source associated with a file on disk somewhere */
-class FileSource : virtual public Source {
+class
LIBARDOUR_API
FileSource : virtual public Source {
public:
public:
- virtual ~FileSource ()
{}
+ virtual ~FileSource ()
;
-
virtual
const std::string& path() const { return _path; }
+ const std::string& path() const { return _path; }
virtual bool safe_file_extension (const std::string& path) const = 0;
virtual bool safe_file_extension (const std::string& path) const = 0;
@@
-56,9
+56,12
@@
public:
void mark_immutable_except_write();
void mark_nonremovable ();
void mark_immutable_except_write();
void mark_nonremovable ();
- const std::string& take_id () const { return _take_id; }
+ const std::string&
take_id () const { return _take_id; }
bool within_session () const { return _within_session; }
uint16_t channel() const { return _channel; }
bool within_session () const { return _within_session; }
uint16_t channel() const { return _channel; }
+ float gain() const { return _gain; }
+
+ virtual void set_gain (float g, bool temporarily = false) { _gain = g; }
int set_state (const XMLNode&, int version);
int set_state (const XMLNode&, int version);
@@
-74,14
+77,26
@@
public:
void inc_use_count ();
bool removable () const;
void inc_use_count ();
bool removable () const;
+ bool is_stub () const;
const std::string& origin() const { return _origin; }
const std::string& origin() const { return _origin; }
+ void set_origin (std::string const& o) { _origin = o; }
virtual void set_path (const std::string&);
virtual void set_path (const std::string&);
-
+ void replace_file (const std::string&);
+
static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
-protected:
+ void existence_check ();
+ virtual void prevent_deletion ();
+
+ /** Rename the file on disk referenced by this source to \param newname
+ */
+ int rename (const std::string& name);
+
+ virtual void close () = 0;
+
+ protected:
FileSource (Session& session, DataType type,
const std::string& path,
const std::string& origin,
FileSource (Session& session, DataType type,
const std::string& path,
const std::string& origin,
@@
-100,9
+115,7
@@
protected:
uint16_t _channel;
bool _within_session;
std::string _origin;
uint16_t _channel;
bool _within_session;
std::string _origin;
- bool _open;
-
- void prevent_deletion ();
+ float _gain;
};
} // namespace ARDOUR
};
} // namespace ARDOUR