19 |
|
|
20 |
|
#include "BeepRemote.hpp" |
21 |
|
#include "MediaFolder.hpp" |
22 |
+ |
#include "Share.hpp" |
23 |
|
|
24 |
|
class DecentralizedMedia : public waf::Server |
25 |
|
{ |
29 |
|
_H<api::Thread> block; |
30 |
|
_H<api::Process> process; |
31 |
|
mutable _H<dbi::Connection> connection; |
32 |
< |
const ext::RedBlackSet<ext::String>& extensions/*, shares*/; |
32 |
> |
const ext::RedBlackSet<ext::String>& extensions; |
33 |
> |
ext::RedBlackMap<ext::String, _H<Share> > sharesByPath; |
34 |
> |
ext::RedBlackMap<ext::String, ext::RedBlackMap<ext::String, _H<Share> > > sharesByHost; |
35 |
|
void Media(ios::Reader& media); |
36 |
|
void Media(const _H<xml::Node>& folder, const api::Path& path, const api::Path& root); |
34 |
– |
ext::String Share(const ext::String& host, const ext::String& share); |
37 |
|
int Destroy() { return process->Join(); } |
38 |
|
protected: |
39 |
|
virtual void Process(const net::Http::Request& request, net::Http::Response& response); |