diff options
author | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-02-07 09:49:59 +0100 |
---|---|---|
committer | Jan-Michael Brummer <jan.brummer@tabos.org> | 2023-03-27 16:31:58 +0200 |
commit | 0bd5a16259bb5274d0642aa98ae4c10d68b2479e (patch) | |
tree | e790bbdef16bd03b191d1c7b43de782422e4491e | |
parent | 3d2ae29f664dfe9312664e3c1abf9b38d01a3005 (diff) | |
download | libproxy-git-0bd5a16259bb5274d0642aa98ae4c10d68b2479e.tar.gz |
Code cleanup (#51)
Update header and minor cleanup
28 files changed, 121 insertions, 60 deletions
diff --git a/src/backend/dbus/dbus.c b/src/backend/dbus/dbus.c index 0e5b704..031f905 100644 --- a/src/backend/dbus/dbus.c +++ b/src/backend/dbus/dbus.c @@ -1,6 +1,6 @@ /* main.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/plugins/download-curl/download-curl.c b/src/backend/plugins/download-curl/download-curl.c index d848795..d26d62b 100644 --- a/src/backend/plugins/download-curl/download-curl.c +++ b/src/backend/plugins/download-curl/download-curl.c @@ -1,6 +1,6 @@ /* download-curl.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -30,6 +30,11 @@ static void px_download_iface_init (PxDownloadInterface *iface); G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); +struct _PxDownloadCurl { + GObject parent_instance; + CURL *curl; +}; + G_DEFINE_FINAL_TYPE_WITH_CODE (PxDownloadCurl, px_download_curl, G_TYPE_OBJECT, diff --git a/src/backend/plugins/download-curl/download-curl.h b/src/backend/plugins/download-curl/download-curl.h index 4b95140..545222c 100644 --- a/src/backend/plugins/download-curl/download-curl.h +++ b/src/backend/plugins/download-curl/download-curl.h @@ -1,6 +1,6 @@ /* download-curl.h * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,6 @@ #pragma once #include <glib.h> -#include <libpeas/peas.h> G_BEGIN_DECLS @@ -30,11 +29,6 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (PxDownloadCurl, px_download_curl, PX, DOWNLOAD_CURL, GObject) -struct _PxDownloadCurl { - GObject parent_instance; - CURL *curl; -}; - G_END_DECLS diff --git a/src/backend/plugins/download-curl/download-curl.plugin b/src/backend/plugins/download-curl/download-curl.plugin index 7aa75d6..1b10a83 100644 --- a/src/backend/plugins/download-curl/download-curl.plugin +++ b/src/backend/plugins/download-curl/download-curl.plugin @@ -1,6 +1,3 @@ [Plugin] -Authors=Jan-Michael Brummer <jan.brummer@tabos.org> -Copyright=Copyright © 2023 Jan-Michael Brummer -Description=Donwload data using cURL Module=download-curl Name=cURL
\ No newline at end of file diff --git a/src/backend/plugins/download-curl/meson.build b/src/backend/plugins/download-curl/meson.build index 29da33e..a1d8736 100644 --- a/src/backend/plugins/download-curl/meson.build +++ b/src/backend/plugins/download-curl/meson.build @@ -14,6 +14,7 @@ plugin_lib = shared_module( plugin_name, sources: plugin_src, include_directories: px_backend_inc, + c_args: px_backend_c_args, dependencies: [px_backend_dep, curl_dep], install_dir: join_paths(px_plugins_dir, plugin_name), install: true, diff --git a/src/backend/plugins/download-soup/download-soup.c b/src/backend/plugins/download-soup/download-soup.c index b1a7384..4b4aa42 100644 --- a/src/backend/plugins/download-soup/download-soup.c +++ b/src/backend/plugins/download-soup/download-soup.c @@ -1,6 +1,6 @@ /* download-soup.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -30,6 +30,12 @@ static void px_download_iface_init (PxDownloadInterface *iface); G_MODULE_EXPORT void peas_register_types (PeasObjectModule *module); +struct _PxDownloadSoup { + GObject parent_instance; + + SoupSession *session; +}; + G_DEFINE_FINAL_TYPE_WITH_CODE (PxDownloadSoup, px_download_soup, G_TYPE_OBJECT, diff --git a/src/backend/plugins/download-soup/download-soup.h b/src/backend/plugins/download-soup/download-soup.h index 26afd9e..fa95c46 100644 --- a/src/backend/plugins/download-soup/download-soup.h +++ b/src/backend/plugins/download-soup/download-soup.h @@ -1,6 +1,6 @@ /* download-soup.h * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,7 +22,6 @@ #pragma once #include <glib.h> -#include <libpeas/peas.h> G_BEGIN_DECLS @@ -30,12 +29,6 @@ G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (PxDownloadSoup, px_download_soup, PX, DOWNLOAD_SOUP, GObject) -struct _PxDownloadSoup { - GObject parent_instance; - - SoupSession *session; -}; - G_END_DECLS diff --git a/src/backend/plugins/download-soup/download-soup.plugin b/src/backend/plugins/download-soup/download-soup.plugin index 6e9cbb1..294b957 100644 --- a/src/backend/plugins/download-soup/download-soup.plugin +++ b/src/backend/plugins/download-soup/download-soup.plugin @@ -1,6 +1,3 @@ [Plugin] -Authors=Jan-Michael Brummer <jan.brummer@tabos.org> -Copyright=Copyright © 2023 Jan-Michael Brummer -Description=Donwload data using SOUP Module=download-soup Name=SOUP
\ No newline at end of file diff --git a/src/backend/plugins/download-soup/meson.build b/src/backend/plugins/download-soup/meson.build index 68cc288..db61aba 100644 --- a/src/backend/plugins/download-soup/meson.build +++ b/src/backend/plugins/download-soup/meson.build @@ -14,6 +14,7 @@ plugin_lib = shared_module( plugin_name, sources: plugin_src, include_directories: px_backend_inc, + c_args: px_backend_c_args, dependencies: [px_backend_dep, soup_dep], install_dir: join_paths(px_plugins_dir, plugin_name), install: true, diff --git a/src/backend/plugins/pacrunner-duktape/meson.build b/src/backend/plugins/pacrunner-duktape/meson.build index 41ab6cc..ef4a470 100644 --- a/src/backend/plugins/pacrunner-duktape/meson.build +++ b/src/backend/plugins/pacrunner-duktape/meson.build @@ -16,6 +16,7 @@ plugin_lib = shared_module( plugin_name, plugin_src, include_directories: px_backend_inc, + c_args: px_backend_c_args, dependencies: [px_backend_dep, duktape_dep, ws2_32_dep], install_dir: join_paths(px_plugins_dir, plugin_name), install: true, diff --git a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.c b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.c index 4425d8e..5196740 100644 --- a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.c +++ b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.c @@ -1,6 +1,6 @@ /* pacrunner-duktape.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.h b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.h index 90fc119..8721a62 100644 --- a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.h +++ b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.h @@ -1,6 +1,6 @@ /* pacrunner-duktape.h * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.plugin b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.plugin index 26dd8b2..efb10f0 100644 --- a/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.plugin +++ b/src/backend/plugins/pacrunner-duktape/pacrunner-duktape.plugin @@ -1,6 +1,3 @@ [Plugin] -Authors=Jan-Michael Brummer <jan.brummer@tabos.org> -Copyright=Copyright © 2023 Jan-Michael Brummer -Description=Parse PAC files with duktape Module=pacrunner-duktape Name=Duktape
\ No newline at end of file diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c index be6b5f5..ece6983 100644 --- a/src/backend/px-manager.c +++ b/src/backend/px-manager.c @@ -1,6 +1,6 @@ /* px-manager.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-manager.h b/src/backend/px-manager.h index 17dcb1c..ca3c2fe 100644 --- a/src/backend/px-manager.h +++ b/src/backend/px-manager.h @@ -1,6 +1,6 @@ /* px-manager.h * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-config.c b/src/backend/px-plugin-config.c index d9ee9c6..6f8c803 100644 --- a/src/backend/px-plugin-config.c +++ b/src/backend/px-plugin-config.c @@ -1,6 +1,6 @@ /* px-plugin-config.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-config.h b/src/backend/px-plugin-config.h index 93cdc5b..aac62a0 100644 --- a/src/backend/px-plugin-config.h +++ b/src/backend/px-plugin-config.h @@ -1,6 +1,6 @@ /* px-plugin-config.h * - * Copyright 2023 Jan-Michael Brummer + * Copyright 2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-download.c b/src/backend/px-plugin-download.c index bc7d6d2..c552217 100644 --- a/src/backend/px-plugin-download.c +++ b/src/backend/px-plugin-download.c @@ -1,6 +1,6 @@ /* px-plugin-download.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-download.h b/src/backend/px-plugin-download.h index e618de7..f37c565 100644 --- a/src/backend/px-plugin-download.h +++ b/src/backend/px-plugin-download.h @@ -1,6 +1,6 @@ /* px-plugin-download.h * - * Copyright 2023 Jan-Michael Brummer + * Copyright 2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-pacrunner.c b/src/backend/px-plugin-pacrunner.c index d529c14..bf5dc6a 100644 --- a/src/backend/px-plugin-pacrunner.c +++ b/src/backend/px-plugin-pacrunner.c @@ -1,6 +1,6 @@ /* px-plugin-pacrunner.c * - * Copyright 2022-2023 Jan-Michael Brummer + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/backend/px-plugin-pacrunner.h b/src/backend/px-plugin-pacrunner.h index 0226dc0..f7251ce 100644 --- a/src/backend/px-plugin-pacrunner.h +++ b/src/backend/px-plugin-pacrunner.h @@ -1,6 +1,6 @@ /* px-plugin-pacrunner.h * - * Copyright 2023 Jan-Michael Brummer + * Copyright 2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/libproxy/proxy-dbus.c b/src/libproxy/proxy-dbus.c index 3669280..8646ed5 100644 --- a/src/libproxy/proxy-dbus.c +++ b/src/libproxy/proxy-dbus.c @@ -1,7 +1,6 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2006 Nathaniel McCallum <nathaniel@natemccallum.com> - * Copyright (C) 2022-2023 Jan-Michael Brummer <jan.brummer@tabos.org> +/* proxy-dbus.c + * + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,8 +14,10 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ #include <gio/gio.h> diff --git a/src/libproxy/proxy.c b/src/libproxy/proxy.c index e4f4d01..eeb2308 100644 --- a/src/libproxy/proxy.c +++ b/src/libproxy/proxy.c @@ -1,7 +1,6 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2006 Nathaniel McCallum <nathaniel@natemccallum.com> - * Copyright (C) 2022-2023 Jan-Michael Brummer <jan.brummer@tabos.org> +/* proxy.c + * + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,8 +14,10 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ #include <gio/gio.h> diff --git a/src/libproxy/proxy.h b/src/libproxy/proxy.h index a5a4eae..be35d3c 100644 --- a/src/libproxy/proxy.h +++ b/src/libproxy/proxy.h @@ -1,7 +1,6 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2006 Nathaniel McCallum <nathaniel@natemccallum.com> - * Copyright (C) 2022 Jan-Michael Brummer <jan.brummer@tabos.org> +/* proxy.h + * + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -15,8 +14,11 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + #pragma once diff --git a/src/tests/px-manager-helper.c b/src/tests/px-manager-helper.c index 2e12371..725a312 100644 --- a/src/tests/px-manager-helper.c +++ b/src/tests/px-manager-helper.c @@ -1,3 +1,24 @@ +/* px-manager-helper.c + * + * Copyright 2022-2023 The Libproxy Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + #include "px-manager.h" #include "px-manager-helper.h" diff --git a/src/tests/px-manager-helper.h b/src/tests/px-manager-helper.h index fb486df..ad5d662 100644 --- a/src/tests/px-manager-helper.h +++ b/src/tests/px-manager-helper.h @@ -1,3 +1,24 @@ +/* px-manager-helper.h + * + * Copyright 2022-2023 The Libproxy Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + #pragma once PxManager *px_test_manager_new (const char *config_plugin); diff --git a/src/tests/px-manager-test.c b/src/tests/px-manager-test.c index b62c408..8e3865f 100644 --- a/src/tests/px-manager-test.c +++ b/src/tests/px-manager-test.c @@ -1,6 +1,6 @@ -/******************************************************************************* - * libproxy - A library for proxy configuration - * Copyright (C) 2022-2023 Jan-Michael Brummer <jan.brummer@tabos.org> +/* px-manager-test.c + * + * Copyright 2022-2023 The Libproxy Team * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,8 +14,10 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - ******************************************************************************/ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ #include "px-manager.h" #include "px-manager-helper.h" diff --git a/src/tools/proxy.c b/src/tools/proxy.c index 80b0983..2d46578 100644 --- a/src/tools/proxy.c +++ b/src/tools/proxy.c @@ -1,3 +1,24 @@ +/* proxy.c + * + * Copyright 2022-2023 The Libproxy Team + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * SPDX-License-Identifier: LGPL-2.1-or-later + */ + #include <stdio.h> #include <stdlib.h> #include <assert.h> |