|
| CGameClient (const ADDON::AddonInfoPtr &addonInfo) |
|
| ~CGameClient () override |
|
const CGameClientCheevos & | Cheevos () const |
|
const CGameClientInput & | Input () const |
|
const CGameClientProperties & | AddonProperties () const |
|
const CGameClientStreams & | Streams () const |
|
CGameClientCheevos & | Cheevos () |
|
CGameClientInput & | Input () |
|
CGameClientProperties & | AddonProperties () |
|
CGameClientStreams & | Streams () |
|
std::string | LibPath () const override |
|
ADDON::AddonPtr | GetRunningInstance () const override |
| retrieve the running instance of an add-on if it persists while running.
|
|
bool | SupportsStandalone () const |
|
bool | SupportsPath () const |
|
bool | SupportsVFS () const |
|
const std::set< std::string > & | GetExtensions () const |
|
bool | SupportsAllExtensions () const |
|
bool | IsExtensionValid (const std::string &strExtension) const |
|
const std::string & | GetEmulatorName () const |
|
const std::string & | GetPlatforms () const |
|
bool | Initialize (void) |
|
void | Unload () |
|
bool | OpenFile (const CFileItem &file, RETRO::IStreamManager &streamManager, IGameInputCallback *input) |
|
bool | OpenStandalone (RETRO::IStreamManager &streamManager, IGameInputCallback *input) |
|
void | Reset () |
|
void | CloseFile () |
|
const std::string & | GetGamePath () const |
|
bool | RequiresGameLoop () const |
|
bool | IsPlaying () const |
|
size_t | GetSerializeSize () const |
|
double | GetFrameRate () const |
|
double | GetSampleRate () const |
|
void | RunFrame () |
|
size_t | SerializeSize () const |
|
bool | Serialize (uint8_t *data, size_t size) |
|
bool | Deserialize (const uint8_t *data, size_t size) |
|
AddonInstance_Game * | GetInstanceInterface () |
| To get the interface table used between addon and kodi.
|
|
bool | LogError (GAME_ERROR error, const char *strMethod) const |
|
void | LogException (const char *strFunctionName) const |
|
| CAddonDll (const AddonInfoPtr &addonInfo, BinaryAddonBasePtr addonBase) |
|
| CAddonDll (const AddonInfoPtr &addonInfo, AddonType addonType) |
|
| ~CAddonDll () override |
|
bool | SaveSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Save any user configured settings.
|
|
bool | DllLoaded (void) const |
|
CAddonVersion | GetTypeVersionDll (int type) const |
| Get api version of moduleType type.
|
|
CAddonVersion | GetTypeMinVersionDll (int type) const |
| Get api min version of moduleType type.
|
|
ADDON_STATUS | CreateInstance (KODI_ADDON_INSTANCE_STRUCT *instance) |
| Function to create a addon instance class.
|
|
void | DestroyInstance (KODI_ADDON_INSTANCE_STRUCT *instance) |
| Function to destroy a on addon created instance class.
|
|
bool | IsInUse () const override |
|
void | RegisterInformer (CAddonDllInformer *informer) |
|
void | OnPreInstall () override |
|
void | OnPostInstall (bool update, bool modal) override |
|
void | OnPreUnInstall () override |
|
void | OnPostUnInstall () override |
|
bool | Initialized () const |
|
| CAddon (const AddonInfoPtr &addonInfo, AddonType addonType) |
|
| ~CAddon () override=default |
|
AddonType | MainType () const override |
| To get the main type of this addon.
|
|
AddonType | Type () const override |
| To get the on this CAddon class processed addon type.
|
|
bool | HasType (AddonType type) const override |
| To check complete addon (not only this) contains a type.
|
|
bool | HasMainType (AddonType type) const override |
| To check complete addon (not only this) has a specific type defined in its first extension point including the provided subcontent e.g. video or audio.
|
|
const CAddonType * | Type (AddonType type) const |
| The get for given addon type information and extension data.
|
|
std::string | ID () const override |
|
std::string | Name () const override |
|
bool | IsBinary () const override |
|
CAddonVersion | Version () const override |
|
CAddonVersion | MinVersion () const override |
|
std::string | Summary () const override |
|
std::string | Description () const override |
|
std::string | Path () const override |
|
std::string | Profile () const override |
|
std::string | Author () const override |
|
std::string | ChangeLog () const override |
|
std::string | Icon () const override |
|
ArtMap | Art () const override |
|
std::vector< std::string > | Screenshots () const override |
|
std::string | Disclaimer () const override |
|
AddonLifecycleState | LifecycleState () const override |
|
std::string | LifecycleStateDescription () const override |
|
CDateTime | InstallDate () const override |
|
CDateTime | LastUpdated () const override |
|
CDateTime | LastUsed () const override |
|
std::string | Origin () const override |
|
std::string | OriginName () const override |
|
uint64_t | PackageSize () const override |
|
const InfoMap & | ExtraInfo () const override |
|
const std::vector< DependencyInfo > & | GetDependencies () const override |
|
std::string | FanArt () const override |
|
bool | SupportsMultipleInstances () const override |
| Check add-on for support from independent work instances.
|
|
AddonInstanceSupport | InstanceUseType () const override |
| Return the used instance path type of the add-on type.
|
|
std::vector< AddonInstanceId > | GetKnownInstanceIds () const override |
| Gives active, independently working instance identifiers for this add-on.
|
|
bool | SupportsInstanceSettings () const override |
| Check whether the add-on supports individual settings per add-on instance.
|
|
bool | DeleteInstanceSettings (AddonInstanceId instance) override |
| Delete selected instance settings from storage.
|
|
bool | CanHaveAddonOrInstanceSettings () override |
| Check whether this add-on can be configured by the user.
|
|
bool | HasSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Check whether this add-on can be configured by the user.
|
|
bool | HasUserSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Check whether the user has configured this add-on or not.
|
|
void | UpdateSetting (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Update a user-configured setting with a new value.
|
|
bool | UpdateSettingBool (const std::string &key, bool value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Update a user-configured setting with a new boolean value.
|
|
bool | UpdateSettingInt (const std::string &key, int value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Update a user-configured setting with a new integer value.
|
|
bool | UpdateSettingNumber (const std::string &key, double value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Update a user-configured setting with a new number value.
|
|
bool | UpdateSettingString (const std::string &key, const std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Update a user-configured setting with a new string value.
|
|
std::string | GetSetting (const std::string &key, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Retrieve a particular settings value.
|
|
bool | GetSettingBool (const std::string &key, bool &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Retrieve a particular settings value as boolean.
|
|
bool | GetSettingInt (const std::string &key, int &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Retrieve a particular settings value as integer.
|
|
bool | GetSettingNumber (const std::string &key, double &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Retrieve a particular settings value as number.
|
|
bool | GetSettingString (const std::string &key, std::string &value, AddonInstanceId id=ADDON_SETTINGS_ID) override |
| Retrieve a particular settings value as string.
|
|
std::shared_ptr< CAddonSettings > | GetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
|
CAddonVersion | GetDependencyVersion (const std::string &dependencyID) const override |
| get the required version of a dependency.
|
|
bool | MeetsVersion (const CAddonVersion &versionMin, const CAddonVersion &version) const override |
| return whether or not this addon satisfies the given version requirements
|
|
bool | ReloadSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
|
void | ResetSettings (AddonInstanceId id=ADDON_SETTINGS_ID) override |
|
virtual | ~IAddon ()=default |
|
Interface between Kodi and Game add-ons.
The game add-on system is extremely large. To make the code more manageable, a subsystem pattern has been put in place. This pattern takes functionality that would normally be placed in this class, and puts it in another class (a "subsystem").
The architecture is relatively simple. Subsystems are placed in a flat struct and accessed by calling the subsystem name. For example, historically, OpenJoystick() was a member of this class. Now, the function is called like Input().OpenJoystick().
Although this pattern adds a layer of complexity, it enforces modularity and separation of concerns by making it very clear when one subsystem becomes dependent on another. Subsystems are all given access to each other by the calling mechanism. However, calling a subsystem creates a dependency on it, and an engineering decision must be made to justify the dependency.
CONTRIBUTING
If you wish to contribute, a beneficial task would be to refactor anything in this class into a new subsystem:
Using line count as a heuristic, the subsystem pattern has shrunk the .cpp from 1,200 lines to just over 600. Reducing this further is the challenge. You must now choose whether to accept.