#include "Homepage.hpp"
#include <fstream>
#include <iostream>
#include <string>

#define FILENAME "content/homepage.xml"

using namespace XmlRpc;
using namespace mole;
using namespace meth;

Homepage::Homepage(XmlRpcServer * s) : XmlRpcServerMethod("homepage", s) {}

void
Homepage::execute(XmlRpcValue& params, XmlRpcValue& result){
#if 0
    std::string line;
    fstream fd(FILENAME, ios::in);
    if (fd){
	while (getLine(fd, line)){
	    std::cout << line;
	}

	fd.close();
    } else {
	std::cerr << "Error opening " << FILENAME << " for homepage" << std::endl;
    }
#endif
}

std::string
Homepage::help(){
    return std::string ("Surprise!");
}
