LaunchBoxCONTRIBUTORS
On this page

14.1 Beta 1 SDK

This reference documents the current beta SDK. Beta APIs can change before stable.

IDataManager7.10

C#
public interface Unbroken.LaunchBox.Plugins.Data.IDataManager
This interface provides access to all data in LaunchBox/Big Box. Use the Unbroken.LaunchBox.Plugins.PluginHelper's static Unbroken.LaunchBox.Plugins.PluginHelper.DataManager property to access the instance methods and read and write LaunchBox data.

Methods

AddGameController 11.12

C#
string AddGameController(string controllerName, string controllerCategory, params string[] associatedPlatforms)
Adds a controller
controllerName 11.12
The name of the controller
controllerCategory 11.12
The category of the controller
associatedPlatforms 11.12
The platforms associated to this controller (optional)

Returns

The ID string the controller is registered to

AddNewEmulator 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IEmulator AddNewEmulator()
Adds a new Emulator to the user's collection.

Returns

The new Emulator.

AddNewGame 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IGame AddNewGame(string title)
Adds a new Game to the user's collection.
title 7.10
The Title to use for the new Game.

Returns

The new Game.

AddNewPlatform 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatform AddNewPlatform(string name)
Adds a new Platform to the user's collection.
name 7.10
The Name of the Platform to add.

Returns

The new Platform.

AddNewPlatformCategory 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatformCategory AddNewPlatformCategory(string name)
Adds a new Platform Category to the user's collection.
name 7.10
The Name of the Platform Category to add.

Returns

The new Platform Category

AddNewPlaylist 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlaylist AddNewPlaylist(string name)
Adds a new Playlist to the user's collection.
name 7.10
The Name of the Playlist to add.

Returns

The new Playlist.

BackgroundReloadSave 7.10

C#
void BackgroundReloadSave(System.Action changes)
Recommended instead of other Reload and Save methods when quickly saving a single or small amount of values in the data. Completely avoids Dropbox, Google Drive, etc. sync issues by making sure that all changed data is loaded from disk before making the specified changes.
changes 7.10
The specified changes to make to the data. A method or an inline expression may be provided here that changes the data as needed after reloading any necessary data from disk, and before saving the new values to disk.

ForceReload 7.10

C#
void ForceReload()
Forces all data to be reloaded from XML files. This method should only ever be necessary to call when significant changes are made to the XML files by something other than the LaunchBox or Big Box applications.

GetAllEmulators 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IEmulator[] GetAllEmulators()
Gets all Emulators in the user's collection.

Returns

An array of Emulators.

GetAllGames 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IGame[] GetAllGames()
Gets all Games in the user's collection.

Returns

An array of Games.

GetAllParents 8.8

C#
Unbroken.LaunchBox.Plugins.Data.IParent[] GetAllParents()
Gets all Parents in the user's collection.

Returns

An array of Parents.

GetAllPlatformCategories 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatformCategory[] GetAllPlatformCategories()
Gets all Platform Categories in the user's collection.

Returns

An array of Platform Categories.

GetAllPlatforms 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatform[] GetAllPlatforms()
Gets all Platforms in the user's collection.

Returns

An array of Platforms.

GetAllPlaylists 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlaylist[] GetAllPlaylists()
Gets all Playlists in the user's collection.

Returns

An array of Playlists.

GetEmulatorById 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IEmulator? GetEmulatorById(string id)
Get an Emulator by the Emulator's ID.
id 7.10
The ID of the Emulator to retrieve. Maps up directly to the Emulator's Unbroken.LaunchBox.Plugins.Data.IEmulator.Id property.

Returns

The Emulator with the specified ID, or NULL if not found.

GetGameById 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IGame? GetGameById(string? id)
Gets a Game via the Game's ID.
id 7.10
The ID of the Game to retrieve. Maps up directly to the Game's Unbroken.LaunchBox.Plugins.Data.IGame.Id property.

Returns

The Game with the specified ID, or NULL if not found.

GetGameControllers 11.12

