From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/playlist/pl_entry.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Src/playlist/pl_entry.h (limited to 'Src/playlist/pl_entry.h') diff --git a/Src/playlist/pl_entry.h b/Src/playlist/pl_entry.h new file mode 100644 index 00000000..852b584d --- /dev/null +++ b/Src/playlist/pl_entry.h @@ -0,0 +1,61 @@ +#ifndef NULLSOFT_ML_PLAYLISTS_PL_ENTRY_H +#define NULLSOFT_ML_PLAYLISTS_PL_ENTRY_H + +#include "ifc_plentryinfo.h" +#include +#include +#include + + +class pl_entry +{ +public: + pl_entry() {} + pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms ); + pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, int p_size ); + pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, ifc_plentryinfo *p_info ); + pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, int p_size, ifc_plentryinfo *p_info ); + pl_entry( const wchar_t *p_filename, const wchar_t *p_title, int p_length_ms, + const wchar_t *mediahash, const wchar_t *metahash, + const wchar_t *cloud_id, const wchar_t *cloud_status, + const wchar_t *cloud_devices ); + ~pl_entry(); + + size_t GetFilename( wchar_t *p_filename, size_t filenameCch ); + size_t GetTitle( wchar_t *title, size_t titleCch ); + int GetLengthInMilliseconds(); + int GetSizeInBytes(); + size_t GetExtendedInfo( const wchar_t *metadata, wchar_t *info, size_t infoCch ); + + void SetFilename( const wchar_t *p_filename ); + void SetTitle( const wchar_t *title ); + void SetLengthMilliseconds( int length ); + void SetSizeBytes( int size ); + + void SetMediahash( const wchar_t *mediahash ); + void SetMetahash( const wchar_t *metahash ); + void SetCloudID( const wchar_t *cloud_id ); + void SetCloudStatus( const wchar_t *cloud_status ); + void SetCloudDevices( const wchar_t *cloud_devices ); + + bool isLocal() const { return _is_local_file; } + + wchar_t *filename = 0; + wchar_t *filetitle = 0; + + wchar_t *mediahash = 0; + wchar_t *metahash = 0; + wchar_t *cloud_id = 0; + wchar_t *cloud_status = 0; + wchar_t *cloud_devices = 0; + + std::map _extended_infos; + + int length = -1; + int size = 0; + + bool cached = false; + bool _is_local_file = false; +}; + +#endif \ No newline at end of file -- cgit