Functions

check_mime_type_supported (mime_type)

filter_get_description (filter)

filter_get_description_libarchive (filter)

filter_get_extension (filter)

filter_get_filter_libarchive (filter)

filter_get_mime_type (filter)

filter_is_valid (filter)

filter_last ()

format_filter_get_description (format, filter)

format_filter_get_extension (format, filter)

format_filter_get_mime_type (format, filter)

format_get_description (format)

format_get_description_libarchive (format)

format_get_extension (format)

format_get_format_libarchive (format)

format_get_mime_type (format)

format_is_valid (format)

format_last ()

libarchive_quark ()

query_mime_type_supported (file)

Details

GnomeAutoar.check_mime_type_supported(mime_type)
Parameters:

mime_type (str) – a string representing the mime type

Returns:

True if the mime type is supported

Return type:

bool

Checks whether a mime type is supported by autoar. This function does no blocking IO.

GnomeAutoar.filter_get_description(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

description about the filter

Return type:

str

Gets description of the filter from the internal static data.

GnomeAutoar.filter_get_description_libarchive(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

description about the filter. Free the returned string with GLib.free().

Return type:

str

Gets description of the filter from libarchive. This function creates and destroys an archive object in order to get the description string.

GnomeAutoar.filter_get_extension(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

a file name extension

Return type:

str

Gets the file name extension of the filter from the internal static data.

GnomeAutoar.filter_get_filter_libarchive(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

an integer

Return type:

int

Gets the filter code used by libarchive. You can use the return value as the argument for archive_write_add_filter().

GnomeAutoar.filter_get_mime_type(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

an MIME type

Return type:

str

Gets the MIME type of the filter from the internal static data.

GnomeAutoar.filter_is_valid(filter)
Parameters:

filter (GnomeAutoar.Filter) – an GnomeAutoar.Filter

Returns:

True if the value of filter is valid

Return type:

bool

Checks whether an GnomeAutoar.Filter is valid.

GnomeAutoar.filter_last()
Returns:

maximal allowed values of GnomeAutoar.Filter

Return type:

int

Gets the maximal allowed values of GnomeAutoar.Filter

GnomeAutoar.format_filter_get_description(format, filter)
Parameters:
Returns:

description about the archive. Free the returned string with GLib.free().

Return type:

str

Gets the description for an archive format compressed by filter using #GContentType and GnomeAutoar.format_filter_get_mime_type().

GnomeAutoar.format_filter_get_extension(format, filter)
Parameters:
Returns:

a file name extension. Free the returned string with GLib.free().

Return type:

str

Gets the file name extension for an archive format compressed by filter. The first character of the returned string is always ‘.’

GnomeAutoar.format_filter_get_mime_type(format, filter)
Parameters:
Returns:

an MIME type. Free the returned string with GLib.free().

Return type:

str

Gets the MIME type for an archive format compressed by filter. This function always succeed, but it is not guaranteed that the returned MIME type exists and can be recognized by applications. Some combination of format and filter seldom exists in application, so this function can only generate the string based on some non-standard rules.

GnomeAutoar.format_get_description(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

description about the format

Return type:

str

Gets description of the format from the internal static data.

GnomeAutoar.format_get_description_libarchive(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

description about the format. Free the returned string with GLib.free().

Return type:

str

Gets description of the format from libarchive. This function creates and destroys an archive object in order to get the description string.

GnomeAutoar.format_get_extension(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

a file name extension

Return type:

str

Gets the file name extension of the format from the internal static data.

GnomeAutoar.format_get_format_libarchive(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

an integer

Return type:

int

Gets the format code used by libarchive. You can use the return value as the argument for archive_read_support_format_by_code() and archive_write_set_format(). However, some format cannot be set using these two functions because of problems inside libarchive. Use autoar_format_get_libarchive_read() and autoar_format_get_libarchive_write() to get the function pointer is the more reliable way to set format on the archive object.

GnomeAutoar.format_get_mime_type(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

an MIME type

Return type:

str

Gets the MIME type of the format from the internal static data.

GnomeAutoar.format_is_valid(format)
Parameters:

format (GnomeAutoar.Format) – an GnomeAutoar.Format

Returns:

True if the value of format is valid

Return type:

bool

Checks whether an GnomeAutoar.Format is valid.

GnomeAutoar.format_last()
Returns:

maximal allowed values of GnomeAutoar.Format

Return type:

int

Gets the maximal allowed values of GnomeAutoar.Format

GnomeAutoar.libarchive_quark()
Returns:

a #GQuark.

Return type:

int

Gets the libarchive Error Quark.

GnomeAutoar.query_mime_type_supported(file)
Parameters:

file (Gio.File) – a Gio.File to check if its mime type is supported

Returns:

True if the mime type of the Gio.File is supported

Return type:

bool

This function will query the file’s mime type and then call GnomeAutoar.check_mime_type_supported(), so it does blocking IO.