module journal{
int+read+notify start_recording;
int+read+notify playback;
int+read+notify stop;
string+read+notify playback_filename;
string+read+notify record_filename;
int+read+write+notify record;
};
journal controls the operation of the AVS/Express journalling facility from within an application. It records journal files and plays these journal files back. You can use this module if you want to add journalling capabilities to your application.
The journal module has these parameters that control is operation.
When set to 1, this begins journalling into the file specified in the record_filename parameter. Any existing contents of this file are discarded.
When set to 1, plays back the file specified by the playback_filename parameter.
When set to 1, stops recording a journal file
Specifies the pathname of a file from which to play journal files.
Specifies the pathname of a file to record journalling commands.
A read-write parameter. When start_recording is set, this is automatically set to 1 by the system to indicate that journalling is on. When stop is set, this is automatically set to 0 to indicate that journalling has been disabled. If you set this to 0 while journalling is on, journalling is temporarily disabled. It can later be reset to 1 to continue journalling without truncating the current contents of the record_filename.
See the implementation of the Network Editor in v/ne.v for an example of how to use the journal module.