X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fcross.h;h=99c6bc29979c3a938c2a91b40f858c2d6a49e3b4;hb=47d83b296248119d04b9226fd51a67e2fd3faac5;hp=cc066488a9b4cac9312cbeb84b2a797566139222;hpb=152197adf5b060602ecdd99e6f272c4e8b2b410e;p=dcpomatic.git diff --git a/src/lib/cross.h b/src/lib/cross.h index cc066488a..99c6bc299 100644 --- a/src/lib/cross.h +++ b/src/lib/cross.h @@ -31,7 +31,6 @@ #include #include #include -#include #ifdef DCPOMATIC_WINDOWS #define WEXITSTATUS(w) (w) @@ -54,8 +53,7 @@ extern boost::filesystem::path disk_writer_path (); extern void maybe_open_console (); #endif extern boost::filesystem::path resources_path (); -extern boost::filesystem::path xsd_path (); -extern boost::filesystem::path tags_path (); +extern boost::filesystem::path libdcp_resources_path (); extern FILE * fopen_boost (boost::filesystem::path, std::string); extern int dcpomatic_fseek (FILE *, int64_t, int); extern void start_batch_converter (); @@ -65,20 +63,14 @@ extern int avio_open_boost (AVIOContext** s, boost::filesystem::path file, int f extern boost::filesystem::path home_directory (); extern bool running_32_on_64 (); extern void unprivileged (); -extern boost::filesystem::path config_path (); +extern boost::filesystem::path config_path (boost::optional version); extern boost::filesystem::path directory_containing_executable (); +extern boost::filesystem::path fix_long_path (boost::filesystem::path path); +extern bool show_in_file_manager (boost::filesystem::path dir, boost::filesystem::path select); namespace dcpomatic { std::string get_process_id (); } -class PrivilegeEscalator -{ -public: - PrivilegeEscalator (); - ~PrivilegeEscalator (); - - static bool test; -}; /** @class Waker * @brief A class which tries to keep the computer awake on various operating systems. @@ -146,4 +138,28 @@ private: void disk_write_finished (); + +struct OSXMediaPath +{ + bool real; ///< true for a "real" disk, false for a synthesized APFS one + std::vector parts; ///< parts of the media path after the : +}; + + +struct OSXDisk +{ + std::string device; + boost::optional vendor; + boost::optional model; + OSXMediaPath media_path; + bool whole; + std::vector mount_points; + unsigned long size; +}; + + +boost::optional analyse_osx_media_path (std::string path); +std::vector osx_disks_to_drives (std::vector disks); + + #endif