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 vmhostsi.h - simple stdio-based VM host application environment 12 Function 13 Provides a simple implementation of the VM host application interface. 14 This implementation is suitable for simple command-line tools with 15 minimal user interface; more complete implementations should be used 16 for most applications that embed the VM. 17 Notes 18 19 Modified 20 07/29/99 MJRoberts - Creation 21 */ 22 23 #ifndef VMHOSTSI_H 24 #define VMHOSTSI_H 25 26 #include "vmhost.h" 27 #include "vmhosttx.h" 28 29 class CVmHostIfcStdio: public CVmHostIfcText 30 { 31 public: 32 /* create */ 33 CVmHostIfcStdio(const char *argv0); 34 35 /* delete */ 36 virtual ~CVmHostIfcStdio(); 37 38 /* get the I/O safety level */ get_io_safety()39 virtual int get_io_safety() { return io_safety_; } 40 41 /* set I/O safety level */ set_io_safety(int level)42 virtual void set_io_safety(int level) { io_safety_ = level; } 43 44 /* get the resource loader */ get_cmap_res_loader()45 virtual class CResLoader *get_cmap_res_loader() { return cmap_loader_; } 46 47 /* get the resource path */ get_res_path()48 virtual const char *get_res_path() { return 0; } 49 50 /* get an image file name */ get_image_name(char *,size_t)51 virtual vmhost_gin_t get_image_name(char *, size_t) 52 { return VMHOST_GIN_IGNORED; } 53 54 protected: 55 /* character mapping file resource loader */ 56 class CResLoader *cmap_loader_; 57 58 /* current I/O safety level */ 59 int io_safety_; 60 }; 61 62 #endif /* VMHOSTSI_H */ 63 64