![]() |
![]() |
![]() |
libinfinity-0.5 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <libinfinity/adopted/inf-adopted-session-record.h> InfAdoptedSessionRecord; InfAdoptedSessionRecordClass; InfAdoptedSessionRecord * inf_adopted_session_record_new (InfAdoptedSession *session
); gboolean inf_adopted_session_record_start_recording (InfAdoptedSessionRecord *record
,const gchar *filename
,GError **error
); gboolean inf_adopted_session_record_stop_recording (InfAdoptedSessionRecord *record
,GError **error
); gboolean inf_adopted_session_record_is_recording (InfAdoptedSessionRecord *record
);
InfAdoptedSessionRecord creates a record of a InfAdoptedSession. It records every modification made to the session from the beginning of its own lifetime to the end of its lifetime.
It does not record user status changes and thus the recorded session cannot reliably be replayed with all user information. It's main purpose is to make it easy to reproduce bugs in libinfinity. However, it might be extended in the future.
To replay a record, use InfAdoptedSessionReplay or the tool
inf-test-text-replay
in the infinote test suite.
typedef struct _InfAdoptedSessionRecord InfAdoptedSessionRecord;
InfAdoptedSessionRecord is an opaque data type. You should only access it via the public API functions.
typedef struct { } InfAdoptedSessionRecordClass;
This structure does not contain any public fields.
InfAdoptedSessionRecord * inf_adopted_session_record_new
(InfAdoptedSession *session
);
Creates a new InfAdoptedSessionRecord, recording session
. To start
recording, call inf_adopted_session_record_start_recording()
.
|
A InfAdoptedSession. |
Returns : |
A new InfAdoptedSessionRecord. |
gboolean inf_adopted_session_record_start_recording (InfAdoptedSessionRecord *record
,const gchar *filename
,GError **error
);
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.
|
A InfAdoptedSessionRecord. |
|
The file in which to store the record. |
|
Location to store error information, if any. |
Returns : |
TRUE if the session is started to be recorded, FALSE on
error.
|
gboolean inf_adopted_session_record_stop_recording (InfAdoptedSessionRecord *record
,GError **error
);
Stops the recording of the current session, which must have been started
previously via inf_adopted_session_record_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.
|
A InfAdoptedSessionRecord. |
|
Location to store error information, if any. |
Returns : |
TRUE if the recording has been stored successfully, FALSE
otherwise.
|
gboolean inf_adopted_session_record_is_recording
(InfAdoptedSessionRecord *record
);
Returns whether record
is currently recording a session.
|
A InfAdoptedSessionRecord. |
Returns : |
Whether record currently records the session.
|
"session"
property"session" InfAdoptedSession* : Read / Write / Construct Only
The session to record.