Skip to content
Snippets Groups Projects
Commit a34c5c8b authored by Simon McVittie's avatar Simon McVittie
Browse files

libsrt: Explicitly control symbol visibility


Instead of having symbols visible by default (which included
compatibility symbols for older versions of GLib), hide them by default
(equivalent to G_GNUC_INTERNAL) and export only what we need.

This means we export the public API, plus symbols that are used by the
unit tests or by the command-line diagnostic tools. Symbols used only
by pressure-vessel do not need to be exported, since it links libsrt
statically.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 97af239b
Branches
Tags
1 merge request!140libsrt: Explicitly control symbol visibility
Pipeline #4624 passed
#define _SRT_COMPILATION
#define _GNU_SOURCE 1
#mesondefine VERSION
......
libsteam-runtime-tools-0.so.0 libsteam-runtime-tools-0-0 #MINVER#
* Build-Depends-Package: libsteam-runtime-tools-0-dev
_srt_architecture_can_run_from_report@Base 0.20200908.0
_srt_dri_driver_get_from_report@Base 0.20200908.0
_srt_feature_get_x86_flags_from_report@Base 0.20200908.0
_srt_filter_gameoverlayrenderer@Base 0.20190822.0
_srt_get_egl_from_json_report@Base 0.20200908.0
_srt_get_steam_desktop_entries_from_json_report@Base 0.20200908.0
_srt_get_vulkan_from_json_report@Base 0.20200908.0
_srt_glx_icd_get_from_report@Base 0.20200908.0
_srt_graphics_get_from_report@Base 0.20200908.0
_srt_json_array_to_strv@Base 0.20200908.0
_srt_library_get_issues_from_report@Base 0.20200908.0
_srt_locale_get_issues_from_report@Base 0.20200908.0
_srt_locale_get_locale_from_report@Base 0.20200908.0
_srt_os_release_populate_from_report@Base 0.20200908.0
_srt_rm_rf@Base 0.20200306.0
_srt_runtime_get_issues_from_report@Base 0.20200908.0
_srt_steam_get_from_report@Base 0.20200908.0
_srt_unblock_signals@Base 0.20200109.0
_srt_va_api_driver_get_from_report@Base 0.20200908.0
_srt_vdpau_driver_get_from_report@Base 0.20200908.0
srt_add_flag_from_nick@Base 0.20200908.0
srt_architecture_can_run_i386@Base 0.20190717.0
srt_architecture_can_run_x86_64@Base 0.20190717.0
......
......@@ -171,6 +171,8 @@ foreach flag : no_warning_cxxflags
add_global_arguments(supported_no_warning_cxxflags, language : 'cpp')
endforeach
add_global_arguments('-fvisibility=hidden', language : ['c', 'cpp'])
# gdbus-codegen in scout generates code that has many warnings
silence_gdbus_codegen_warnings = c_compiler.get_supported_arguments([
'-Wno-error',
......
......@@ -31,6 +31,8 @@
#include <glib.h>
#include <steam-runtime-tools/macros.h>
/**
* SRT_ABI_I386:
*
......@@ -47,5 +49,7 @@
*/
#define SRT_ABI_X86_64 "x86_64-linux-gnu"
_SRT_PUBLIC
gboolean srt_architecture_can_run_i386 (void);
_SRT_PUBLIC
gboolean srt_architecture_can_run_x86_64 (void);
......@@ -32,6 +32,8 @@
#include <glib.h>
#include <glib-object.h>
#include <steam-runtime-tools/macros.h>
typedef struct _SrtDesktopEntry SrtDesktopEntry;
typedef struct _SrtDesktopEntryClass SrtDesktopEntryClass;
......@@ -41,12 +43,18 @@ typedef struct _SrtDesktopEntryClass SrtDesktopEntryClass;
#define SRT_IS_DESKTOP_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_DESKTOP_ENTRY))
#define SRT_IS_DESKTOP_ENTRY_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_DESKTOP_ENTRY))
#define SRT_DESKTOP_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_DESKTOP_ENTRY, SrtDesktopEntryClass)
_SRT_PUBLIC
GType srt_desktop_entry_get_type (void);
_SRT_PUBLIC
const char *srt_desktop_entry_get_id (SrtDesktopEntry *self);
_SRT_PUBLIC
const char *srt_desktop_entry_get_commandline (SrtDesktopEntry *self);
_SRT_PUBLIC
const char *srt_desktop_entry_get_filename (SrtDesktopEntry *self);
_SRT_PUBLIC
gboolean srt_desktop_entry_is_default_handler (SrtDesktopEntry *self);
_SRT_PUBLIC
gboolean srt_desktop_entry_is_steam_handler (SrtDesktopEntry *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
......@@ -32,6 +32,8 @@
#include <glib.h>
#include <glib-object.h>
#include <steam-runtime-tools/macros.h>
typedef struct _SrtGraphics SrtGraphics;
typedef struct _SrtGraphicsClass SrtGraphicsClass;
......@@ -42,6 +44,7 @@ typedef struct _SrtGraphicsClass SrtGraphicsClass;
#define SRT_IS_GRAPHICS_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_GRAPHICS))
#define SRT_GRAPHICS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_GRAPHICS, SrtGraphicsClass)
_SRT_PUBLIC
GType srt_graphics_get_type (void);
/* Backward compatibility with previous steam-runtime-tools naming */
......@@ -127,17 +130,28 @@ typedef enum
#define SRT_N_RENDERING_INTERFACES (SRT_RENDERING_INTERFACE_VAAPI + 1)
_SRT_PUBLIC
const char *srt_graphics_get_multiarch_tuple (SrtGraphics *self);
_SRT_PUBLIC
SrtGraphicsIssues srt_graphics_get_issues (SrtGraphics *self);
_SRT_PUBLIC
gboolean srt_graphics_library_is_vendor_neutral (SrtGraphics *self,
SrtGraphicsLibraryVendor *vendor_out);
_SRT_PUBLIC
SrtWindowSystem srt_graphics_get_window_system (SrtGraphics *self);
_SRT_PUBLIC
SrtRenderingInterface srt_graphics_get_rendering_interface (SrtGraphics *self);
_SRT_PUBLIC
const char *srt_graphics_get_version_string (SrtGraphics *self);
_SRT_PUBLIC
const char *srt_graphics_get_renderer_string (SrtGraphics *self);
_SRT_PUBLIC
const char *srt_graphics_get_messages (SrtGraphics *self);
_SRT_PUBLIC
gchar *srt_graphics_dup_parameters_string (SrtGraphics *self);
_SRT_PUBLIC
int srt_graphics_get_exit_status (SrtGraphics *self);
_SRT_PUBLIC
int srt_graphics_get_terminating_signal (SrtGraphics *self);
typedef struct _SrtEglIcd SrtEglIcd;
......@@ -149,15 +163,22 @@ typedef struct _SrtEglIcdClass SrtEglIcdClass;
#define SRT_IS_EGL_ICD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_EGL_ICD))
#define SRT_IS_EGL_ICD_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_EGL_ICD))
#define SRT_EGL_ICD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_EGL_ICD, SrtEglIcdClass)
_SRT_PUBLIC
GType srt_egl_icd_get_type (void);
_SRT_PUBLIC
gboolean srt_egl_icd_check_error (SrtEglIcd *self,
GError **error);
_SRT_PUBLIC
const gchar *srt_egl_icd_get_json_path (SrtEglIcd *self);
_SRT_PUBLIC
const gchar *srt_egl_icd_get_library_path (SrtEglIcd *self);
_SRT_PUBLIC
gchar *srt_egl_icd_resolve_library_path (SrtEglIcd *self);
_SRT_PUBLIC
SrtEglIcd *srt_egl_icd_new_replace_library_path (SrtEglIcd *self,
const char *path);
_SRT_PUBLIC
gboolean srt_egl_icd_write_to_file (SrtEglIcd *self,
const char *path,
GError **error);
......@@ -171,10 +192,14 @@ typedef struct _SrtDriDriverClass SrtDriDriverClass;
#define SRT_IS_DRI_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_DRI_DRIVER))
#define SRT_IS_DRI_DRIVER_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_DRI_DRIVER))
#define SRT_DRI_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_DRI_DRIVER, SrtDriDriverClass)
_SRT_PUBLIC
GType srt_dri_driver_get_type (void);
_SRT_PUBLIC
const gchar *srt_dri_driver_get_library_path (SrtDriDriver *self);
_SRT_PUBLIC
gboolean srt_dri_driver_is_extra (SrtDriDriver *self);
_SRT_PUBLIC
gchar *srt_dri_driver_resolve_library_path (SrtDriDriver *self);
typedef struct _SrtVaApiDriver SrtVaApiDriver;
......@@ -186,10 +211,14 @@ typedef struct _SrtVaApiDriverClass SrtVaApiDriverClass;
#define SRT_IS_VA_API_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_VA_API_DRIVER))
#define SRT_IS_VA_API_DRIVER_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_VA_API_DRIVER))
#define SRT_VA_API_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_VA_API_DRIVER, SrtVaApiDriverClass)
_SRT_PUBLIC
GType srt_va_api_driver_get_type (void);
_SRT_PUBLIC
const gchar *srt_va_api_driver_get_library_path (SrtVaApiDriver *self);
_SRT_PUBLIC
gboolean srt_va_api_driver_is_extra (SrtVaApiDriver *self);
_SRT_PUBLIC
gchar *srt_va_api_driver_resolve_library_path (SrtVaApiDriver *self);
typedef struct _SrtVdpauDriver SrtVdpauDriver;
......@@ -201,11 +230,16 @@ typedef struct _SrtVdpauDriverClass SrtVdpauDriverClass;
#define SRT_IS_VDPAU_DRIVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_VDPAU_DRIVER))
#define SRT_IS_VDPAU_DRIVER_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_VDPAU_DRIVER))
#define SRT_VDPAU_DRIVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_VDPAU_DRIVER, SrtVdpauDriverClass)
_SRT_PUBLIC
GType srt_vdpau_driver_get_type (void);
_SRT_PUBLIC
const gchar *srt_vdpau_driver_get_library_path (SrtVdpauDriver *self);
_SRT_PUBLIC
const gchar *srt_vdpau_driver_get_library_link (SrtVdpauDriver *self);
_SRT_PUBLIC
gboolean srt_vdpau_driver_is_extra (SrtVdpauDriver *self);
_SRT_PUBLIC
gchar *srt_vdpau_driver_resolve_library_path (SrtVdpauDriver *self);
typedef struct _SrtVulkanIcd SrtVulkanIcd;
......@@ -217,16 +251,24 @@ typedef struct _SrtVulkanIcdClass SrtVulkanIcdClass;
#define SRT_IS_VULKAN_ICD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_VULKAN_ICD))
#define SRT_IS_VULKAN_ICD_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_VULKAN_ICD))
#define SRT_VULKAN_ICD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_VULKAN_ICD, SrtVulkanIcdClass)
_SRT_PUBLIC
GType srt_vulkan_icd_get_type (void);
_SRT_PUBLIC
gboolean srt_vulkan_icd_check_error (SrtVulkanIcd *self,
GError **error);
_SRT_PUBLIC
const gchar *srt_vulkan_icd_get_api_version (SrtVulkanIcd *self);
_SRT_PUBLIC
const gchar *srt_vulkan_icd_get_json_path (SrtVulkanIcd *self);
_SRT_PUBLIC
const gchar *srt_vulkan_icd_get_library_path (SrtVulkanIcd *self);
_SRT_PUBLIC
gchar *srt_vulkan_icd_resolve_library_path (SrtVulkanIcd *self);
_SRT_PUBLIC
SrtVulkanIcd *srt_vulkan_icd_new_replace_library_path (SrtVulkanIcd *self,
const char *path);
_SRT_PUBLIC
gboolean srt_vulkan_icd_write_to_file (SrtVulkanIcd *self,
const char *path,
GError **error);
......@@ -240,9 +282,12 @@ typedef struct _SrtGlxIcdClass SrtGlxIcdClass;
#define SRT_IS_GLX_ICD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_GLX_ICD))
#define SRT_IS_GLX_ICD_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_GLX_ICD))
#define SRT_GLX_ICD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_GLX_ICD, SrtGlxIcdClass)
_SRT_PUBLIC
GType srt_glx_icd_get_type (void);
_SRT_PUBLIC
const gchar *srt_glx_icd_get_library_soname (SrtGlxIcd *self);
_SRT_PUBLIC
const gchar *srt_glx_icd_get_library_path (SrtGlxIcd *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
......@@ -32,6 +32,8 @@
#include <glib.h>
#include <glib-object.h>
#include <steam-runtime-tools/macros.h>
typedef struct _SrtLibrary SrtLibrary;
typedef struct _SrtLibraryClass SrtLibraryClass;
......@@ -42,6 +44,7 @@ typedef struct _SrtLibraryClass SrtLibraryClass;
#define SRT_IS_LIBRARY_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_LIBRARY))
#define SRT_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_LIBRARY, SrtLibraryClass)
_SRT_PUBLIC
GType srt_library_get_type (void);
/* Backward compatibility with previous steam-runtime-tools naming */
......@@ -92,23 +95,35 @@ typedef enum
SRT_LIBRARY_SYMBOLS_FORMAT_DEB_SYMBOLS
} SrtLibrarySymbolsFormat;
_SRT_PUBLIC
const char *srt_library_get_requested_name (SrtLibrary *self);
_SRT_PUBLIC
const char *srt_library_get_absolute_path (SrtLibrary *self);
G_DEPRECATED_FOR(srt_library_get_requested_name)
_SRT_PUBLIC G_DEPRECATED_FOR(srt_library_get_requested_name)
const char *srt_library_get_soname (SrtLibrary *self);
_SRT_PUBLIC
const char *srt_library_get_messages (SrtLibrary *self);
_SRT_PUBLIC
const char *srt_library_get_multiarch_tuple (SrtLibrary *self);
_SRT_PUBLIC
SrtLibraryIssues srt_library_get_issues (SrtLibrary *self);
_SRT_PUBLIC
const char * const *srt_library_get_missing_symbols (SrtLibrary *self);
_SRT_PUBLIC
const char * const *srt_library_get_misversioned_symbols (SrtLibrary *self);
_SRT_PUBLIC
const char * const *srt_library_get_dependencies (SrtLibrary *self);
_SRT_PUBLIC
const char *srt_library_get_real_soname (SrtLibrary *self);
_SRT_PUBLIC
SrtLibraryIssues srt_check_library_presence (const char *requested_name,
const char *multiarch,
const char *symbols_path,
SrtLibrarySymbolsFormat symbols_format,
SrtLibrary **more_details_out);
_SRT_PUBLIC
int srt_library_get_exit_status (SrtLibrary *self);
_SRT_PUBLIC
int srt_library_get_terminating_signal (SrtLibrary *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
......@@ -32,6 +32,8 @@
#include <glib.h>
#include <glib-object.h>
#include <steam-runtime-tools/macros.h>
typedef struct _SrtLocale SrtLocale;
typedef struct _SrtLocaleClass SrtLocaleClass;
......@@ -42,6 +44,7 @@ typedef struct _SrtLocaleClass SrtLocaleClass;
#define SRT_IS_LOCALE_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_LOCALE))
#define SRT_LOCALE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_LOCALE, SrtLocaleClass)
_SRT_PUBLIC
GType srt_locale_get_type (void);
/**
......@@ -61,6 +64,7 @@ typedef enum
#define SRT_LOCALE_ERROR (srt_locale_error_quark ())
_SRT_PUBLIC
GQuark srt_locale_error_quark (void);
/* Backward compatibility with previous steam-runtime-tools naming */
......@@ -120,9 +124,13 @@ typedef enum
SRT_LOCALE_ISSUES_I18N_LOCALES_EN_US_MISSING = (1 << 6),
} SrtLocaleIssues;
_SRT_PUBLIC
const char *srt_locale_get_requested_name (SrtLocale *self);
_SRT_PUBLIC
const char *srt_locale_get_resulting_name (SrtLocale *self);
_SRT_PUBLIC
const char *srt_locale_get_charset (SrtLocale *self);
_SRT_PUBLIC
gboolean srt_locale_is_utf8 (SrtLocale *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
/*
* Copyright © 2020 Collabora Ltd.
*
* SPDX-License-Identifier: MIT
*
* 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.
*/
#pragma once
#if !defined(_SRT_IN_SINGLE_HEADER) && !defined(_SRT_COMPILATION)
#error "Do not include directly, use <steam-runtime-tools/steam-runtime-tools.h>"
#endif
#include <glib.h>
#define _SRT_PUBLIC __attribute__((visibility("default")))
#define _SRT_PRIVATE_EXPORT __attribute__((visibility("default")))
......@@ -56,6 +56,7 @@ libsteamrt_public_headers = [
'graphics.h',
'library.h',
'locale.h',
'macros.h',
'runtime.h',
'steam-runtime-tools.h',
'steam.h',
......@@ -65,6 +66,8 @@ libsteamrt_public_headers = [
enums = gnome.mkenums_simple(
'enums',
decorator : '_SRT_PUBLIC',
header_prefix : '#include <steam-runtime-tools/macros.h>',
install_dir : join_paths(get_option('includedir'), 'steam-runtime-tools-' + api_major, 'steam-runtime-tools'),
install_header : true,
sources : libsteamrt_public_headers,
......@@ -80,7 +83,6 @@ libsteamrt_static = static_library(
libsteamrt_sources + libsteamrt_public_headers + enums,
c_args : [
'-DG_LOG_DOMAIN="' + meson.project_name() + '"',
'-D_SRT_COMPILATION',
'-D_SRT_SONAME="libsteam-runtime-tools-' + api_major + '.so.' + abi_major + '"',
'-D_SRT_MULTIARCH="' + multiarch + '"',
'-D_SRT_API_MAJOR="' + api_major + '"',
......@@ -145,7 +147,6 @@ if get_option('introspection')
export_packages : 'steam-runtime-tools-' + api_major,
includes : ['GLib-2.0', 'GObject-2.0'],
install : true,
extra_args : ['-D_SRT_COMPILATION'],
)
endif
......
......@@ -29,6 +29,8 @@
#error "Do not include directly, use <steam-runtime-tools/steam-runtime-tools.h>"
#endif
#include <steam-runtime-tools/macros.h>
/* Backward compatibility with previous steam-runtime-tools naming */
#define SRT_RUNTIME_ISSUES_INTERNAL_ERROR SRT_RUNTIME_ISSUES_UNKNOWN
......
......@@ -34,6 +34,7 @@
#include <steam-runtime-tools/graphics.h>
#include <steam-runtime-tools/library.h>
#include <steam-runtime-tools/locale.h>
#include <steam-runtime-tools/macros.h>
#include <steam-runtime-tools/runtime.h>
#include <steam-runtime-tools/steam.h>
#include <steam-runtime-tools/system-info.h>
......
......@@ -32,6 +32,8 @@
#include <glib.h>
#include <glib-object.h>
#include <steam-runtime-tools/macros.h>
typedef struct _SrtSteam SrtSteam;
typedef struct _SrtSteamClass SrtSteamClass;
......@@ -41,6 +43,7 @@ typedef struct _SrtSteamClass SrtSteamClass;
#define SRT_IS_STEAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SRT_TYPE_STEAM))
#define SRT_IS_STEAM_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_STEAM))
#define SRT_STEAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_STEAM, SrtSteamClass)
_SRT_PUBLIC
GType srt_steam_get_type (void);
/* Backward compatibility with previous steam-runtime-tools naming */
......@@ -109,9 +112,13 @@ typedef enum
SRT_STEAM_ISSUES_NONE = 0
} SrtSteamIssues;
_SRT_PUBLIC
SrtSteamIssues srt_steam_get_issues (SrtSteam *self);
_SRT_PUBLIC
const char *srt_steam_get_install_path (SrtSteam *self);
_SRT_PUBLIC
const char *srt_steam_get_data_path (SrtSteam *self);
_SRT_PUBLIC
const char *srt_steam_get_bin32_path (SrtSteam *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
......@@ -36,6 +36,7 @@
#include <steam-runtime-tools/graphics.h>
#include <steam-runtime-tools/library.h>
#include <steam-runtime-tools/locale.h>
#include <steam-runtime-tools/macros.h>
#include <steam-runtime-tools/runtime.h>
#include <steam-runtime-tools/steam.h>
......@@ -102,107 +103,158 @@ typedef struct _SrtSystemInfoClass SrtSystemInfoClass;
#define SRT_IS_SYSTEM_INFO_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE ((cls), SRT_TYPE_SYSTEM_INFO))
#define SRT_SYSTEM_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), SRT_TYPE_SYSTEM_INFO, SrtSystemInfoClass)
_SRT_PUBLIC
GType srt_system_info_get_type (void);
_SRT_PUBLIC
SrtSystemInfo *srt_system_info_new (const char *expectations);
_SRT_PUBLIC
SrtSystemInfo *srt_system_info_new_from_json (const char *path,
GError **error);
_SRT_PUBLIC
gboolean srt_system_info_can_run (SrtSystemInfo *self,
const char *multiarch_tuple);
_SRT_PUBLIC
SrtContainerType srt_system_info_get_container_type (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_container_host_directory (SrtSystemInfo *self);
_SRT_PUBLIC
gboolean srt_system_info_can_write_to_uinput (SrtSystemInfo *self);
_SRT_PUBLIC
SrtLibraryIssues srt_system_info_check_libraries (SrtSystemInfo *self,
const gchar *multiarch_tuple,
GList **libraries_out);
_SRT_PUBLIC
SrtLibraryIssues srt_system_info_check_library (SrtSystemInfo *self,
const gchar *multiarch_tuple,
const gchar *soname,
SrtLibrary **more_details_out);
_SRT_PUBLIC
SrtGraphicsIssues srt_system_info_check_graphics (SrtSystemInfo *self,
const char *multiarch_tuple,
SrtWindowSystem window_system,
SrtRenderingInterface rendering_interface,
SrtGraphics **details_out);
_SRT_PUBLIC
GList * srt_system_info_check_all_graphics (SrtSystemInfo *self,
const char *multiarch_tuple);
_SRT_PUBLIC
GList *srt_system_info_list_egl_icds (SrtSystemInfo *self,
const char * const *multiarch_tuples);
_SRT_PUBLIC
GList *srt_system_info_list_vulkan_icds (SrtSystemInfo *self,
const char * const *multiarch_tuples);
_SRT_PUBLIC
GList *srt_system_info_list_dri_drivers (SrtSystemInfo *self,
const char *multiarch_tuple,
SrtDriverFlags flags);
_SRT_PUBLIC
GList *srt_system_info_list_va_api_drivers (SrtSystemInfo *self,
const char *multiarch_tuple,
SrtDriverFlags flags);
_SRT_PUBLIC
GList *srt_system_info_list_vdpau_drivers (SrtSystemInfo *self,
const char *multiarch_tuple,
SrtDriverFlags flags);
_SRT_PUBLIC
GList *srt_system_info_list_glx_icds (SrtSystemInfo *self,
const char *multiarch_tuple,
SrtDriverFlags flags);
_SRT_PUBLIC
void srt_system_info_set_environ (SrtSystemInfo *self,
gchar * const *env);
_SRT_PUBLIC
void srt_system_info_set_sysroot (SrtSystemInfo *self,
const char *root);
_SRT_PUBLIC
void srt_system_info_set_helpers_path (SrtSystemInfo *self,
const gchar *path);
_SRT_PUBLIC
const char *srt_system_info_get_primary_multiarch_tuple (SrtSystemInfo *self);
_SRT_PUBLIC
void srt_system_info_set_primary_multiarch_tuple (SrtSystemInfo *self,
const gchar *tuple);
_SRT_PUBLIC
void srt_system_info_set_test_flags (SrtSystemInfo *self,
SrtTestFlags flags);
_SRT_PUBLIC
void srt_system_info_set_expected_runtime_version (SrtSystemInfo *self,
const char *version);
_SRT_PUBLIC
gchar *srt_system_info_dup_expected_runtime_version (SrtSystemInfo *self);
_SRT_PUBLIC
SrtRuntimeIssues srt_system_info_get_runtime_issues (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_runtime_path (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_runtime_version (SrtSystemInfo *self);
_SRT_PUBLIC
SrtSteamIssues srt_system_info_get_steam_issues (SrtSystemInfo *self);
_SRT_PUBLIC
SrtSteam *srt_system_info_get_steam_details (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_steam_installation_path (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_steam_data_path (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_steam_bin32_path (SrtSystemInfo *self);
_SRT_PUBLIC
gchar ** srt_system_info_list_pressure_vessel_overrides (SrtSystemInfo *self,
gchar ***messages);
_SRT_PUBLIC
gchar ** srt_system_info_list_pinned_libs_32 (SrtSystemInfo *self,
gchar ***messages);
_SRT_PUBLIC
gchar ** srt_system_info_list_pinned_libs_64 (SrtSystemInfo *self,
gchar ***messages);
_SRT_PUBLIC
SrtLocaleIssues srt_system_info_get_locale_issues (SrtSystemInfo *self);
_SRT_PUBLIC
SrtLocale *srt_system_info_check_locale (SrtSystemInfo *self,
const char *requested_name,
GError **error);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_build_id (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_id (SrtSystemInfo *self);
_SRT_PUBLIC
gchar **srt_system_info_dup_os_id_like (SrtSystemInfo *self,
gboolean include_self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_name (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_pretty_name (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_variant (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_variant_id (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_version_codename (SrtSystemInfo *self);
_SRT_PUBLIC
gchar *srt_system_info_dup_os_version_id (SrtSystemInfo *self);
_SRT_PUBLIC
gchar **srt_system_info_list_driver_environment (SrtSystemInfo *self);
_SRT_PUBLIC
GList *srt_system_info_list_desktop_entries (SrtSystemInfo *self);
_SRT_PUBLIC
SrtX86FeatureFlags srt_system_info_get_x86_features (SrtSystemInfo *self);
_SRT_PUBLIC
SrtX86FeatureFlags srt_system_info_get_known_x86_features (SrtSystemInfo *self);
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
......
......@@ -32,6 +32,8 @@
#include <json-glib/json-glib.h>
#include <steam-runtime-tools/macros.h>
typedef enum
{
SRT_HELPER_FLAGS_SEARCH_PATH = (1 << 0),
......@@ -47,6 +49,7 @@ G_GNUC_INTERNAL GPtrArray *_srt_get_helper (const char *helpers_path,
const char *base,
SrtHelperFlags flags,
GError **error);
_SRT_PRIVATE_EXPORT
gchar *_srt_filter_gameoverlayrenderer (const gchar *input);
G_GNUC_INTERNAL const char *_srt_find_myself (const char **helpers_path_out,
GError **error);
......@@ -55,19 +58,23 @@ G_GNUC_INTERNAL gboolean _srt_process_timeout_wait_status (int wait_status,
int *exit_status,
int *terminating_signal);
_SRT_PRIVATE_EXPORT
const char *srt_enum_value_to_nick (GType enum_type,
int value);
_SRT_PRIVATE_EXPORT
gboolean srt_enum_from_nick (GType enum_type,
const gchar *nick,
gint *value_out,
GError **error);
_SRT_PRIVATE_EXPORT
gboolean srt_add_flag_from_nick (GType flags_type,
const gchar *string,
guint *value_out,
GError **error);
_SRT_PRIVATE_EXPORT
guint srt_get_flags_from_json_array (GType flags_type,
JsonObject *json_obj,
const gchar *array_member,
......@@ -75,7 +82,7 @@ guint srt_get_flags_from_json_array (GType flags_type,
G_GNUC_INTERNAL void _srt_child_setup_unblock_signals (gpointer ignored);
/* not G_GNUC_INTERNAL because s-r-s-i calls it */
_SRT_PRIVATE_EXPORT
void _srt_unblock_signals (void);
G_GNUC_INTERNAL int _srt_indirect_strcmp0 (gconstpointer left,
......@@ -84,8 +91,10 @@ G_GNUC_INTERNAL int _srt_indirect_strcmp0 (gconstpointer left,
gchar ** _srt_json_array_to_strv (JsonObject *json_obj,
const gchar *array_member);
_SRT_PRIVATE_EXPORT
gboolean _srt_rm_rf (const char *directory);
_SRT_PRIVATE_EXPORT
FILE *_srt_divert_stdout_to_stderr (GError **error);
G_GNUC_INTERNAL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment