Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
md_result.h
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  */
16 
17 #ifndef mod_md_md_result_h
18 #define mod_md_md_result_h
19 
20 struct md_json_t;
21 struct md_t;
22 
23 typedef struct md_result_t md_result_t;
24 
25 typedef void md_result_change_cb(md_result_t *result, void *data);
26 
27 struct md_result_t {
29  const char *md_name;
31  const char *problem;
32  const char *detail;
33  const struct md_json_t *subproblems;
34  const char *activity;
38 };
39 
41 md_result_t *md_result_md_make(apr_pool_t *p, const char *md_name);
42 void md_result_reset(md_result_t *result);
43 
44 void md_result_activity_set(md_result_t *result, const char *activity);
45 void md_result_activity_setn(md_result_t *result, const char *activity);
46 void md_result_activity_printf(md_result_t *result, const char *fmt, ...);
47 
48 void md_result_set(md_result_t *result, apr_status_t status, const char *detail);
50  const char *problem, const char *detail,
51  const struct md_json_t *subproblems);
53  const char *problem, const char *fmt, ...);
54 
55 #define MD_RESULT_LOG_ID(logno) "urn:org:apache:httpd:log:"logno
56 
57 void md_result_printf(md_result_t *result, apr_status_t status, const char *fmt, ...);
58 
59 void md_result_delay_set(md_result_t *result, apr_time_t ready_at);
60 
62 struct md_json_t *md_result_to_json(const md_result_t *result, apr_pool_t *p);
63 
64 int md_result_cmp(const md_result_t *r1, const md_result_t *r2);
65 
66 void md_result_assign(md_result_t *dest, const md_result_t *src);
67 void md_result_dup(md_result_t *dest, const md_result_t *src);
68 
69 void md_result_log(md_result_t *result, unsigned int level);
70 
71 void md_result_on_change(md_result_t *result, md_result_change_cb *cb, void *data);
72 
73 #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:36
void md_result_printf(md_result_t *result, apr_status_t status, const char *fmt,...)
Definition: md.h:74
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_set(md_result_t *result, apr_status_t status, const char *detail)
apr_pool_t * p
Definition: md_result.h:28
const char * detail
Definition: md_result.h:32
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_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:30
const char * md_name
Definition: md_result.h:29
struct md_json_t * md_result_to_json(const md_result_t *result, apr_pool_t *p)
apr_int64_t apr_time_t
Definition: apr_time.h:45
const char * activity
Definition: md_result.h:34
void md_result_dup(md_result_t *dest, const md_result_t *src)
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:31
void md_result_delay_set(md_result_t *result, apr_time_t ready_at)
Definition: md_result.h:27
apr_pool_t * p
const struct md_json_t * subproblems
Definition: md_result.h:33
apr_time_t ready_at
Definition: md_result.h:35
void md_result_activity_setn(md_result_t *result, const char *activity)
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)
int status
Definition: mod_dav.h:141
void * on_change_data
Definition: md_result.h:37
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
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)