1 /* $Header$ */ 2 3 /* 4 * Copyright (c) 1999, 2002 Michael J. Roberts. All Rights Reserved. 5 * 6 * Please see the accompanying license file, LICENSE.TXT, for information 7 * on using and copying this software. 8 */ 9 /* 10 Name 11 vmsave.h - save/restore VM state 12 Function 13 Saves/restores VM state to/from a file. 14 Notes 15 16 Modified 17 08/02/99 MJRoberts - Creation 18 */ 19 20 #ifndef VMSAVE_H 21 #define VMSAVE_H 22 23 #include "vmglob.h" 24 25 class CVmSaveFile 26 { 27 public: 28 /* save state to a file */ 29 static void save(VMG_ class CVmFile *fp); 30 31 /* 32 * given a saved state file, read the name of the image file that 33 * created it 34 */ 35 static int restore_get_image(osfildef *fp, 36 char *fname_buf, size_t fname_buf_len); 37 38 /* 39 * Restore state from a file. Returns zero on success, or a 40 * VMERR_xxx code indicating the problem on failure. 41 */ 42 static int restore(VMG_ class CVmFile *fp); 43 44 /* reset the VM to the initial image file state */ 45 static void reset(VMG0_); 46 }; 47 48 #endif /* VMSAVE_H */ 49