GvaInputFile

GvaInputFile — A stable interface for MAME INP files

Functions

Properties

char * filename Read / Write / Construct Only
char * format Read
char * game Read
char * origin Read
gint64 timestamp Read

Types and Values

struct GvaInputFile

Object Hierarchy

    GObject
    ╰── GvaInputFile

Description

A GvaInputFile provides metadata about a MAME INP file. It handles both current and historical INP formats.

Functions

gva_input_file_new ()

GvaInputFile *
gva_input_file_new (const gchar *filename);

Creates a new GvaInputFile for the given filename .

Parameters

filename

path to a MAME INP file

 

Returns

a new GvaInputFile


gva_input_file_read ()

gboolean
gva_input_file_read (GvaInputFile *input_file,
                     GError **error);

Reads header information from a MAME INP file. The information is made available through the various accessor functions. If an error occurs while reading, the function returns FALSE and sets error .

Parameters

input_file

a GvaInputFile

 

error

return location for a GError, or NULL

 

Returns

TRUE on success, FALSE if an error occurred


gva_input_file_play_back ()

GvaProcess *
gva_input_file_play_back (GvaInputFile *input_file,
                          GError **error);

Begins play back of input_file and returns the resulting GvaProcess. If an error occurs, it returns NULL and sets error .

Parameters

input_file

a GvaInputFile

 

error

return location for a GError, or NULL

 

Returns

a new GvaProcess, or NULL


gva_input_file_get_filename ()

const gchar *
gva_input_file_get_filename (GvaInputFile *input_file);

Returns the filename for input_file .

Parameters

input_file

a GvaInputFile

 

Returns

filename for input_file


gva_input_file_get_format ()

const gchar *
gva_input_file_get_format (GvaInputFile *input_file);

Returns a description of the INP header format. Possible formats are "INP simple format", "INP extended format", and "INP version x.y".

Parameters

input_file

a GvaInputFile

 

Returns

description of the header format


gva_input_file_get_game ()

const gchar *
gva_input_file_get_game (GvaInputFile *input_file);

Returns the corresponding ROM name for input_file .

Parameters

input_file

a GvaInputFile

 

Returns

corresponding ROM name for input_file


gva_input_file_get_origin ()

const gchar *
gva_input_file_get_origin (GvaInputFile *input_file);

Returns a description of the MAME program that recorded the INP file.

Parameters

input_file

a GvaInputFile

 

Returns

description of the MAME program that recorded the INP file


gva_input_file_get_timestamp ()

time_t
gva_input_file_get_timestamp (GvaInputFile *input_file);

Returns an approximation of when the game recording began.

Parameters

input_file

a GvaInputFile

 

Returns

approximation of when the game recording began

Types and Values

struct GvaInputFile

struct GvaInputFile;

Contains only private data that should be read and manipulated using the functions below.

Property Details

The “filename” property

  “filename”                 char *

The name of the input file.

Owner: GvaInputFile

Flags: Read / Write / Construct Only

Default value: NULL


The “format” property

  “format”                   char *

The format of the input file.

Owner: GvaInputFile

Flags: Read

Default value: NULL


The “game” property

  “game”                     char *

The corresponding ROM name for the input file.

Owner: GvaInputFile

Flags: Read

Default value: NULL


The “origin” property

  “origin”                   char *

The version of MAME that recorded the input file.

Owner: GvaInputFile

Flags: Read

Default value: NULL


The “timestamp” property

  “timestamp”                gint64

The creation timestamp for the input file.

Owner: GvaInputFile

Flags: Read

Default value: 0