PlayerTaskServiceProtocol.cpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #include "PlayerTaskServiceProtocol.h"
  2. PLAYER_NS_BEGIN
  3. std::string PlayerTask::getName() const
  4. {
  5. return _name;
  6. }
  7. std::string PlayerTask::getExecutePath() const
  8. {
  9. return _executePath;
  10. }
  11. std::string PlayerTask::getCommandLineArguments() const
  12. {
  13. return _commandLineArguments;
  14. }
  15. std::string PlayerTask::getOutput() const
  16. {
  17. return _output;
  18. }
  19. int PlayerTask::getState() const
  20. {
  21. return _state;
  22. }
  23. bool PlayerTask::isIdle() const
  24. {
  25. return _state == STATE_IDLE;
  26. }
  27. bool PlayerTask::isRunning() const
  28. {
  29. return _state == STATE_RUNNING;
  30. }
  31. bool PlayerTask::isCompleted() const
  32. {
  33. return _state == STATE_COMPLETED;
  34. }
  35. float PlayerTask::getLifetime() const
  36. {
  37. return _lifetime;
  38. }
  39. int PlayerTask::getResultCode() const
  40. {
  41. return _resultCode;
  42. }
  43. PlayerTask::PlayerTask(const std::string &name,
  44. const std::string &executePath,
  45. const std::string &commandLineArguments)
  46. : _name(name)
  47. , _executePath(executePath)
  48. , _commandLineArguments(commandLineArguments)
  49. , _lifetime(0)
  50. , _state(STATE_IDLE)
  51. , _resultCode(0)
  52. {
  53. }
  54. PLAYER_NS_END