OpenDNSSEC-signer  2.0.2
Data Structures | Typedefs | Enumerations | Functions
task.h File Reference
#include "config.h"
#include <ldns/ldns.h>
#include "status.h"
#include "signer/zone.h"

Go to the source code of this file.

Data Structures

struct  task_struct
 

Typedefs

typedef enum task_id_enum task_id
 
typedef struct task_struct task_type
 

Enumerations

enum  task_id_enum {
  TASK_NONE = 0, TASK_SIGNCONF, TASK_READ, TASK_NSECIFY,
  TASK_SIGN, TASK_WRITE
}
 

Functions

task_typetask_create (task_id what, time_t when, void *zone)
 
int task_compare (const void *a, const void *b)
 
char * task2str (task_type *task, char *buftask)
 
const char * task_what2str (task_id what)
 
const char * task_who2str (task_type *task)
 
void task_log (task_type *task)
 
void task_cleanup (task_type *task)
 

Typedef Documentation

§ task_id

typedef enum task_id_enum task_id

Definition at line 46 of file task.h.

§ task_type

typedef struct task_struct task_type

Definition at line 48 of file task.h.

Enumeration Type Documentation

§ task_id_enum

Tasks.

Enumerator
TASK_NONE 
TASK_SIGNCONF 
TASK_READ 
TASK_NSECIFY 
TASK_SIGN 
TASK_WRITE 

Definition at line 38 of file task.h.

Function Documentation

§ task2str()

char* task2str ( task_type task,
char *  buftask 
)

Convert task to string.

Parameters
[in]tasktask
[out]bufferto store string-based task in
Returns
string-format task

Convert task to string.

Definition at line 155 of file task.c.

References task_struct::flush, task_what2str(), task_who2str(), task_struct::what, and task_struct::when.

§ task_cleanup()

void task_cleanup ( task_type task)

Clean up task.

Parameters
[in]tasktask

Clean up task.

Definition at line 213 of file task.c.

§ task_compare()

int task_compare ( const void *  a,
const void *  b 
)

Compare tasks.

Parameters
[in]aone task
[in]banother task
Returns
int -1, 0 or 1

Compare tasks.

Definition at line 73 of file task.c.

References zone_struct::apex, task_struct::what, task_struct::when, and task_struct::zone.

§ task_create()

task_type* task_create ( task_id  what,
time_t  when,
void *  zone 
)

Create a new task.

Parameters
[in]whattask identifier
[in]whenscheduled time
[in]zonezone reference
Returns
task_type* created task

Create a new task.

Definition at line 48 of file task.c.

References task_struct::backoff, task_struct::flush, task_struct::halted, task_struct::halted_when, task_struct::interrupt, TASK_NONE, task_struct::what, task_struct::when, and task_struct::zone.

§ task_log()

void task_log ( task_type task)

Log task.

Parameters
[in]tasktask

Log task.

Definition at line 192 of file task.c.

References task_struct::when.

§ task_what2str()

const char* task_what2str ( task_id  what)

String-format of who.

Parameters
[in]whattask identifier
Returns
const char* string-format of what

String-format of what.

Definition at line 107 of file task.c.

References TASK_NONE, TASK_READ, TASK_SIGN, TASK_SIGNCONF, and TASK_WRITE.

Referenced by task2str().

§ task_who2str()

const char* task_who2str ( task_type task)

String-format of who.

Parameters
[in]tasktask
Returns
const char* string-format of who

String-format of who.

Definition at line 137 of file task.c.

References zone_struct::name, and task_struct::zone.

Referenced by task2str().