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