From 631274887670036b03972e126943ff0ac4e360b1 Mon Sep 17 00:00:00 2001 From: Michal Bloch Date: Tue, 29 Apr 2025 13:21:16 +0200 Subject: [PATCH] Move sessiond-internal.h to sessiond repo The internal functions are already provided by sessiond, so this makes sure that the header is also provided in the same place as the implementation and avoids creating a "fake" sessiond plugin dependency on libsyscommon. Change-Id: Ib89ce7845c3d8285f88d0f457ac035f550b03910 --- packaging/libsyscommon.spec | 1 - .../system/syscommon-internal-sessiond.h | 74 ------------------- 2 files changed, 75 deletions(-) delete mode 100644 src/plugin-api/sessiond/include/system/syscommon-internal-sessiond.h diff --git a/packaging/libsyscommon.spec b/packaging/libsyscommon.spec index 8f81229..0d8d3e8 100644 --- a/packaging/libsyscommon.spec +++ b/packaging/libsyscommon.spec @@ -252,6 +252,5 @@ Common system plugin APIs to load another APIs from backend. %manifest %{name}.manifest %license LICENSE.MIT %{_includedir}/system/syscommon-plugin-sessiond*.h -%{_includedir}/system/syscommon-internal-sessiond.h %{_libdir}/pkgconfig/libsyscommon-plugin-api-sessiond.pc %{_libdir}/libsyscommon-plugin-api-sessiond.so diff --git a/src/plugin-api/sessiond/include/system/syscommon-internal-sessiond.h b/src/plugin-api/sessiond/include/system/syscommon-internal-sessiond.h deleted file mode 100644 index 3e8c3dd..0000000 --- a/src/plugin-api/sessiond/include/system/syscommon-internal-sessiond.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * MIT License - * - * Copyright (c) 2025 Samsung Electronics Co., Ltd. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is furnished - * to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifndef __SYSCOMMON_INTERNAL_SESSIOND_H__ -#define __SYSCOMMON_INTERNAL_SESSIOND_H__ - -#ifdef __cplusplus -extern "C" { -#endif - - -/* These functions are to be called by the plugin, and let it access sessiond - * directly. There is no routing via libsyscommon, the header is here mostly - * because otherwise there would be a cyclical sessiond/plugin dependency. */ - -/** - * @brief Add a subsession (called from plugin) - * @param uid user ID to add the subsession to - * @param subsession Subsession name to add - * @return @c 0 on success, otherwise a negative error value - */ -int sessiond_internal_add_subsession(int uid, const char *subsession); - -/** - * @brief Add a subsession (called from plugin) - * @param uid user ID to add the subsession to - * @param subsession Subsession name to add - * @param size_kB Size limit of the subsession in kilobytes - * @return @c 0 on success, otherwise a negative error value - */ -int sessiond_internal_add_subsession_fixed_size(int uid, const char *subsession, unsigned size_kB); - -/** - * @brief Remove a subsession (called from plugin) - * @param uid user ID to remove the subsession from - * @param subsession Subsession name to remove - * @return @c 0 on success, otherwise a negative error value - */ -int sessiond_internal_remove_subsession(int uid, const char *subsession); - -/** - * @brief Switch subsession (called from plugin) - * @param uid user ID whose subsession to switch - * @param subsession Subsession name to switch to - * @return @c 0 on success, otherwise a negative error value - */ -int sessiond_internal_switch_subsession(int uid, const char *subsession); - -#ifdef __cplusplus -} -#endif - -#endif // __SYSCOMMON_INTERNAL_SESSIOND_H__ -- 2.34.1