From 2c65a2c6b02924df720f55c6e96e2e201d404c0c Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 27 Feb 2026 09:51:29 +0100 Subject: Rename Glib primitive types to standard C types --- backend/tests/definitions.cc | 68 ++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 31 deletions(-) (limited to 'backend/tests/definitions.cc') diff --git a/backend/tests/definitions.cc b/backend/tests/definitions.cc index 7906dd8..37f6134 100644 --- a/backend/tests/definitions.cc +++ b/backend/tests/definitions.cc @@ -1,27 +1,33 @@ +/* + * 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/. + */ +#include #include "pk-backend.h" #include -gpointer +void * pk_backend_job_get_user_data (PkBackendJob *job) { - return NULL; + return nullptr; } void -pk_backend_job_set_user_data (PkBackendJob *job, gpointer user_data) +pk_backend_job_set_user_data (PkBackendJob *job, void *user_data) { } void -pk_backend_job_set_allow_cancel (PkBackendJob *job, gboolean allow_cancel) +pk_backend_job_set_allow_cancel (PkBackendJob *job, bool allow_cancel) { } void pk_backend_job_package (PkBackendJob *job, PkInfoEnum info, - const gchar *package_id, - const gchar *summary) + const char *package_id, + const char *summary) { } @@ -31,62 +37,62 @@ pk_backend_job_set_status (PkBackendJob *job, PkStatusEnum status) } void -pk_backend_job_set_percentage (PkBackendJob *job, guint percentage) +pk_backend_job_set_percentage (PkBackendJob *job, unsigned percentage) { } void pk_backend_job_error_code (PkBackendJob *job, - PkErrorEnum error_code, const gchar *format, ...) + PkErrorEnum error_code, const char *format, ...) { } void pk_backend_job_files (PkBackendJob *job, - const gchar *package_id, gchar **files) + const char *package_id, char **files) { } void pk_backend_job_details (PkBackendJob *job, - const gchar *package_id, - const gchar *summary, - const gchar *license, + const char *package_id, + const char *summary, + const char *license, PkGroupEnum group, - const gchar *description, - const gchar *url, - gulong size, - guint64 download_size) + const char *description, + const char *url, + unsigned long size, + std::uint64_t download_size) { } void pk_backend_job_update_detail (PkBackendJob *job, - const gchar *package_id, - gchar **updates, - gchar **obsoletes, - gchar **vendor_urls, - gchar **bugzilla_urls, - gchar **cve_urls, + const char *package_id, + char **updates, + char **obsoletes, + char **vendor_urls, + char **bugzilla_urls, + char **cve_urls, PkRestartEnum restart, - const gchar *update_text, - const gchar *changelog, + const char *update_text, + const char *changelog, PkUpdateStateEnum state, - const gchar *issued, - const gchar *updated) + const char *issued, + const char *updated) { } -gboolean +bool pk_backend_job_thread_create (PkBackendJob *job, PkBackendJobThreadFunc func, - gpointer user_data, + void *user_data, GDestroyNotify destroy_func) { - return FALSE; + return false; } -gboolean pk_directory_remove_contents (const gchar *directory) +bool pk_directory_remove_contents (const char *directory) { - return TRUE; + return true; } -- cgit v1.2.3