using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; using Facepunch.Steamworks.Data; namespace Facepunch.Steamworks { /// /// Undocumented Parental Settings /// public class SteamParental : SteamSharedClass { internal static ISteamParentalSettings Internal => Interface as ISteamParentalSettings; internal override void InitializeInterface( bool server ) { SetInterface( server, new ISteamParentalSettings( server ) ); InstallEvents( server ); } internal static void InstallEvents( bool server ) { Dispatch.Install( x => OnSettingsChanged?.Invoke(), server ); } /// /// Parental Settings Changed /// public static event Action OnSettingsChanged; /// /// /// public static bool IsParentalLockEnabled => Internal.BIsParentalLockEnabled(); /// /// /// public static bool IsParentalLockLocked => Internal.BIsParentalLockLocked(); /// /// /// public static bool IsAppBlocked( AppId app ) => Internal.BIsAppBlocked( app.Value ); /// /// /// public static bool BIsAppInBlockList( AppId app ) => Internal.BIsAppInBlockList( app.Value ); /// /// /// public static bool IsFeatureBlocked( ParentalFeature feature ) => Internal.BIsFeatureBlocked( feature ); /// /// /// public static bool BIsFeatureInBlockList( ParentalFeature feature ) => Internal.BIsFeatureInBlockList( feature ); } }