#include "pbd/statefuldestructible.h"
#include "pbd/xml++.h"
+#include "ardour/libardour_visibility.h"
+
namespace ARDOUR {
/** Represents metadata associated to a Session
* Metadata can be accessed and edited via this class.
* Exported files can also be tagged with this data.
*/
-class SessionMetadata : public PBD::StatefulDestructible
+class LIBARDOUR_API SessionMetadata : public PBD::StatefulDestructible
{
public:
+ //singleton instance:
+ static SessionMetadata *Metadata() { if (_metadata == NULL) _metadata = new SessionMetadata(); return _metadata; }
+
SessionMetadata ();
~SessionMetadata ();
uint32_t year () const;
std::string grouping () const;
+ std::string barcode () const;
std::string title () const;
std::string subtitle () const;
std::string genre () const;
+ std::string instructor () const;
+ std::string course () const;
+
+ std::string user_name () const;
+ std::string user_email () const;
+ std::string user_web () const;
+ std::string organization () const;
+ std::string country () const;
+
/*** Editing ***/
void set_comment (const std::string &);
void set_copyright (const std::string &);
void set_year (uint32_t);
void set_grouping (const std::string &);
+ void set_barcode (const std::string &);
void set_title (const std::string &);
void set_subtitle (const std::string &);
void set_genre (const std::string &);
+ void set_instructor (const std::string &);
+ void set_course (const std::string &);
+
+ void set_user_name (const std::string &);
+ void set_user_email (const std::string &);
+ void set_user_web (const std::string &);
+ void set_organization (const std::string &);
+ void set_country (const std::string &);
+
/*** Serialization ***/
- XMLNode & get_state ();
- int set_state (const XMLNode &, int version);
+ XMLNode & get_state (); //serializes stuff in the map, to be stored in session file
+ XMLNode & get_user_state (); //serializes stuff in the user_map, to be stored in user's config file
+ int set_state (const XMLNode &, int version_num);
private:
+ static SessionMetadata *_metadata; //singleton instance
+
typedef std::pair<std::string, std::string> Property;
typedef std::map<std::string, std::string> PropertyMap;
PropertyMap map;
+ PropertyMap user_map;
XMLNode * get_xml (const std::string & name);