/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
* @brief Utility methods.
*/
+
+#include "array_data.h"
#include "types.h"
-#include "data.h"
#include "local_time.h"
-#include <boost/shared_ptr.hpp>
+#include <asdcp/KM_log.h>
+#include <memory>
#include <boost/function.hpp>
#include <boost/filesystem.hpp>
#include <boost/optional.hpp>
extern std::string make_uuid ();
extern std::string make_digest (boost::filesystem::path filename, boost::function<void (float)>);
-extern std::string make_digest (Data data);
+extern std::string make_digest (ArrayData data);
extern bool empty_or_white_space (std::string s);
extern bool ids_equal (std::string a, std::string b);
extern std::string remove_urn_uuid (std::string raw);
-extern void init ();
+extern void init (boost::optional<boost::filesystem::path> tags_directory = boost::optional<boost::filesystem::path>());
extern int base64_decode (std::string const & in, unsigned char* out, int out_length);
extern boost::optional<boost::filesystem::path> relative_to_root (boost::filesystem::path root, boost::filesystem::path file);
extern void indent (xmlpp::Element* element, int initial);
extern bool day_less_than_or_equal (LocalTime a, LocalTime b);
extern bool day_greater_than_or_equal (LocalTime a, LocalTime b);
-extern std::string unique_string (std::list<std::string> existing, std::string base);
+extern std::string unique_string (std::vector<std::string> existing, std::string base);
+extern ASDCP::Dictionary const* asdcp_smpte_dict;
+
+
+class ASDCPErrorSuspender
+{
+public:
+ ASDCPErrorSuspender();
+ ~ASDCPErrorSuspender();
+
+private:
+ Kumu::LogEntryList _log;
+ Kumu::ILogSink& _old;
+ Kumu::EntryListLogSink* _sink;
+};
+
}