Remove --ignore-process-events
[nagios-reports-module.git] / nagios / downtime.h
blobca514e8af6458a3f2993377a8c8db490bf7e4291
1 /*****************************************************************************
3 * DOWNTIME.H - Header file for scheduled downtime functions
5 * Copyright (c) 2001-2005 Ethan Galstad (nagios@nagios.org)
6 * Last Modified: 11-25-2005
8 * License:
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *****************************************************************************/
26 #ifndef _DOWNTIME_H
27 #define _DOWNTIME_H
29 #include "config.h"
30 #include "common.h"
31 #include "objects.h"
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
37 /* SCHEDULED_DOWNTIME_ENTRY structure */
38 typedef struct scheduled_downtime_struct{
39 int type;
40 char *host_name;
41 char *service_description;
42 time_t entry_time;
43 time_t start_time;
44 time_t end_time;
45 int fixed;
46 unsigned long triggered_by;
47 unsigned long duration;
48 unsigned long downtime_id;
49 char *author;
50 char *comment;
51 #ifdef NSCORE
52 unsigned long comment_id;
53 int is_in_effect;
54 int start_flex_downtime;
55 int incremented_pending_downtime;
56 #endif
57 struct scheduled_downtime_struct *next;
58 }scheduled_downtime;
62 #ifdef NSCORE
63 int initialize_downtime_data(char *); /* initializes scheduled downtime data */
64 int cleanup_downtime_data(char *); /* cleans up scheduled downtime data */
66 int add_new_downtime(int,char *,char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long *);
67 int add_new_host_downtime(char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long *);
68 int add_new_service_downtime(char *,char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long *);
70 int delete_host_downtime(unsigned long);
71 int delete_service_downtime(unsigned long);
72 int delete_downtime(int,unsigned long);
74 int schedule_downtime(int,char *,char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long *);
75 int unschedule_downtime(int,unsigned long);
77 int register_downtime(int,unsigned long);
78 int handle_scheduled_downtime(scheduled_downtime *);
79 int handle_scheduled_downtime_by_id(unsigned long);
81 int check_pending_flex_host_downtime(host *);
82 int check_pending_flex_service_downtime(service *);
84 int check_for_expired_downtime(void);
85 #endif
87 int add_host_downtime(char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long);
88 int add_service_downtime(char *,char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long);
89 int add_downtime(int,char *,char *,time_t,char *,char *,time_t,time_t,int,unsigned long,unsigned long,unsigned long);
91 scheduled_downtime *find_downtime(int,unsigned long);
92 scheduled_downtime *find_host_downtime(unsigned long);
93 scheduled_downtime *find_service_downtime(unsigned long);
95 void free_downtime_data(void); /* frees memory allocated to scheduled downtime list */
97 #ifdef __cplusplus
99 #endif
101 #endif