24 #ifndef DIGIKAM_DLNA_SERVER_DELEGATE_H
25 #define DIGIKAM_DLNA_SERVER_DELEGATE_H
51 #include "PltMediaServer.h"
52 #include "PltMediaCache.h"
70 bool use_cache =
false);
74 static NPT_String BuildSafeResourceUri(
const NPT_HttpUrl& base_uri,
76 const char* file_path);
83 NPT_Result OnBrowseMetadata(PLT_ActionReference& action,
84 const char* object_id,
86 NPT_UInt32 starting_index,
87 NPT_UInt32 requested_count,
88 const char* sort_criteria,
89 const PLT_HttpRequestContext& context)
override;
91 NPT_Result OnBrowseDirectChildren(PLT_ActionReference& action,
92 const char* object_id,
94 NPT_UInt32 starting_index,
95 NPT_UInt32 requested_count,
96 const char* sort_criteria,
97 const PLT_HttpRequestContext& context)
override;
99 NPT_Result OnSearchContainer(PLT_ActionReference& action,
100 const char* object_id,
101 const char* search_criteria,
103 NPT_UInt32 starting_index,
104 NPT_UInt32 requested_count,
105 const char* sort_criteria,
106 const PLT_HttpRequestContext& context)
override;
108 NPT_Result ProcessFileRequest(NPT_HttpRequest& request,
109 const NPT_HttpRequestContext& context,
110 NPT_HttpResponse& response)
override;
113 virtual NPT_Result ExtractResourcePath(
const NPT_HttpUrl& url,
114 NPT_String& file_path);
116 virtual NPT_String BuildResourceUri(
const NPT_HttpUrl& base_uri,
118 const char* file_path);
120 virtual NPT_Result ServeFile(
const NPT_HttpRequest& request,
121 const NPT_HttpRequestContext& context,
122 NPT_HttpResponse& response,
123 const NPT_String& file_path);
125 virtual NPT_Result GetFilePath(
const char* object_id,
126 NPT_String& filepath);
128 virtual bool ProcessFile(
const NPT_String&,
129 const char* filter =
nullptr);
131 virtual PLT_MediaObject* BuildFromFilePath(
const NPT_String& filepath,
132 const PLT_HttpRequestContext& context,
133 bool with_count =
true,
134 bool keep_extension_in_title =
false,
139 friend class PLT_MediaItem;
Definition: datefolderview.cpp:43