X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Futil.h;h=b66832654d02812da85ef9e04b908df11831395c;hb=a08e7eeac87eca63d250007bd9b89e11b0352108;hp=2f3b810a0ae64975f501e276a2cef2117885a6df;hpb=7c47ecfd45bca468bf1a53f31d6f21cb00f73f26;p=libdcp.git diff --git a/src/util.h b/src/util.h index 2f3b810a..b6683265 100644 --- a/src/util.h +++ b/src/util.h @@ -40,6 +40,7 @@ #include "types.h" #include "data.h" +#include "local_time.h" #include #include #include @@ -47,6 +48,8 @@ #include #include +#define LIBDCP_UNUSED(x) (void)(x) + namespace xmlpp { class Element; class Node; @@ -69,10 +72,15 @@ extern void init (); extern int base64_decode (std::string const & in, unsigned char* out, int out_length); extern boost::optional relative_to_root (boost::filesystem::path root, boost::filesystem::path file); extern FILE * fopen_boost (boost::filesystem::path, std::string); -extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 65536); +extern std::string file_to_string (boost::filesystem::path, uintmax_t max_length = 1048576); extern std::string private_key_fingerprint (std::string key); extern xmlpp::Node* find_child (xmlpp::Node const * node, std::string name); extern std::string openjpeg_version(); +extern std::string spaces (int n); +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 existing, std::string base); }