diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-02-27 09:51:29 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-02-27 09:51:29 +0100 |
| commit | 2c65a2c6b02924df720f55c6e96e2e201d404c0c (patch) | |
| tree | d5103d1d2fa92099a71553d4523138617c1e0bbd /backend/pkgtools.h | |
| parent | 5875f6ac9ad2191eb761157fb94cb73bc671a9f0 (diff) | |
| download | katja-2c65a2c6b02924df720f55c6e96e2e201d404c0c.tar.gz | |
Rename Glib primitive types to standard C types
Diffstat (limited to 'backend/pkgtools.h')
| -rw-r--r-- | backend/pkgtools.h | 42 |
1 files changed, 23 insertions, 19 deletions
diff --git a/backend/pkgtools.h b/backend/pkgtools.h index cedf315..b590232 100644 --- a/backend/pkgtools.h +++ b/backend/pkgtools.h @@ -1,36 +1,40 @@ -#ifndef __SLACK_PKGTOOLS_H -#define __SLACK_PKGTOOLS_H - +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ +#pragma once + +#include <cstdint> #include <glib-object.h> #include <pk-backend.h> +#include "utils.h" namespace slack { class Pkgtools { public: - const gchar *get_name () const noexcept; - const gchar *get_mirror () const noexcept; - guint8 get_order () const noexcept; - gboolean is_blacklisted (const gchar *pkg) const noexcept; + const char *get_name () const noexcept; + const char *get_mirror () const noexcept; + std::uint8_t get_order () const noexcept; + bool is_blacklisted (const char *pkg) const noexcept; virtual ~Pkgtools () noexcept; - gboolean download (PkBackendJob *job, - gchar *dest_dir_name, gchar *pkg_name) noexcept; - void install (PkBackendJob *job, gchar *pkg_name) noexcept; + bool download (JobData *job_data, + char *dest_dir_name, char *pkg_name) noexcept; + void install (JobData *job_data, char *pkg_name) noexcept; - virtual GSList *collect_cache_info (const gchar *tmpl) noexcept = 0; - virtual void generate_cache (PkBackendJob *job, - const gchar *tmpl) noexcept = 0; + virtual GSList *collect_cache_info (const char *tmpl) noexcept = 0; + virtual void generate_cache (JobData *job_data, + const char *tmpl) noexcept = 0; protected: - gchar *name = NULL; - gchar *mirror = NULL; - guint8 order; - GRegex *blacklist = NULL; + char *name = nullptr; + char *mirror = nullptr; + std::uint8_t order; + GRegex *blacklist = nullptr; }; } - -#endif /* __SLACK_PKGTOOLS_H */ |
