#include <cstdio>
#include <fstream>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/algorithm/string.hpp>
#include <fcgiapp.h>
#include <megatree/metadata.h>
#include <megatree/tree_common.h>
#include <megatree/node_file.h>
#include <megatree/storage.h>
#include <megatree/storage_factory.h>
Go to the source code of this file.
Defines | |
#define | DUMP_VAR(x) |
#define | NL "<br />\n" |
Typedefs | |
typedef std::map< std::string, boost::shared_ptr < megatree::Storage > > | StorageMap |
Functions | |
void | emitBox (FCGX_Stream *out) |
void | emitDump (FCGX_Stream *out, char **envp) |
void | emitFile (boost::shared_ptr< FCGX_Request > req, const std::string &tree, const std::string &filename) |
void | emitPong (FCGX_Stream *out) |
void | emitTrees (FCGX_Stream *out, const std::vector< std::string > &trees) |
std::map< std::string, std::string > | getParams (char *query_string) |
int | main (int argc, char **argv) |
void | sendResult (boost::shared_ptr< FCGX_Request > req, const std::string &filename, const megatree::ByteVec &file_data) |
std::vector< std::string > & | split (const std::string &s, char delim, std::vector< std::string > &elems) |
std::vector< std::string > | split (const std::string &s, char delim) |
Variables | |
StorageMap | g_storage_map |
#define DUMP_VAR | ( | x | ) |
FCGX_FPrintF(out, "<tr><td>%s</td><td>%s</td></tr>\n", \ #x, FCGX_GetParam(#x, envp) ? FCGX_GetParam(#x, envp) : "<null>")
Definition at line 43 of file server.cpp.
#define NL "<br />\n" |
Definition at line 41 of file server.cpp.
typedef std::map<std::string, boost::shared_ptr<megatree::Storage> > StorageMap |
Definition at line 14 of file server.cpp.
void emitBox | ( | FCGX_Stream * | out | ) |
Definition at line 79 of file server.cpp.
void emitDump | ( | FCGX_Stream * | out, |
char ** | envp | ||
) |
Definition at line 45 of file server.cpp.
void emitFile | ( | boost::shared_ptr< FCGX_Request > | req, |
const std::string & | tree, | ||
const std::string & | filename | ||
) |
Definition at line 119 of file server.cpp.
void emitPong | ( | FCGX_Stream * | out | ) |
Definition at line 18 of file server.cpp.
void emitTrees | ( | FCGX_Stream * | out, |
const std::vector< std::string > & | trees | ||
) |
Definition at line 26 of file server.cpp.
std::map<std::string, std::string> getParams | ( | char * | query_string | ) |
Definition at line 146 of file server.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 160 of file server.cpp.
void sendResult | ( | boost::shared_ptr< FCGX_Request > | req, |
const std::string & | filename, | ||
const megatree::ByteVec & | file_data | ||
) |
Definition at line 101 of file server.cpp.
std::vector<std::string>& split | ( | const std::string & | s, |
char | delim, | ||
std::vector< std::string > & | elems | ||
) |
Definition at line 130 of file server.cpp.
std::vector<std::string> split | ( | const std::string & | s, |
char | delim | ||
) |
Definition at line 140 of file server.cpp.
Definition at line 15 of file server.cpp.