i2pd/android/jni/DaemonAndroid.h

88 lines
1.5 KiB
C
Raw Normal View History

2016-07-09 20:54:11 +00:00
#ifndef DAEMON_ANDROID_H
#define DAEMON_ANDROID_H
2016-07-10 01:42:42 +00:00
#include <string>
2016-07-09 20:54:11 +00:00
namespace i2p
{
namespace android
{
class DaemonAndroidImpl
{
public:
DaemonAndroidImpl ();
~DaemonAndroidImpl ();
2016-07-10 01:42:42 +00:00
//typedef void (*runningChangedCallback)();
2016-07-09 20:54:11 +00:00
/**
* @return success
*/
bool init(int argc, char* argv[]);
void start();
void stop();
void restart();
2016-07-10 01:42:42 +00:00
//void setRunningCallback(runningChangedCallback cb);
//bool isRunning();
2016-07-09 20:54:11 +00:00
private:
2016-07-10 01:42:42 +00:00
//void setRunning(bool running);
2016-07-09 20:54:11 +00:00
private:
//QMutex* mutex;
2016-07-10 01:42:42 +00:00
//bool m_IsRunning;
//runningChangedCallback m_RunningChangedCallback;
2016-07-09 20:54:11 +00:00
};
/**
2016-07-10 01:42:42 +00:00
* returns "ok" if daemon init failed
* returns errinfo if daemon initialized and started okay
2016-07-09 20:54:11 +00:00
*/
std::string start();
2016-07-09 20:54:11 +00:00
// stops the daemon
void stop();
/*
class Worker : public QObject
{
Q_OBJECT
public:
Worker (DaemonAndroidImpl& daemon);
private:
DaemonAndroidImpl& m_Daemon;
public slots:
void startDaemon();
void restartDaemon();
void stopDaemon();
signals:
void resultReady();
};
class Controller : public QObject
{
Q_OBJECT
QThread workerThread;
public:
Controller(DaemonAndroidImpl& daemon);
~Controller();
private:
DaemonAndroidImpl& m_Daemon;
public slots:
void handleResults(){}
signals:
void startDaemon();
void stopDaemon();
void restartDaemon();
};
*/
}
}
#endif // DAEMON_ANDROID_H