## RetroCoreDescriptor RetroCoreDescriptor — An object describing the capabilities and requirements of a Libretro core |

## Functions

RetroCoreDescriptor * | retro_core_descriptor_new ()
gboolean | retro_core_descriptor_has_icon ()
gchar * | retro_core_descriptor_get_uri ()
gchar * | retro_core_descriptor_get_id ()
gboolean | retro_core_descriptor_get_is_game ()
gboolean | retro_core_descriptor_get_is_emulator ()
char * | retro_core_descriptor_get_name ()
GIcon * | retro_core_descriptor_get_icon ()
char * | retro_core_descriptor_get_module ()
GFile * | retro_core_descriptor_get_module_file ()
gboolean | retro_core_descriptor_has_platform ()
gboolean | retro_core_descriptor_has_firmwares ()
gboolean | retro_core_descriptor_has_firmware_md5 ()
gboolean | retro_core_descriptor_has_firmware_sha512 ()
gchar ** | retro_core_descriptor_get_mime_type ()
gchar ** | retro_core_descriptor_get_firmwares ()
gchar * | retro_core_descriptor_get_firmware_path ()
gchar * | retro_core_descriptor_get_firmware_md5 ()
gchar * | retro_core_descriptor_get_firmware_sha512 ()
gboolean | retro_core_descriptor_get_is_firmware_mandatory ()
gboolean | retro_core_descriptor_get_platform_supports_mime_types ()

## Types and Values

#define | RETRO_TYPE_CORE_DESCRIPTOR
| RetroCoreDescriptor

## Object Hierarchy

        GObject
        ╰── RetroCoreDescriptor

## Includes

    #include <retro-gtk/retro-gtk.h>

## Description

## Functions

### retro_core_descriptor_new ()

    RetroCoreDescriptor *
    retro_core_descriptor_new (const gchar *filename,
                               GError **error);

Creates a new RetroCoreDescriptor.

#### Parameters

filename | the file name of the core descriptor |
error | return location for a GError, or `NULL` |

#### Returns

a new RetroCoreDescriptor.

[transfer full]

### retro_core_descriptor_has_icon ()

    gboolean
    retro_core_descriptor_has_icon (RetroCoreDescriptor *self,
                                    GError **error);

Gets whether the core has an icon.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

whether the core has an icon

### retro_core_descriptor_get_uri ()

    gchar *
    retro_core_descriptor_get_uri (RetroCoreDescriptor *self);

Gets the URI of the file of `self` .

#### Parameters

self | a RetroCoreDescriptor |

#### Returns

the URI of the file of `self` , free it with `g_free()`

### retro_core_descriptor_get_id ()

    gchar *
    retro_core_descriptor_get_id (RetroCoreDescriptor *self);

Gets the ID of `self` .

#### Parameters

self | a RetroCoreDescriptor |

#### Returns

the ID of `self` , free it with `g_free()`

### retro_core_descriptor_get_is_game ()

    gboolean
    retro_core_descriptor_get_is_game (RetroCoreDescriptor *self,
                                       GError **error);

Gets whether the core is a game, and hence can't load games.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

whether the core is a game

### retro_core_descriptor_get_is_emulator ()

    gboolean
    retro_core_descriptor_get_is_emulator (RetroCoreDescriptor *self,
                                           GError **error);

Gets whether the core is an emulator, and hence need games to be loaded.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

whether the core is an emulator

### retro_core_descriptor_get_name ()

    char *
    retro_core_descriptor_get_name (RetroCoreDescriptor *self,
                                    GError **error);

Gets the name, or `NULL` if it doesn't exist.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

a string or `NULL`, free it with `g_free()`.

[nullable][transfer full]

### retro_core_descriptor_get_icon ()

    GIcon *
    retro_core_descriptor_get_icon (RetroCoreDescriptor *self,
                                    GError **error);

Gets the icon, or `NULL` if it doesn't exist.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

a GIcon or `NULL`.

[nullable][transfer full]

### retro_core_descriptor_get_module ()

    char *
    retro_core_descriptor_get_module (RetroCoreDescriptor *self,
                                      GError **error);

Gets the module file name, or `NULL` if it doesn't exist.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

a string or `NULL`, free it with `g_free()`.

[nullable][transfer full]

### retro_core_descriptor_get_module_file ()

    GFile *
    retro_core_descriptor_get_module_file (RetroCoreDescriptor *self,
                                           GError **error);

Gets the module file, or `NULL` if it doesn't exist.

#### Parameters

self | a RetroCoreDescriptor |
error | return location for a GError, or `NULL` |

#### Returns

a GFile or `NULL`.

[nullable][transfer full]

