OpenDNSSEC-signer
1.4.1
Main Page
Data Structures
Files
File List
Globals
signer
src
scheduler
task.h
Go to the documentation of this file.
1
/*
2
* $Id: task.h 6181 2012-02-21 14:12:17Z matthijs $
3
*
4
* Copyright (c) 2009 NLNet Labs. All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
* 1. Redistributions of source code must retain the above copyright
10
* notice, this list of conditions and the following disclaimer.
11
* 2. Redistributions in binary form must reproduce the above copyright
12
* notice, this list of conditions and the following disclaimer in the
13
* documentation and/or other materials provided with the distribution.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
*
27
*/
28
34
#ifndef SCHEDULER_TASK_H
35
#define SCHEDULER_TASK_H
36
37
#include "config.h"
38
#include "
shared/allocator.h
"
39
40
#include <ldns/ldns.h>
41
42
enum
task_id_enum
{
43
TASK_NONE
= 0,
44
TASK_SIGNCONF
,
/* ods-signer update */
45
TASK_READ
,
/* ods-signer sign */
46
TASK_NSECIFY
,
47
TASK_SIGN
,
/* ods-signer flush */
48
TASK_WRITE
49
};
50
typedef
enum
task_id_enum
task_id
;
51
55
typedef
struct
task_struct
task_type
;
56
struct
task_struct
{
57
allocator_type
*
allocator
;
58
task_id
what
;
59
task_id
interrupt
;
60
task_id
halted
;
61
time_t
when
;
62
time_t
halted_when
;
63
time_t
backoff
;
64
int
flush
;
65
void
*
zone
;
66
};
67
76
task_type
*
task_create
(
task_id
what, time_t when,
void
* zone);
77
84
void
task_backup
(FILE* fd,
task_type
* task);
85
93
int
task_compare
(
const
void
* a,
const
void
* b);
94
102
char
*
task2str
(
task_type
* task,
char
* buftask);
103
110
const
char
*
task_what2str
(
task_id
what);
111
117
const
char
*
task_who2str
(
task_type
* task);
118
125
void
task_print
(FILE* out,
task_type
* task);
126
132
void
task_log
(
task_type
* task);
133
139
void
task_cleanup
(
task_type
* task);
140
141
#endif
/* SCHEDULER_TASK_H */
Generated on Wed Jul 17 2013 07:14:23 for OpenDNSSEC-signer by
1.8.4