|
Packit Service |
20376f |
#ifndef INCLUDE_cl_status_helpers_h__
|
|
Packit Service |
20376f |
#define INCLUDE_cl_status_helpers_h__
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
typedef struct {
|
|
Packit Service |
20376f |
int wrong_status_flags_count;
|
|
Packit Service |
20376f |
int wrong_sorted_path;
|
|
Packit Service |
20376f |
int entry_count;
|
|
Packit Service |
20376f |
const unsigned int* expected_statuses;
|
|
Packit Service |
20376f |
const char** expected_paths;
|
|
Packit Service |
20376f |
int expected_entry_count;
|
|
Packit Service |
20376f |
const char *file;
|
|
Packit Service |
20376f |
int line;
|
|
Packit Service |
20376f |
bool debug;
|
|
Packit Service |
20376f |
} status_entry_counts;
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#define status_counts_init(counts, paths, statuses) do { \
|
|
Packit Service |
20376f |
memset(&(counts), 0, sizeof(counts)); \
|
|
Packit Service |
20376f |
(counts).expected_statuses = (statuses); \
|
|
Packit Service |
20376f |
(counts).expected_paths = (paths); \
|
|
Packit Service |
20376f |
(counts).file = __FILE__; \
|
|
Packit Service |
20376f |
(counts).line = __LINE__; \
|
|
Packit Service |
20376f |
} while (0)
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
/* cb_status__normal takes payload of "status_entry_counts *" */
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
extern int cb_status__normal(
|
|
Packit Service |
20376f |
const char *path, unsigned int status_flags, void *payload);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
/* cb_status__count takes payload of "int *" */
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
extern int cb_status__count(const char *p, unsigned int s, void *payload);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
typedef struct {
|
|
Packit Service |
20376f |
int count;
|
|
Packit Service |
20376f |
unsigned int status;
|
|
Packit Service |
20376f |
bool debug;
|
|
Packit Service |
20376f |
} status_entry_single;
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
/* cb_status__single takes payload of "status_entry_single *" */
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
extern int cb_status__single(const char *p, unsigned int s, void *payload);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
/* cb_status__print takes optional payload of "int *" */
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
extern int cb_status__print(const char *p, unsigned int s, void *payload);
|
|
Packit Service |
20376f |
|
|
Packit Service |
20376f |
#endif
|