Introduce priority classes for jobs

This commit is contained in:
Martin Willi
2011-05-16 15:24:12 +02:00
parent dfe9bad981
commit f77203bbfb
18 changed files with 147 additions and 3 deletions
@@ -137,6 +137,14 @@ static void execute(private_mediation_job_t *this)
destroy(this);
}
/**
* Implementation of job_t.get_priority.
*/
static job_priority_t get_priority(private_mediation_job_t *this)
{
return JOB_PRIO_MEDIUM;
}
/**
* Creates an empty mediation job
*/
@@ -146,6 +154,7 @@ static private_mediation_job_t *mediation_job_create_empty()
/* interface functions */
this->public.job_interface.execute = (void (*) (job_t *)) execute;
this->public.job_interface.get_priority = (job_priority_t (*) (job_t *)) get_priority;
this->public.job_interface.destroy = (void (*) (job_t *)) destroy;
/* private variables */