tahoma2d/toonz/sources/toonzfarm/tfarmclient/application.h

46 lines
885 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef APPLICATION_H
#define APPLICATION_H
// forward declarations
class TFarmController;
#include "tfilepath.h"
//------------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
class RenderFarmTasksObserver {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
virtual void onChange() = 0;
2016-03-19 06:57:51 +13:00
};
//------------------------------------------------------------------------------
2016-06-15 18:43:10 +12:00
class Application { // singleton
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
~Application();
static Application *instance();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void init();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
TFarmController *getController();
bool testControllerConnection() const;
void getControllerData(string &hostName, string &ipAddr, int &port) const;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
void setCurrentFolder(const TFilePath &fp);
TFilePath getCurrentFolder();
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
class Imp;
Imp *m_imp;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
Application();
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
// not implemented
Application(const Application &);
Application &operator=(const Application &);
2016-03-19 06:57:51 +13:00
};
#endif