Go to the documentation of this file.
1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2  * contributor license agreements. See the NOTICE file distributed with
3  * this work for additional information regarding copyright ownership.
4  * The ASF licenses this file to You under the Apache License, Version 2.0
5  * (the "License"); you may not use this file except in compliance with
6  * the License. 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  */
17 #ifndef mod_md_md_result_h
18 #define mod_md_md_result_h
20 struct md_json_t;
21 struct md_t;
23 typedef struct md_result_t md_result_t;
25 typedef void md_result_change_cb(md_result_t *result, void *data);
26 typedef apr_status_t md_result_raise_cb(md_result_t *result, void *data, const char *event, apr_pool_t *p);
27 typedef void md_result_holler_cb(md_result_t *result, void *data, const char *event, apr_pool_t *p);
29 struct md_result_t {
31  const char *md_name;
33  const char *problem;
34  const char *detail;
35  const struct md_json_t *subproblems;
36  const char *activity;
44 };
48 void md_result_reset(md_result_t *result);
50 void md_result_activity_set(md_result_t *result, const char *activity);
51 void md_result_activity_setn(md_result_t *result, const char *activity);
52 void md_result_activity_printf(md_result_t *result, const char *fmt, ...);
54 void md_result_set(md_result_t *result, apr_status_t status, const char *detail);
56  const char *problem, const char *detail,
57  const struct md_json_t *subproblems);
59  const char *problem, const char *fmt, ...);
61 #define MD_RESULT_LOG_ID(logno) "urn:org:apache:httpd:log:"logno
63 void md_result_printf(md_result_t *result, apr_status_t status, const char *fmt, ...);
68 struct md_json_t *md_result_to_json(const md_result_t *result, apr_pool_t *p);
70 int md_result_cmp(const md_result_t *r1, const md_result_t *r2);
72 void md_result_assign(md_result_t *dest, const md_result_t *src);
73 void md_result_dup(md_result_t *dest, const md_result_t *src);
75 void md_result_log(md_result_t *result, unsigned int level);
77 void md_result_on_change(md_result_t *result, md_result_change_cb *cb, void *data);
79 /* events in the context of a result genesis */
81 apr_status_t md_result_raise(md_result_t *result, const char *event, apr_pool_t *p);
82 void md_result_holler(md_result_t *result, const char *event, apr_pool_t *p);
84 void md_result_on_raise(md_result_t *result, md_result_raise_cb *cb, void *data);
85 void md_result_on_holler(md_result_t *result, md_result_holler_cb *cb, void *data);
87 #endif /* mod_md_md_result_h */
void md_result_activity_printf(md_result_t *result, const char *fmt,...)
md_result_change_cb * on_change
Definition: md_result.h:38
void md_result_printf(md_result_t *result, apr_status_t status, const char *fmt,...)
Definition: md.h:76
void md_result_change_cb(md_result_t *result, void *data)
Definition: md_result.h:25
struct md_json_t md_json_t
Definition: md_json.h:29
void md_result_log(md_result_t *result, unsigned int level)
void md_result_on_raise(md_result_t *result, md_result_raise_cb *cb, void *data)
void md_result_set(md_result_t *result, apr_status_t status, const char *detail)
apr_pool_t * p
Definition: md_result.h:30
const char * detail
Definition: md_result.h:34
void md_result_on_change(md_result_t *result, md_result_change_cb *cb, void *data)
void md_result_problem_set(md_result_t *result, apr_status_t status, const char *problem, const char *detail, const struct md_json_t *subproblems)
md_result_raise_cb * on_raise
Definition: md_result.h:40
md_result_t * md_result_make(apr_pool_t *p, apr_status_t status)
md_result_t * md_result_md_make(apr_pool_t *p, const char *md_name)
apr_status_t status
Definition: md_result.h:32
const char * md_name
Definition: md_result.h:31
void md_result_holler(md_result_t *result, const char *event, apr_pool_t *p)
struct md_json_t * md_result_to_json(const md_result_t *result, apr_pool_t *p)
apr_status_t md_result_raise(md_result_t *result, const char *event, apr_pool_t *p)
apr_int64_t apr_time_t
Definition: apr_time.h:45
void md_result_holler_cb(md_result_t *result, void *data, const char *event, apr_pool_t *p)
Definition: md_result.h:27
const char * activity
Definition: md_result.h:36
void md_result_dup(md_result_t *dest, const md_result_t *src)
void * on_holler_data
Definition: md_result.h:43
void md_result_reset(md_result_t *result)
md_result_t * md_result_from_json(const struct md_json_t *json, apr_pool_t *p)
dav_error * src
Definition: mod_dav.h:186
const char * problem
Definition: md_result.h:33
void md_result_delay_set(md_result_t *result, apr_time_t ready_at)
Definition: md_result.h:29
apr_pool_t * p
const struct md_json_t * subproblems
Definition: md_result.h:35
apr_time_t ready_at
Definition: md_result.h:37
void md_result_activity_setn(md_result_t *result, const char *activity)
apr_status_t md_result_raise_cb(md_result_t *result, void *data, const char *event, apr_pool_t *p)
Definition: md_result.h:26
int md_result_cmp(const md_result_t *r1, const md_result_t *r2)
void md_result_activity_set(md_result_t *result, const char *activity)
void * on_change_data
Definition: md_result.h:39
void * on_raise_data
Definition: md_result.h:41
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
md_result_holler_cb * on_holler
Definition: md_result.h:42
int apr_status_t
Definition: apr_errno.h:44
void md_result_on_holler(md_result_t *result, md_result_holler_cb *cb, void *data)
void md_result_problem_printf(md_result_t *result, apr_status_t status, const char *problem, const char *fmt,...)
void md_result_assign(md_result_t *dest, const md_result_t *src)