1 |
// Decentralized Media |
2 |
// |
3 |
// Douglas Thrift |
4 |
// |
5 |
// $Id$ |
6 |
|
7 |
#ifndef _DecentralizedMedia_hpp_ |
8 |
#define _DecentralizedMedia_hpp_ |
9 |
|
10 |
#include <menes/c++/platform.hpp> |
11 |
|
12 |
#ifdef MENES_PRAGMA_ONCE |
13 |
#pragma once |
14 |
#endif |
15 |
|
16 |
#include <menes/api/process.hpp> |
17 |
#include <menes/waf/server.hpp> |
18 |
#include <menes/xml/nodeset.hpp> |
19 |
|
20 |
#include "BeepRemote.hpp" |
21 |
#include "Library.hpp" |
22 |
#include "Player.hpp" |
23 |
|
24 |
class DecentralizedMedia : public waf::Server |
25 |
{ |
26 |
private: |
27 |
_R<api::Thread> block; |
28 |
mutable _R<Connector> connector; |
29 |
const ext::RedBlackSet<cse::String>& extensions; |
30 |
void Media(ios::Reader& media, const api::Address& host = api::Address()); |
31 |
void Media(const _R<xml::Node>& folder, const api::Path& path, const api::Path& root); |
32 |
protected: |
33 |
virtual void Process(const net::Http::Request& request, net::Http::Response& response); |
34 |
public: |
35 |
Library library; |
36 |
Player player; |
37 |
DecentralizedMedia(const cse::String& configuration, const ext::RedBlackSet<cse::String>& extensions, const ext::RedBlackSet<api::Path>& locals, int player); |
38 |
}; |
39 |
|
40 |
#endif//_DecentralizedMedia_hpp_ |