### retro_core_descriptor_has_platform ()

    gboolean
    retro_core_descriptor_has_platform (RetroCoreDescriptor *self,
                                        const gchar *platform);

Gets whether the core descriptor declares the given platform.

#### Parameters

self | a RetroCoreDescriptor |
platform | a platform name |

#### Returns

whether the core descriptor declares the given platform

### retro_core_descriptor_has_firmwares ()

    gboolean
    retro_core_descriptor_has_firmwares (RetroCoreDescriptor *self,
                                         const gchar *platform,
                                         GError **error);

Gets whether the platform has associated firmwares.

#### Parameters

self | a RetroCoreDescriptor |
platform | a platform name |
error | return location for a GError, or `NULL` |

#### Returns

whether the platform has associated firmwares

### retro_core_descriptor_has_firmware_md5 ()

    gboolean
    retro_core_descriptor_has_firmware_md5
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets whether the firmware declares its MD5 fingerprint.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

whether the firmware declares its MD5 fingerprint

### retro_core_descriptor_has_firmware_sha512 ()

    gboolean
    retro_core_descriptor_has_firmware_sha512
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets whether the firmware declares its SHA512 fingerprint.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

whether the firmware declares its SHA512 fingerprint

### retro_core_descriptor_get_mime_type ()

    gchar **
    retro_core_descriptor_get_mime_type (RetroCoreDescriptor *self,
                                         const gchar *platform,
                                         gsize *length,
                                         GError **error);

Gets the list of MIME types accepted used by the core for this platform.

#### Parameters

self | a RetroCoreDescriptor |
platform | a platform name |
length | return location for the number of returned strings, or `NULL`. | [out][optional]
error | return location for a GError, or `NULL` |

#### Returns

(array zero-terminated=1 length=length) (element-type utf8) (transfer full): a `NULL`-terminated string array or `NULL`, the array should be freed with `g_strfreev()`

### retro_core_descriptor_get_firmwares ()

    gchar **
    retro_core_descriptor_get_firmwares (RetroCoreDescriptor *self,
                                         const gchar *platform,
                                         gsize *length,
                                         GError **error);

Gets the list of firmwares used by the core for this platform.

#### Parameters

self | a RetroCoreDescriptor |
platform | a platform name |
length | return location for the number of returned strings, or `NULL`. | [out][optional]
error | return location for a GError, or `NULL` |

#### Returns

(array zero-terminated=1 length=length) (element-type utf8) (transfer full): a `NULL`-terminated string array or `NULL`, the array should be freed with `g_strfreev()`

### retro_core_descriptor_get_firmware_path ()

    gchar *
    retro_core_descriptor_get_firmware_path
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets the demanded path to the firmware file, or `NULL`.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

a string or `NULL`, free it with `g_free()`.

[nullable][transfer full]

### retro_core_descriptor_get_firmware_md5 ()

    gchar *
    retro_core_descriptor_get_firmware_md5
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets the MD5 fingerprint of the firmware file, or `NULL`.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

a string or `NULL`, free it with `g_free()`.

[nullable][transfer full]

### retro_core_descriptor_get_firmware_sha512 ()

    gchar *
    retro_core_descriptor_get_firmware_sha512
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets the SHA512 fingerprint of the firmware file, or `NULL`.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

a string or `NULL`, free it with `g_free()`.

[nullable][transfer full]

### retro_core_descriptor_get_is_firmware_mandatory ()

    gboolean
    retro_core_descriptor_get_is_firmware_mandatory
                                   (RetroCoreDescriptor *self,
                                    const gchar *firmware,
                                    GError **error);

Gets whether the firmware is mandatory for the core to function.

#### Parameters

self | a RetroCoreDescriptor |
firmware | a firmware name |
error | return location for a GError, or `NULL` |

#### Returns

whether the firmware is mandatory for the core to function

### retro_core_descriptor_get_platform_supports_mime_types ()

    gboolean
    retro_core_descriptor_get_platform_supports_mime_types
                                   (RetroCoreDescriptor *self,
                                    const gchar *platform,
                                    const gchar * const *mime_types,
                                    GError **error);

Gets whether the platform supports all of the given MIME types.

#### Parameters

self | a RetroCoreDescriptor |
platform | a platform name |
mime_types | the MIME types. | [array zero-terminated=1][element-type utf8]
error | return location for a GError, or `NULL` |

#### Returns

whether the platform supports all of the given MIME types

## Types and Values

### RETRO_TYPE_CORE_DESCRIPTOR

    #define RETRO_TYPE_CORE_DESCRIPTOR (retro_core_descriptor_get_type())

### RetroCoreDescriptor

    typedef struct _RetroCoreDescriptor RetroCoreDescriptor;

## See Also

RetroCore