C#
System.Collections.Generic.IList<Unbroken.LaunchBox.Plugins.Data.IGameController> GetGameControllers()
Gets the list of game controllers

Returns

The game controllers registered in the library.

GetPlatformByName 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatform? GetPlatformByName(string name)
Gets a Platform via the Platform's Name.
name 7.10
The Name of the Platform to retrieve. Maps up directly to the Platform's Unbroken.LaunchBox.Plugins.Data.IPlatform.Name property.

Returns

The Platform with the associated Name, or NULL if not found.

GetPlatformCategoryByName 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlatformCategory GetPlatformCategoryByName(string name)
Gets a Platform Category via the Platform Category's Name.
name 7.10
The Name of the Platform Category to retrieve. Maps up directly to the Platform Category's Unbroken.LaunchBox.Plugins.Data.IPlatformCategory.Name property.

Returns

The Platform Category with the associated Name, or NULL if not found.

GetPlaylistById 7.10

C#
Unbroken.LaunchBox.Plugins.Data.IPlaylist? GetPlaylistById(string id)
Gets a Playlist via the Playlist's ID.
id 7.10
The ID of the Playlist to retrieve. Maps up directly to the Playlist's Unbroken.LaunchBox.Plugins.Data.IPlaylist.PlaylistId property.

Returns

The Playlist with the associated ID, or NULL if not found.

GetRootPlatformsCategoriesPlaylists 8.8

C#
System.Collections.Generic.IList<Unbroken.LaunchBox.Plugins.Data.IPlatform> GetRootPlatformsCategoriesPlaylists()
Gets the list of root platforms, platform categories, and playlists, which can then be used to parse through children as well.

Returns

A list of root platforms, platform categories, and playlists.

ReloadIfNeeded 7.10

C#
void ReloadIfNeeded()
Reloads any changed XML files from disk. Should be called before loading up data to change and save.

Save 7.10

C#
void Save(bool wait = false)
Saves all changes to LaunchBox or Big Box data to disk. Will only save XML files that were changed.
wait 7.10
A value specifying whether to wait for the operation to complete. If false is specified, then the save operation will be performed in the background and the method will immediately return.

TryRemoveEmulator 7.10

C#
bool TryRemoveEmulator(Unbroken.LaunchBox.Plugins.Data.IEmulator emulator)
Attempts to remove an Emulator from the user's collection.
emulator 7.10
The Emulator to remove.

Returns

A value specifying whether the Emulator was successfully removed. If false is returned, most likely the Emulator was not found in the user's collection.

TryRemoveGame 7.10

C#
bool TryRemoveGame(Unbroken.LaunchBox.Plugins.Data.IGame game)
Attempts to remove a Game from the user's collection.
game 7.10
The Game to remove.

Returns

A value specifying whether or not the Game was successfully removed. If false is returned, most likely the Game was not found in the user's collection.

TryRemovePlatform 7.10

C#
bool TryRemovePlatform(Unbroken.LaunchBox.Plugins.Data.IPlatform platform)
Attempts to remove a Platform from the user's collection.
platform 7.10
The Platform to remove.

Returns

A value specifying whether the Platform was successfully removed. If false is returned, most likely the Platform was not found in the user's collection.

TryRemovePlatformCategory 7.10

C#
bool TryRemovePlatformCategory(Unbroken.LaunchBox.Plugins.Data.IPlatformCategory platformCategory)
Attempts to remove a Platform Category from the user's collection.
platformCategory 7.10
The Platform Category to remove.

Returns

A value specifying whether the Platform Category was successfully removed. If false is returned, most likely the Platform Category was not found in the user's collection.

TryRemovePlaylist 7.10

C#
bool TryRemovePlaylist(Unbroken.LaunchBox.Plugins.Data.IPlaylist playlist)
Attempts to remove a Playlist from the user's collection.
playlist 7.10
The Playlist to remove.

Returns

A value specifying whether the Playlist was successfully removed. If false is returned, most likely the Playlist was not found in the user's collection.