00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef HEADER_SYSTEM_CONTEXT_HXX
00021 #define HEADER_SYSTEM_CONTEXT_HXX
00022
00023 #include <stdio.h>
00024 #include <string>
00025 #include <vector>
00026
00027 enum FileType {
00028 FT_DIRECTORY,
00029 FT_CONSTRUO_FILE,
00030 FT_UNKNOWN_FILE
00031 };
00032
00034 class SystemContext
00035 {
00036 private:
00037 public:
00038 virtual unsigned int get_time () =0;
00039
00041 virtual void sleep (unsigned long) =0;
00042
00044 virtual std::string get_construo_rc_path () =0;
00045
00047 virtual std::string get_user_realname() =0;
00048
00050 virtual std::string get_user_email() =0;
00051
00053 virtual FileType get_file_type(const std::string& filename) =0;
00054
00055 virtual FILE* open_input_file(const std::string& filename) =0;
00056 virtual FILE* open_output_file(const std::string& filename) =0;
00057
00058 virtual unsigned int get_mtime (const std::string& filename) =0;
00059
00061 virtual std::vector<std::string> read_directory(const std::string& pathname) =0;
00062
00063 virtual std::string translate_filename (const std::string&) =0;
00064 };
00065
00066 #endif
00067
00068