tahoma2d/toonz/sources/toonzfarm/include/tfarmexecutor.h
Toshihiro Shimizu 890dddabbd first commit
2016-03-19 02:57:51 +09:00

45 lines
786 B
C++

#ifndef TFARMEXECUTOR_H
#define TFARMEXECUTOR_H
#include "ttcpip.h"
#include <string>
using std::string;
//==============================================================================
#ifdef TFARMAPI
#undef TFARMAPI
#endif
#ifdef WIN32
#ifdef TFARM_EXPORTS
#define TFARMAPI __declspec(dllexport)
#else
#define TFARMAPI __declspec(dllimport)
#endif
#else
#define TFARMAPI
#endif
//==============================================================================
class TFARMAPI TFarmExecutor : public TTcpIpServer
{
public:
TFarmExecutor(int port);
virtual ~TFarmExecutor() {}
// TTcpIpServer overrides
void onReceive(int socket, const QString &data);
protected:
virtual QString execute(const vector<QString> &argv) = 0;
private:
TTcpIpServer *m_tcpipServer;
};
#endif