/* Offer a basic form of progress tracing */
-static int
-default_progressfn (debuginfod_client *c, long a, long b)
+int
+debuginfod_default_progressfn (debuginfod_client *c, long a, long b)
{
const char* url = debuginfod_get_url (c);
int len = 0;
if (client != NULL)
{
if (getenv(DEBUGINFOD_PROGRESS_ENV_VAR))
- client->progressfn = default_progressfn;
+ client->progressfn = debuginfod_default_progressfn;
if (getenv(DEBUGINFOD_VERBOSE_ENV_VAR))
client->verbose_fd = STDERR_FILENO;
else
const char* value,
char **path);
+int debuginfod_default_progressfn(debuginfod_client *c, long a, long b);
+
typedef int (*debuginfod_progressfn_t)(debuginfod_client *c, long a, long b);
void debuginfod_set_progressfn(debuginfod_client *c,
debuginfod_progressfn_t fn);
OPTIONAL FUNCTIONS
.BI "typedef int (*debuginfod_progressfn_t)(debuginfod_client *" client ","
-.BI " long a, long b);"
+.BI " long " a ", long " b ");"
.BI "void debuginfod_set_progressfn(debuginfod_client *" client ","
.BI " debuginfod_progressfn_t " progressfn ");"
+.BI "int debuginfod_default_progressfn(debuginfod_client *" client ","
+.BI " long " a ", long " b ");"
.BI "void debuginfod_set_verbose_fd(debuginfod_client *" client ","
.BI " int " fd ");"
.BI "void debuginfod_set_user_data(debuginfod_client *" client ","
possible. Consequently, the \fBdebuginfod_find_*\fP() function will
likely return with an error, but might still succeed.
+.BR debuginfod_default_progressfn ()
+is the progress callback function set by the debuginfod client library
+when the
+.B DEBUGINFOD_PROGRESS
+environment variable is set and no progressfn is explicitly set. For more
+information see
+.B DEBUGINFOD_PROGRESS
+below. Custom progress callback functions may call
+.BR debuginfod_default_progressfn ()
+directly to report download status.
+
.SS "VERBOSE OUTPUT"
The \fBdebuginfod_find_*\fP() functions may use several techniques