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

Merge branch 'wip/denittis/t20052_followup' into 'master'

Create a new srt_system_info_get_steam_details function

Closes #9

See merge request steam/steam-runtime-tools!118
parents a481877f 601c910c
No related branches found
No related tags found
1 merge request!118Create a new srt_system_info_get_steam_details function
Pipeline #2884 passed
......@@ -1655,6 +1655,24 @@ srt_system_info_get_steam_issues (SrtSystemInfo *self)
return srt_steam_get_issues (self->steam_data);
}
/**
* srt_system_info_get_steam_details:
* @self: The #SrtSystemInfo object
*
* Gather and return information about the Steam installation.
*
* Returns: (transfer full): An #SrtSteam object. Free with
* `g_object_unref ()`.
*/
SrtSteam *
srt_system_info_get_steam_details (SrtSystemInfo *self)
{
g_return_val_if_fail (SRT_IS_SYSTEM_INFO (self), NULL);
ensure_steam_cached (self);
return g_object_ref (self->steam_data);
}
/**
* srt_system_info_dup_steam_installation_path:
* @self: The #SrtSystemInfo object
......
......@@ -165,6 +165,7 @@ gchar *srt_system_info_dup_runtime_path (SrtSystemInfo *self);
gchar *srt_system_info_dup_runtime_version (SrtSystemInfo *self);
SrtSteamIssues srt_system_info_get_steam_issues (SrtSystemInfo *self);
SrtSteam *srt_system_info_get_steam_details (SrtSystemInfo *self);
gchar *srt_system_info_dup_steam_installation_path (SrtSystemInfo *self);
gchar *srt_system_info_dup_steam_data_path (SrtSystemInfo *self);
......
......@@ -733,6 +733,7 @@ steam_runtime (Fixture *f,
SrtSystemInfo *info;
SrtRuntimeIssues runtime_issues;
SrtSteamIssues steam_issues;
SrtSteam *steam_details;
gchar *runtime_path = NULL;
gchar *installation_path = NULL;
FakeHome *fake_home;
......@@ -764,13 +765,21 @@ steam_runtime (Fixture *f,
/* Check for Steam issues */
steam_issues = srt_system_info_get_steam_issues (info);
g_assert_cmpint (steam_issues, ==, SRT_STEAM_ISSUES_NONE);
steam_details = srt_system_info_get_steam_details (info);
steam_issues = srt_steam_get_issues (steam_details);
g_assert_cmpint (steam_issues, ==, SRT_STEAM_ISSUES_NONE);
g_object_unref (steam_details);
/* Do the check again, this time using the cache */
steam_issues = srt_system_info_get_steam_issues (info);
g_assert_cmpint (steam_issues, ==, SRT_STEAM_ISSUES_NONE);
steam_details = srt_system_info_get_steam_details (info);
steam_issues = srt_steam_get_issues (steam_details);
g_assert_cmpint (steam_issues, ==, SRT_STEAM_ISSUES_NONE);
fake_home_clean_up (fake_home);
g_object_unref (info);
g_object_unref (steam_details);
g_free (runtime_path);
g_free (installation_path);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment