mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Expose is_* methods on tasks.
This commit is contained in:
parent
7c27f116ad
commit
88333ac785
5 changed files with 53 additions and 3 deletions
|
@ -356,6 +356,18 @@ pub unsafe extern "C" fn tc_task_is_active(task: *mut TCTask) -> bool {
|
|||
wrap(task, |task| task.is_active())
|
||||
}
|
||||
|
||||
/// Check if a task is blocked (depends on at least one other task).
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn tc_task_is_blocked(task: *mut TCTask) -> bool {
|
||||
wrap(task, |task| task.is_blocked())
|
||||
}
|
||||
|
||||
/// Check if a task is blocking (at least one other task depends on it).
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn tc_task_is_blocking(task: *mut TCTask) -> bool {
|
||||
wrap(task, |task| task.is_blocking())
|
||||
}
|
||||
|
||||
/// Check if a task has the given tag. If the tag is invalid, this function will return false, as
|
||||
/// that (invalid) tag is not present. No error will be reported via `tc_task_error`.
|
||||
#[no_mangle]
|
||||
|
|
|
@ -789,6 +789,16 @@ bool tc_task_is_waiting(struct TCTask *task);
|
|||
*/
|
||||
bool tc_task_is_active(struct TCTask *task);
|
||||
|
||||
/**
|
||||
* Check if a task is blocked (depends on at least one other task).
|
||||
*/
|
||||
bool tc_task_is_blocked(struct TCTask *task);
|
||||
|
||||
/**
|
||||
* Check if a task is blocking (at least one other task depends on it).
|
||||
*/
|
||||
bool tc_task_is_blocking(struct TCTask *task);
|
||||
|
||||
/**
|
||||
* Check if a task has the given tag. If the tag is invalid, this function will return false, as
|
||||
* that (invalid) tag is not present. No error will be reported via `tc_task_error`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue