00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef HEADER_SUPERTUX_ADDON_ADDON_HPP
00018 #define HEADER_SUPERTUX_ADDON_ADDON_HPP
00019
00020 #include <string>
00021
00022 #include "util/reader_fwd.hpp"
00023 #include "util/writer_fwd.hpp"
00024
00028 class Addon
00029 {
00030 public:
00031 std::string kind;
00032 std::string title;
00033 std::string author;
00034 std::string license;
00035 std::string http_url;
00037 std::string suggested_filename;
00039 std::string installed_physfs_filename;
00041 std::string installed_absolute_filename;
00042 std::string stored_md5;
00043 bool installed;
00044 bool loaded;
00045
00049 std::string get_md5() const;
00050
00054 void parse(const Reader& lisp);
00055
00059 void parse(std::string fname);
00060
00064 void write(Writer& writer) const;
00065
00069 void write(std::string fname) const;
00070
00075 bool operator==(Addon addon2) const;
00076
00077 protected:
00078 friend class AddonManager;
00079
00080 mutable std::string calculated_md5;
00081
00082 Addon() :
00083 kind(),
00084 title(),
00085 author(),
00086 license(),
00087 http_url(),
00088 suggested_filename(),
00089 installed_physfs_filename(),
00090 installed_absolute_filename(),
00091 stored_md5(),
00092 installed(),
00093 loaded(),
00094 calculated_md5()
00095 {};
00096 };
00097
00098 #endif
00099
00100