kiwix-serve integration

This commit is contained in:
luddens
2019-05-10 17:23:55 +02:00
committed by Matthieu Gautier
parent 3721d7439d
commit 5dc96d7145
4 changed files with 93 additions and 1 deletions

33
include/kiwixserve.h Normal file
View File

@ -0,0 +1,33 @@
#ifndef KIWIXLIB_KIWIX_SERVE_H_
#define KIWIXLIB_KIWIX_SERVE_H_
#ifdef _WIN32
// winsock2.h need to be included before windows.h (included by curl.h)
# include <winsock2.h>
#endif
#include <sys/types.h>
#include <unistd.h>
#include <memory>
#include "tools/pathTools.h"
class Subprocess;
namespace kiwix {
class KiwixServe
{
public:
KiwixServe();
~KiwixServe();
void run();
void shutDown();
private:
std::unique_ptr<Subprocess> mp_kiwixServe;
int m_port;
};
}; //end namespace kiwix
#endif // KIWIXLIB_KIWIX_SERVE_H_