#include <pakfire/buildservice.h>
#include <pakfire/config.h>
#include <pakfire/ctx.h>
+#include <pakfire/downloader.h>
#include <pakfire/logging.h>
#include <pakfire/private.h>
#include <pakfire/string.h>
struct pakfire_ctx* ctx;
int nrefs;
+ // Configuration
char url[PATH_MAX];
char keytab[PATH_MAX];
+
+ // A HTTP Client
+ struct pakfire_downloader* httpclient;
};
static int pakfire_buildservice_setup(struct pakfire_buildservice* service) {
if (r)
goto ERROR;
+ // Setup the downloader
+ r = pakfire_downloader_create(&service->httpclient, service->ctx);
+ if (r)
+ goto ERROR;
+
ERROR:
if (config)
pakfire_config_unref(config);
}
static void pakfire_buildservice_free(struct pakfire_buildservice* service) {
+ if (service->httpclient)
+ pakfire_downloader_unref(service->httpclient);
if (service->ctx)
pakfire_ctx_unref(service->ctx);