#include <Task.h>
Public Member Functions | |
bool | Run (FUNCPTR function, int arg) |
bool | Restart (void) |
bool | Delete (void) |
bool | Suspend (void) |
bool | Resume (void) |
bool | Verify (void) |
int | GetPriority (void) |
void | SetPriority (int priority) |
char * | GetName (void) |
int | GetID (void) |
bool Task::Run | ( | FUNCPTR | function, | |
int | arg | |||
) |
Runs this task. If it is already running or unable to start, it fails and returns false.
bool Task::Restart | ( | void | ) |
Restarts a running task. If the task isn't started, it starts it. If the task is running and we are unable to kill the previous instance, returns false.
bool Task::Delete | ( | void | ) |
Kills the running task. Returns true on success false if the task doesn't exist or we are unable to kill it.
bool Task::Suspend | ( | void | ) |
Pauses a running task. Returns true on success, false if unable to pause or the task isn't running.
bool Task::Resume | ( | void | ) |
Resumes a paused task. Returns true on success, false if unable to resume or if the task isn't running/paused.
bool Task::Verify | ( | void | ) |
Verifies a task is running.
int Task::GetPriority | ( | void | ) |
Gets the priority of a task. Range: ? to ???
void Task::SetPriority | ( | int | priority | ) |
Sets the priority of the task. Range: ? to ???
char * Task::GetName | ( | void | ) |
Returns the name of the task.
int Task::GetID | ( | void | ) |
Returns the task ID of this task.