projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move file utility function into pbd/file_utils.h and into PBD namespace
[ardour.git]
/
libs
/
pbd
/
pbd
/
file_manager.h
diff --git
a/libs/pbd/pbd/file_manager.h
b/libs/pbd/pbd/file_manager.h
index 2d3650c2c57bda7cc9e1d46b584fcc87b57246da..01c9a8ee316cc5e36db6c5746e88dcd5f2f03140 100644
(file)
--- a/
libs/pbd/pbd/file_manager.h
+++ b/
libs/pbd/pbd/file_manager.h
@@
-51,7
+51,10
@@
public:
FileDescriptor (std::string const &, bool);
virtual ~FileDescriptor () {}
FileDescriptor (std::string const &, bool);
virtual ~FileDescriptor () {}
+ const std::string& path() const { return _path; }
+
void release ();
void release ();
+ virtual void set_path (const std::string&);
/** Emitted when the file is closed */
PBD::Signal0<void> Closed;
/** Emitted when the file is closed */
PBD::Signal0<void> Closed;
@@
-71,7
+74,7
@@
protected:
int _refcount; ///< number of active users of this file
double _last_used; ///< monotonic time that this file was last allocated
int _refcount; ///< number of active users of this file
double _last_used; ///< monotonic time that this file was last allocated
- std::string _
name; ///< filename
+ std::string _
path; ///< file path
bool _writeable; ///< true if it should be opened writeable, otherwise false
FileManager* manager ();
bool _writeable; ///< true if it should be opened writeable, otherwise false
FileManager* manager ();
@@
-86,7
+89,7
@@
private:
class FdFileDescriptor : public FileDescriptor
{
public:
class FdFileDescriptor : public FileDescriptor
{
public:
- FdFileDescriptor (std::string const &
, bool, mode_t
);
+ FdFileDescriptor (std::string const &
file_name, bool writeable, mode_t mode
);
~FdFileDescriptor ();
int allocate ();
~FdFileDescriptor ();
int allocate ();
@@
-107,7
+110,7
@@
private:
class StdioFileDescriptor : public FileDescriptor
{
public:
class StdioFileDescriptor : public FileDescriptor
{
public:
- StdioFileDescriptor (std::string const &
, std::string const &
);
+ StdioFileDescriptor (std::string const &
file_name, std::string const & mode
);
~StdioFileDescriptor ();
FILE* allocate ();
~StdioFileDescriptor ();
FILE* allocate ();