1 |
douglas |
676 |
// Google Tron |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _GoogleTron_hpp_ |
8 |
|
|
#define _GoogleTron_hpp_ |
9 |
|
|
|
10 |
|
|
#include <cxx/platform.hpp> |
11 |
|
|
|
12 |
|
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
#include <api/threads.hpp> |
17 |
douglas |
681 |
#include <mta/threadset.hpp> |
18 |
douglas |
676 |
|
19 |
douglas |
686 |
#include "FileSystem.hpp" |
20 |
douglas |
688 |
#include "Blog.hpp" |
21 |
douglas |
676 |
|
22 |
|
|
class GoogleTron |
23 |
|
|
{ |
24 |
douglas |
677 |
bool working; |
25 |
douglas |
688 |
const cse::String &sitemap, &base; |
26 |
douglas |
676 |
// XXX: I want ext::Queue! |
27 |
|
|
std::queue<Url> queue; |
28 |
douglas |
677 |
api::ThreadMutex queueLock; |
29 |
douglas |
681 |
_S<api::Thread> output; |
30 |
|
|
mta::ThreadSet<> threads; |
31 |
douglas |
676 |
int Output(); |
32 |
douglas |
686 |
int FileSystem_(const _R<FileSystemCommand> &command); |
33 |
douglas |
688 |
int Blog_(const _R<BlogCommand> &command); |
34 |
douglas |
676 |
public: |
35 |
douglas |
688 |
GoogleTron(const cse::String &sitemap, const cse::String &base, const _L<_R<Command> > &commands); |
36 |
douglas |
676 |
~GoogleTron(); |
37 |
|
|
}; |
38 |
|
|
|
39 |
|
|
#endif//_GoogleTron_hpp_ |