digiKam
DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate Class Reference
+ Inheritance diagram for DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate:

Public Member Functions

void addAlbumsOnServer (const MediaServerMap &map)
 
 DLNAMediaServerDelegate (const char *url_root, bool use_cache=false)
 Constructor and destructor. More...
 
 ~DLNAMediaServerDelegate () override
 

Static Public Member Functions

static NPT_String BuildSafeResourceUri (const NPT_HttpUrl &base_uri, const char *host, const char *file_path)
 Class methods. More...
 

Protected Member Functions

virtual PLT_MediaObject * BuildFromFilePath (const NPT_String &filepath, const PLT_HttpRequestContext &context, bool with_count=true, bool keep_extension_in_title=false, bool allip=false)
 
virtual NPT_String BuildResourceUri (const NPT_HttpUrl &base_uri, const char *host, const char *file_path)
 
virtual NPT_Result ExtractResourcePath (const NPT_HttpUrl &url, NPT_String &file_path)
 Overridable methods. More...
 
virtual NPT_Result GetFilePath (const char *object_id, NPT_String &filepath)
 
NPT_Result OnBrowseDirectChildren (PLT_ActionReference &action, const char *object_id, const char *filter, NPT_UInt32 starting_index, NPT_UInt32 requested_count, const char *sort_criteria, const PLT_HttpRequestContext &context) override
 
NPT_Result OnBrowseMetadata (PLT_ActionReference &action, const char *object_id, const char *filter, NPT_UInt32 starting_index, NPT_UInt32 requested_count, const char *sort_criteria, const PLT_HttpRequestContext &context) override
 PLT_MediaServerDelegate methods. More...
 
NPT_Result OnSearchContainer (PLT_ActionReference &action, const char *object_id, const char *search_criteria, const char *filter, NPT_UInt32 starting_index, NPT_UInt32 requested_count, const char *sort_criteria, const PLT_HttpRequestContext &context) override
 
virtual bool ProcessFile (const NPT_String &, const char *filter=nullptr)
 
NPT_Result ProcessFileRequest (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) override
 
virtual NPT_Result ServeFile (const NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response, const NPT_String &file_path)
 

Protected Attributes

Private *const d
 

Friends

class PLT_MediaItem
 

Detailed Description

File Media Server Delegate for digiKam. The DLNAMediaServerDelegate class is based on PLT_MediaServerDelegate implementation for a file system backed Media Server.

Constructor & Destructor Documentation

◆ DLNAMediaServerDelegate()

DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::DLNAMediaServerDelegate ( const char *  url_root,
bool  use_cache = false 
)
explicit

Constructor and destructor.

References d.

◆ ~DLNAMediaServerDelegate()

DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::~DLNAMediaServerDelegate ( )
override

References d.

Member Function Documentation

◆ addAlbumsOnServer()

void DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::addAlbumsOnServer ( const MediaServerMap map)

References d.

◆ BuildFromFilePath()

PLT_MediaObject * DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::BuildFromFilePath ( const NPT_String &  filepath,
const PLT_HttpRequestContext &  context,
bool  with_count = true,
bool  keep_extension_in_title = false,
bool  allip = false 
)
protectedvirtual

◆ BuildResourceUri()

NPT_String DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::BuildResourceUri ( const NPT_HttpUrl &  base_uri,
const char *  host,
const char *  file_path 
)
protectedvirtual

References BuildSafeResourceUri().

Referenced by BuildFromFilePath().

◆ BuildSafeResourceUri()

NPT_String DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::BuildSafeResourceUri ( const NPT_HttpUrl &  base_uri,
const char *  host,
const char *  file_path 
)
static

Class methods.

Referenced by BuildResourceUri().

◆ ExtractResourcePath()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::ExtractResourcePath ( const NPT_HttpUrl &  url,
NPT_String &  file_path 
)
protectedvirtual

Overridable methods.

References d.

Referenced by ProcessFileRequest().

◆ GetFilePath()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::GetFilePath ( const char *  object_id,
NPT_String &  filepath 
)
protectedvirtual

◆ OnBrowseDirectChildren()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::OnBrowseDirectChildren ( PLT_ActionReference &  action,
const char *  object_id,
const char *  filter,
NPT_UInt32  starting_index,
NPT_UInt32  requested_count,
const char *  sort_criteria,
const PLT_HttpRequestContext &  context 
)
overrideprotected

◆ OnBrowseMetadata()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::OnBrowseMetadata ( PLT_ActionReference &  action,
const char *  object_id,
const char *  filter,
NPT_UInt32  starting_index,
NPT_UInt32  requested_count,
const char *  sort_criteria,
const PLT_HttpRequestContext &  context 
)
overrideprotected

PLT_MediaServerDelegate methods.

References BuildFromFilePath(), and GetFilePath().

◆ OnSearchContainer()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::OnSearchContainer ( PLT_ActionReference &  action,
const char *  object_id,
const char *  search_criteria,
const char *  filter,
NPT_UInt32  starting_index,
NPT_UInt32  requested_count,
const char *  sort_criteria,
const PLT_HttpRequestContext &  context 
)
overrideprotected

References GetFilePath().

◆ ProcessFile()

bool DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::ProcessFile ( const NPT_String &  ,
const char *  filter = nullptr 
)
protectedvirtual

Referenced by OnBrowseDirectChildren().

◆ ProcessFileRequest()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::ProcessFileRequest ( NPT_HttpRequest &  request,
const NPT_HttpRequestContext &  context,
NPT_HttpResponse &  response 
)
overrideprotected

References d, ExtractResourcePath(), and ServeFile().

◆ ServeFile()

NPT_Result DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::ServeFile ( const NPT_HttpRequest &  request,
const NPT_HttpRequestContext &  context,
NPT_HttpResponse &  response,
const NPT_String &  file_path 
)
protectedvirtual

Friends And Related Function Documentation

◆ PLT_MediaItem

friend class PLT_MediaItem
friend

Referenced by BuildFromFilePath().

Member Data Documentation

◆ d

Private* const DigikamGenericMediaServerPlugin::DLNAMediaServerDelegate::d
protected

The documentation for this class was generated from the following files: