diff options
Diffstat (limited to 'debuginfod/debuginfod.h')
| -rw-r--r-- | debuginfod/debuginfod.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/debuginfod/debuginfod.h b/debuginfod/debuginfod.h index 6b1b1cc3..8d90838b 100644 --- a/debuginfod/debuginfod.h +++ b/debuginfod/debuginfod.h @@ -1,5 +1,5 @@ /* External declarations for the libdebuginfod client library. - Copyright (C) 2019 Red Hat, Inc. + Copyright (C) 2019-2020 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -33,6 +33,7 @@ #define DEBUGINFOD_URLS_ENV_VAR "DEBUGINFOD_URLS" #define DEBUGINFOD_CACHE_PATH_ENV_VAR "DEBUGINFOD_CACHE_PATH" #define DEBUGINFOD_TIMEOUT_ENV_VAR "DEBUGINFOD_TIMEOUT" +#define DEBUGINFOD_PROGRESS_ENV_VAR "DEBUGINFOD_PROGRESS" /* Handle for debuginfod-client connection. */ typedef struct debuginfod_client debuginfod_client; @@ -47,13 +48,13 @@ debuginfod_client *debuginfod_begin (void); /* Query the urls contained in $DEBUGINFOD_URLS for a file with the specified type and build id. If build_id_len == 0, the build_id is supplied as a lowercase hexadecimal string; otherwise - it is a binary blob of given legnth. + it is a binary blob of given length. If successful, return a file descriptor to the target, otherwise return a posix error code. If successful, set *path to a strdup'd copy of the name of the same file in the cache. Caller must free() it later. */ - + int debuginfod_find_debuginfo (debuginfod_client *client, const unsigned char *build_id, int build_id_len, @@ -74,6 +75,18 @@ typedef int (*debuginfod_progressfn_t)(debuginfod_client *c, long a, long b); void debuginfod_set_progressfn(debuginfod_client *c, debuginfod_progressfn_t fn); +/* Set the user parameter. */ +void debuginfod_set_user_data (debuginfod_client *client, void *value); + +/* Get the user parameter. */ +void* debuginfod_get_user_data (debuginfod_client *client); + +/* Get the current or last active URL, if known. */ +const char* debuginfod_get_url (debuginfod_client *client); + +/* Add an outgoing HTTP request "Header: Value". Copies string. */ +int debuginfod_add_http_header (debuginfod_client *client, const char* header); + /* Release debuginfod client connection context handle. */ void debuginfod_end (debuginfod_client *client); |
