Functions

get_version ()

initialize ()

log_get_level ()

log_set_level (level)

log_use_glib_logging ()

shutdown ()

Details

GExiv2.get_version()[source]
Returns:

Integer representing the current version.

Return type:

int

The gexiv2 library’s version number as a formatted decimal XXYYZZ.

XX is the major version, YY is the minor version, and ZZ is the micro version

For example, version 0.6.1 will be returned as 000601.

GExiv2.initialize()[source]
Returns:

True if initialized. If False, GExiv2 should not be used (unable to initialize properly).

Return type:

bool

Initializes GExiv2.

GExiv2 requires initialization before its methods are used. In particular, this call must be made in a thread-safe fashion. Best practice is to call from the application’s main thread and not to use any Gexiv2 code until it has returned.

GExiv2.log_get_level()[source]
Returns:

The current level.

Return type:

GExiv2.LogLevel

Get the current [enum`GExiv2`.LogLevel].

Messages below this level will not be logged.

GExiv2.log_set_level(level)[source]
Parameters:

level (GExiv2.LogLevel) – The [enum`GExiv2`.LogLevel] gexiv2 should respect.

Set the current [enum`GExiv2`.LogLevel].

Messages below this level will not be logged.

GExiv2.log_use_glib_logging()[source]

Make GExiv2 use GLib’s logging mechanism.

When called, gexiv2 will install it’s own [callback`GExiv2`.LogHandler] which redirects all Exiv2 and gexiv2 log messages to GLib’s logging calls ([func`GLib`.debug], [func`GLib`.message], [func`GLib`.warning], and [func`GLib`.critical] for the respective [enum`GExiv2`.LogLevel] value). [enum`GExiv2`.LogLevel.MUTE] log messages are dropped.

One advantage to using this is that GLib’s logging control and handlers can be used rather than GExiv2’s ad hoc scheme. It also means an application can use GLib logging and have all its messages routed through the same calls.

GExiv2.shutdown()[source]

Shutdown GExiv2.

Shutdown GExiv2. Should be called in the same thread as GExiv2.initialize().

New in version 0.16.0.