summaryrefslogtreecommitdiff
path: root/backend/tests/definitions.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-02-27 09:51:29 +0100
committerEugen Wissner <belka@caraus.de>2026-02-27 09:51:29 +0100
commit2c65a2c6b02924df720f55c6e96e2e201d404c0c (patch)
treed5103d1d2fa92099a71553d4523138617c1e0bbd /backend/tests/definitions.cc
parent5875f6ac9ad2191eb761157fb94cb73bc671a9f0 (diff)
downloadkatja-2c65a2c6b02924df720f55c6e96e2e201d404c0c.tar.gz
Rename Glib primitive types to standard C types
Diffstat (limited to 'backend/tests/definitions.cc')
-rw-r--r--backend/tests/definitions.cc68
1 files changed, 37 insertions, 31 deletions
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 <cstdint>
#include "pk-backend.h"
#include <pk-backend-job.h>
-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;
}