1 | /* |
---|
2 | * Copyright 2018 Fiona Klute |
---|
3 | * |
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
5 | * you may not use this file except in compliance with the License. |
---|
6 | * You may obtain a copy of the License at |
---|
7 | * |
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
9 | * |
---|
10 | * Unless required by applicable law or agreed to in writing, software |
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
13 | * See the License for the specific language governing permissions and |
---|
14 | * limitations under the License. |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __MOD_GNUTLS_WATCHDOG_H__ |
---|
18 | #define __MOD_GNUTLS_WATCHDOG_H__ |
---|
19 | |
---|
20 | #include <httpd.h> |
---|
21 | #include <mod_watchdog.h> |
---|
22 | |
---|
23 | /** |
---|
24 | * Watchdog object including functions |
---|
25 | */ |
---|
26 | struct mgs_watchdog { |
---|
27 | APR_OPTIONAL_FN_TYPE(ap_watchdog_get_instance) *get_instance; |
---|
28 | APR_OPTIONAL_FN_TYPE(ap_watchdog_register_callback) *register_callback; |
---|
29 | APR_OPTIONAL_FN_TYPE(ap_watchdog_set_callback_interval) *set_callback_interval; |
---|
30 | ap_watchdog_t *wd; |
---|
31 | }; |
---|
32 | |
---|
33 | /** |
---|
34 | * Creates a new mgs_watchdog structure and initializes the |
---|
35 | * included `apr_watchdog_t` with the named singleton watchdog. |
---|
36 | * |
---|
37 | * @param s server reference for logging |
---|
38 | * @param name watchdog name |
---|
39 | * @param p memory pool for the watchdog |
---|
40 | * |
---|
41 | * @return pointer to the new mgs_watchdog, or `NULL` on error |
---|
42 | */ |
---|
43 | struct mgs_watchdog* mgs_new_singleton_watchdog(server_rec *s, char *name, |
---|
44 | apr_pool_t *p); |
---|
45 | |
---|
46 | #endif /* __MOD_GNUTLS_WATCHDOG_H__ */ |
---|