Infinity.AdoptedSessionRecord

g GObject.Object GObject.Object Infinity.AdoptedSessionRecord Infinity.AdoptedSessionRecord GObject.Object->Infinity.AdoptedSessionRecord

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (session)

is_recording ()

start_recording (filename)

stop_recording ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

filename

str

r

The filename of the record file

session

Infinity.AdoptedSession

r/w/co

The session to record

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Infinity.AdoptedSessionRecord(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Infinity.AdoptedSessionRecordClass

Infinity.AdoptedSessionRecord is an opaque data type. You should only access it via the public API functions.

classmethod new(session)
Parameters:

session (Infinity.AdoptedSession) – A Infinity.AdoptedSession.

Returns:

A new Infinity.AdoptedSessionRecord.

Return type:

Infinity.AdoptedSessionRecord

Creates a new Infinity.AdoptedSessionRecord, recording session. To start recording, call Infinity.AdoptedSessionRecord.start_recording().

is_recording()
Returns:

Whether self currently records the session.

Return type:

bool

Returns whether self is currently recording a session.

start_recording(filename)
Parameters:

filename (str) – The file in which to store the record.

Raises:

GLib.Error

Returns:

True if the session is started to be recorded, False on error.

Return type:

bool

Starts to record the session. Make sure the session is not already closed before calling this function. If an error occurs, such as if filename could not be opened, then the function returns False and error is set.

stop_recording()
Raises:

GLib.Error

Returns:

True if the recording has been stored successfully, False otherwise.

Return type:

bool

Stops the recording of the current session, which must have been started previously via Infinity.AdoptedSessionRecord.start_recording(). If an error occurs, then the function returns False and error is set. Note that even if an error occurs, then the recording is stopped as well. However, the file might not have been completely written to disk, so you should still show any errors during this function to the user.

Property Details

Infinity.AdoptedSessionRecord.props.filename
Name:

filename

Type:

str

Default Value:

None

Flags:

READABLE

The filename of the record file

Infinity.AdoptedSessionRecord.props.session
Name:

session

Type:

Infinity.AdoptedSession

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The session to record