Operating System Simulator Plugin
3.5.1
Unreal Engine plugin that simulates an Operating System Environment
|
A class representing a Unix operating system for a phone device. This class is a child class of UOperatingSystemUnix. More...
#include "OperatingSystemUnixPhone.h"
Public Member Functions | |
UOperatingSystemUnixPhone () | |
Public Member Functions inherited from UOperatingSystemUnix | |
UOperatingSystemUnix () | |
virtual UOperatingSystemDirectory * | CreateDirectoryInPath (const FString &TargetPath, const FString &DirectoryName, TSoftClassPtr< UOperatingSystemDirectory > DirectoryClass, UOperatingSystemPartition *TargetPartition, const bool bIsFromSaveGame, FGenericError &OutError) override |
const TSet< TSoftObjectPtr< UOperatingSystemProgramsCollection > > & | GetRepositoryClasses () const |
Retrieves the repository classes in the Operating System Simulator. | |
Public Member Functions inherited from UOperatingSystem | |
template<class T > | |
T * | GetAs () const |
Get a pointer to the object casted as type T. | |
template<class T > | |
FORCEINLINE const T * | GetAsConst () const |
Get a pointer to the object casted as type T. | |
OPERATINGSYSTEMSIMULATOR_API bool | AddNotification (const FOperatingSystemNotification &NewNotification) |
Adds a notification to the operating system. | |
OPERATINGSYSTEMSIMULATOR_API bool | AddNotification (const FGenericError &GenericError, const EOperatingSystemNotificationCategory &Category, const EOperatingSystemNotificationType Verbosity=EOperatingSystemNotificationType::Error) |
Adds a notification to the operating system. This method allows adding a notification to the operating system with the specified error, category, and verbosity. | |
void | StartOperatingSystem (const TWeakObjectPtr< const UOperatingSystemSaveGame > LoadGameInstance, FGenericError &OutError) |
Start the operating system. This method starts the operating system. It performs the necessary initialization and loads the settings and programs. | |
void | PostLoadOperatingSystem () |
Calls the PostLoadOperatingSystemImpl method and handles any error that occurs. | |
void | FinishInstallation () |
Finish the installation of the operating system. | |
void | InstallStartupPrograms () |
Install the startup programs for the operating system. | |
void | ShutdownOS () |
Shuts down the operating system. | |
void | RestartOS () |
Restarts the operating system. | |
void | DestroyOS () |
Destroys the operating system instance. | |
int32 | AddRunningProgram (UOperatingSystemBaseProgram *NewProgram, FGenericError &OutError) |
Adds a running program to the operating system. | |
void | ProgramStarted (UOperatingSystemBaseProgram *StartedProgram, const bool bIsRestored) |
Notifies the operating system that a program has started. | |
bool | IsProgramRunning (const TWeakObjectPtr< const UOperatingSystemBaseProgram > TestProgram) const |
Check if a program is running. | |
bool | IsProgramRunning (const TSubclassOf< UOperatingSystemBaseProgram > TestProgramClass) const |
Checks if a program of the specified class is currently running. | |
UDraggableWindow * | CreateNewWindow (TWeakObjectPtr< UOperatingSystemBaseProgram > TargetProgram) const |
Creates a new window for the target program. | |
void | BringWindowToFront (UDraggableWindow *TargetWindow) |
Bring the specified window to the front. | |
bool | CreateProgramsFromRepository (const TSoftObjectPtr< UOperatingSystemProgramsCollection > &TargetRepository, const bool bIsInstalledWithOS) |
Create programs from a given repository. | |
void | SetToInstallStartupPrograms (const bool bInstall) |
bool | ShouldInstallStartupPrograms () const |
void | SetDeviceName (const FText &NewName) |
FText | GetDeviceName () const |
void | SetAutoLogin (const bool bEnableAutoLogin) |
bool | CanAutoLogin () const |
float | GetInstallationTime () const |
float | GetLoadingTime () const |
float | GetInitialLoadingTime () const |
const TArray< FOperatingSystemNotification > & | GetNotifications () const |
void | ClearAllNotifications () |
OPERATINGSYSTEMSIMULATOR_API void | ConsumeSpaceInMB (const float &NewSizeInMB, UOperatingSystemPartition *Partition, FGenericError &OutError) |
OPERATINGSYSTEMSIMULATOR_API void | ConsumeSpaceInGB (const float &NewSizeInGB, UOperatingSystemPartition *Partition, FGenericError &OutError) |
OPERATINGSYSTEMSIMULATOR_API FText | GetSizeAsText (const EOperatingSystemSizeMethod SizeMethod, const UOperatingSystemPartition *Partition, FGenericError &OutError) const |
OPERATINGSYSTEMSIMULATOR_API float | GetStoragePercentage (const UOperatingSystemPartition *Partition, FGenericError &OutError) const |
OPERATINGSYSTEMSIMULATOR_API double | GetHardDiskSize (FGenericError &OutError, const EOperatingSystemSizeMethod SizeMethod=EOperatingSystemSizeMethod::GB) const |
void | UninstallProgram (const FName &ProgramIdentifier, FGenericError &OutErrorIfAny) |
void | UninstallProgramByClass (const TSoftClassPtr< UOperatingSystemBaseProgram > ProgramClass, FGenericError &OutErrorIfAny) |
UOperatingSystemBaseProgram * | InstallProgramFromPackage (const FName &ProgramIdentifier, FGenericError &OutErrorIfAny) |
UOperatingSystemBaseProgram * | InstallProgramFromClass (FGenericError &OutErrorIfAny, const TSoftClassPtr< UOperatingSystemBaseProgram > ProgramClass, UOperatingSystemPartition *TargetPartition=nullptr) |
void | BeginInstallation (UOperatingSystemPartition *TargetPartition, FGenericError &OutError) |
UOperatingSystemPartition * | AllocatePartition (const double SizeInBytes, FGenericError &OutError) |
void | RemovePartition (UOperatingSystemPartition *PartitionToDelete, FGenericError &OutError) |
void | RefreshPartitions () |
void | InstallationCompleted (const bool bSwitchToDesktop=true) |
bool | CreateNewUser (const FOperatingSystemUser &NewUser, const bool bSetAsActive=false) |
bool | LoginUser (const FText &Username, const FText &Password) |
bool | UpdateCurrentUserDetails (const FOperatingSystemUser &UpdatedDetails) |
bool | HasEnoughSpace (const double &TestSizeInBytes, const UOperatingSystemPartition *InPartition) const |
TArray< UOperatingSystemPartition * > | GetDiskPartitions () const |
UOperatingSystemPartition * | GetOperatingSystemPartition () const |
void | CloseProgram (UOperatingSystemBaseProgram *TargetProgram, FGenericError &OutError) |
bool | BringBackgroundProgramToFront (UOperatingSystemBaseProgram *TargetProgram) |
bool | IsProgramInBackground (UOperatingSystemBaseProgram *TestProgram) const |
void | MinimizeProgram (UOperatingSystemBaseProgram *TargetProgram) |
void | CloseAllRunningPrograms () |
void | RestoreMinimizedProgram (const UOperatingSystemBaseProgram *TargetProgram) |
Restores a minimized program to the foreground on the operating system's taskbar. | |
UObject * | GetDirectoryIconObject (const FGameplayTag &TestTag) const |
bool | IsUnix () const |
float | GetBsodOnScreenTime () const |
float | GetToastNotificationDisplayTime () const |
TArray< UOperatingSystemBaseProgram * > | GetInstalledPrograms () const |
void | GetInstalledProgramsMap (TMap< FName, UOperatingSystemBaseProgram * > &OutInstalledPrograms) |
UOperatingSystemBaseProgram * | GetInstalledProgram (const TSoftClassPtr< UOperatingSystemBaseProgram > TestClass) const |
bool | IsProgramInstalled (const TSoftClassPtr< UOperatingSystemBaseProgram > TestClass) const |
UOperatingSystemBaseProgram * | GetRunningProgram (const TSoftClassPtr< UOperatingSystemBaseProgram > TestClass) const |
bool | IsPreInstalledOperatingSystem () const |
UOperatingSystemSettingsData * | GetSettings () const |
bool | IsRunningOnPortableDevice () const |
virtual UOperatingSystemPartition * | FindPartitionFromLetter (const FName &TargetDiskLetter) const |
Find a partition in the operating system from a given disk letter. | |
bool | HasValidRootCommandAndUser () const |
Determines whether the root command and user are valid. | |
bool | IsShuttingDown () const |
Check if the operating system is in the process of shutting down. | |
bool | IsRestarting () const |
Checks if the operating system is currently restarting. | |
TArray< FOperatingSystemUser > | GetAllUsers () const |
Returns an array of all users registered in the operating system. This function retrieves information about all users registered in the operating system. | |
Additional Inherited Members | |
Static Public Member Functions inherited from UOperatingSystem | |
static FName | GetOperatingSystemProgramRestoredEventName () |
static UE_NODISCARD UOperatingSystem * | CreateOperatingSystem (UOperatingSystemBaseDevice *OwningDevice, FGenericError &OutError) |
Creates a new instance of the operating system associated with the specified device. | |
static UE_NODISCARD FString | GetOperatingSystemUniqueID (const UOperatingSystem *TestOperatingSystem) |
Gets the unique ID of the operating system. This method retrieves the unique ID of the operating system represented by the given TestOperatingSystem object. | |
Public Attributes inherited from UOperatingSystem | |
FOperatingSystemProgramDelegate | OnProgramStarted |
Delegate representing the event when a program starts in the operating system. | |
FOperatingSystemProgramDelegate | OnProgramClosed |
Delegate for handling the program closed event. | |
FOperatingSystemProgramDelegate | OnProgramInstalled |
Delegate representing the event when a program is installed in the operating system. | |
FOperatingSystemProgramDelegate | OnProgramUninstalled |
Protected Member Functions inherited from UOperatingSystemUnix | |
virtual void | OnValidate (FGenericError &OutError) const override |
Validates the Unix-based operating system. | |
virtual void | FinalizePreInstallation (FGenericError &OutError) override |
Finalizes the pre-installation process for a Unix-based operating system. | |
virtual void | PrepareOperatingSystemInstallImpl (FGenericError &OutError) override |
PrepareOperatingSystemInstallImpl function prepares the Unix-based operating system for installation. | |
virtual bool | StartOperatingSystemImpl (FGenericError &OutError) override |
Starts the Unix-based operating system. | |
virtual void | PostLoadOperatingSystemImpl (FGenericError &OutError) override |
Executes additional post-loading operations specific to Unix-based operating systems. | |
virtual TOptional< FText > | GetRootCommand () const override final |
Gets the root command for the Unix-based operating system. | |
virtual TOptional< FOperatingSystemUser > | GetRootUser () const override final |
Retrieves the root user of the Unix-based operating system. | |
virtual TSoftClassPtr< UOperatingSystemBaseProgram > | FindProgramFromPackage (const FName &ProgramIdentifier) override |
Finds a program from a package based on its identifier. | |
bool | CreateRootDirectory (const bool bIsFromSaveGame) |
Creates the root directory for the Unix-based operating system if it does not already exist. The root directory is determined by finding the Unix root directory among all the available directories. If the root directory exists, this method returns true. Otherwise, it attempts to create the root directory using the first directory with the tag "Root". If the root directory is successfully created, this method returns true. Otherwise, it returns false. | |
Protected Member Functions inherited from UOperatingSystem | |
virtual OPERATINGSYSTEMSIMULATOR_API void | OnShowNotification (const FOperatingSystemNotification &NewNotification) |
This method is called when a new notification should be shown on the operating system. | |
virtual OPERATINGSYSTEMSIMULATOR_API void | OnAllOnNotificationsCleared () |
Callback triggered when all notifications are cleared. | |
virtual OPERATINGSYSTEMSIMULATOR_API void | FinishInstallationImpl () |
Performs the finishing steps of the installation process. | |
virtual OPERATINGSYSTEMSIMULATOR_API void | InstallStartupProgramsImpl () |
Allows the derived classes to implement their own logic for installing startup programs. This method should be overridden in derived classes to define the actual logic for installing startup programs. | |
virtual OPERATINGSYSTEMSIMULATOR_API void | OnPartitionLoaded (UOperatingSystemPartition &LoadedPartition, const FOperatingSystemPartitionSaveLoad &SaveLoadData) |
Callback method called when a partition is loaded. | |
bool | K2_CanStartOperatingSystem (FGenericError &ReturnError) |
Determines if the operating system can start. | |
Protected Attributes inherited from UOperatingSystemUnix | |
FOperatingSystemUser | RootUser |
FText | RootCommand |
TSet< TSoftObjectPtr< UOperatingSystemProgramsCollection > > | RepositoryClasses |
Protected Attributes inherited from UOperatingSystem | |
FTimerHandle | TimerHandle_OperatingSystemInstallation |
FTimerHandle | TimerHandle_LoadingTime |
FText | Name |
FText | CompanyName |
FOperatingSystemVersion | Version |
TSoftObjectPtr< UObject > | Icon |
TMap< FGameplayTag, TSoftObjectPtr< UObject > > | DirectoryIcons |
float | InstallationSpace |
FGameplayTagContainer | SupportedDevices |
TSoftObjectPtr< UOperatingSystemProgramsCollection > | MustHavePrograms |
TSoftObjectPtr< UOperatingSystemProgramsCollection > | PostInstallStartupPrograms |
TSoftObjectPtr< UOperatingSystemDirectoriesCollection > | DefaultDirectories |
TSoftClassPtr< UOperatingSystemSettingsData > | SettingsDataClass |
TSoftClassPtr< UOperatingSystemWidget > | WidgetClass |
TSoftClassPtr< UOperatingSystemBsodWidget > | BsodWidgetClass |
FOperatingSystemNotificationSettings | NotificationSettings |
FOperatingSystemRangeTime | InstallationTime |
FOperatingSystemRangeTime | LoadingTime |
FOperatingSystemRangeTime | LoadingTimeInitial |
FOperatingSystemRangeTime | LogonToDesktopTime |
FOperatingSystemRangeTime | BsodOnScreenTime |
FGameplayTag | OperatingSystemTag |
TWeakObjectPtr< UOperatingSystemBaseDevice > | ParentDevice |
TObjectPtr< UOperatingSystemSettingsData > | OperatingSystemSettingsData |
TObjectPtr< UOperatingSystemWidget > | OperatingSystemWidget |
TMap< int32, TObjectPtr< UOperatingSystemBaseProgram > > | RunningPrograms |
TMap< int32, TObjectPtr< UOperatingSystemBaseProgram > > | BackgroundRunningPrograms |
TMap< FName, UOperatingSystemBaseProgram * > | InstalledPrograms |
FOperatingSystemUser | CurrentUser |
uint8 | bIsStartingForTheFirstTime: 1 |
int32 | TotalNotifications |
int32 | TotalErrorNotifications |
int32 | TotalWarningNotifications |
TObjectPtr< UOperatingSystemBsodWidget > | BSODWidget |
TMap< int32, TWeakObjectPtr< UOperatingSystemTaskbarButton > > | TaskbarButtons |
Transient variable representing the taskbar buttons. It is a TMap that associates integer keys with weak object pointers to UOperatingSystemTaskbarButton objects. Key will be the process ID. Value will be the program. | |
FOperatingSystemUniqueId | TargetPartitionID |
Structure representing a unique identifier for a target partition in the operating system. | |
TWeakObjectPtr< UDraggableWindow > | LastBroughtToFrontWindow |
Transient variable representing the last draggable window brought to the front. | |
uint8 | bAutoLogin: 1 |
uint8 | bInstallStartupPrograms: 1 |
Specifies whether to install startup programs on the operating system. | |
FText | DeviceName |
A class representing a Unix operating system for a phone device. This class is a child class of UOperatingSystemUnix.
UOperatingSystemUnixPhone::UOperatingSystemUnixPhone | ( | ) |