#ifndef COMMAND_H
#define COMMAND_H

#include <functional>
#include <future>

#include <QVariant>

namespace nemo_interface {

class Task {
public:
  typedef std::function<QVariant(void)> Functor;

  Task(const Functor &onExec);
  Task(Functor &&onExec);

  QVariant exec();
  void setOnExec(const Functor &onExec);
  void setOnExec(Functor &&onExec);

private:
  Functor _onExec;
};
} // namespace nemo_interface

#endif // COMMAND_H
