used shared_ptr<Source>, somewhat successfully
[ardour.git] / libs / ardour / ardour / source_factory.h
1 #ifndef __ardour_source_factory_h__
2 #define __ardour_source_factory_h__
3
4 #include <string>
5 #include <stdint.h>
6 #include <sigc++/sigc++.h>
7 #include <boost/shared_ptr.hpp>
8
9 #include <ardour/source.h>
10 #include <ardour/audiofilesource.h>
11
12 class XMLNode;
13
14 namespace ARDOUR {
15
16 class SourceFactory {
17   public:
18         static sigc::signal<void,boost::shared_ptr<Source> > SourceCreated;
19
20         static boost::shared_ptr<Source> create (const XMLNode& node);
21
22         // MIDI sources will have to be hacked in here somehow
23         static boost::shared_ptr<Source> createReadable (std::string idstr, AudioFileSource::Flag flags, bool announce = true);
24         static boost::shared_ptr<Source> createWritable (std::string name, bool destructive, jack_nframes_t rate, bool announce = true);
25 };
26
27 }
28
29 #endif /* __ardour_source_factory_h__ */