Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
output.h
Go to the documentation of this file.
1/*
2 * The MIT License (MIT)
3 *
4 * Copyright © 2015-2016 Franklin "Snaipe" Mathieu <http://snai.pe/>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24/*!
25 * @file
26 * @brief Report functions
27 *****************************************************************************/
28#ifndef CRITERION_OUTPUT_H_
29#define CRITERION_OUTPUT_H_
30
31#include "stats.h"
32
33typedef void criterion_reporter (FILE *stream, struct criterion_global_stats *);
34
35/**
36 * Register an output provider.
37 *
38 * @param[in] name The name the output provider shall be registered as.
39 * @param[in] reporter The output reporting function.
40 * @returns 1 if no output provider is registered at that name, 0 otherwise,
41 * and -1 on error.
42 */
44
45/**
46 * Use an output provider to write a report in a specific path.
47 *
48 * @param[in] provider The name of a registered output provider.
49 * @param[in] path The path to the file to write the report to.
50 * @returns -1 on error.
51 */
52CR_API int criterion_add_output(const char *provider, const char *path);
53
54#endif /* !CRITERION_OUTPUT_H_ */
#define CR_API
Definition common.h:128
const char * name
Definition lsqlite3.c:2154
void criterion_reporter(FILE *stream, struct criterion_global_stats *)
Definition output.h:33
CR_API int criterion_register_output_provider(const char *name, criterion_reporter *reporter)
CR_API int criterion_add_output(const char *provider, const char *path)
Test stats.