1 #ifndef SG_PACKAGE_PACKAGE_HXX
2 #define SG_PACKAGE_PACKAGE_HXX
7 #include <simgear/props/props.hxx>
8 #include <simgear/misc/strutils.hxx>
10 typedef std::set<std::string> string_set;
23 typedef std::vector<Package*> PackageList;
29 * get or create an install for the package
33 bool isInstalled() const;
35 std::string id() const;
38 * access the raw property data in the package
40 SGPropertyNode* properties() const;
43 * hex-encoded MD5 sum of the download files
45 std::string md5() const;
47 std::string getLocalisedProp(const std::string& aName) const;
49 unsigned int revision() const;
51 Catalog* catalog() const
54 bool matches(const SGPropertyNode* aFilter) const;
57 * download URLs for the package
59 string_list downloadUrls() const;
61 string_list thumbnailUrls() const;
64 * Packages we depend upon.
65 * If the dependency list cannot be satisifed for some reason,
66 * this will raise an sg_exception.
68 PackageList dependencies() const;
72 Package(const SGPropertyNode* aProps, Catalog* aCatalog);
74 void initWithProps(const SGPropertyNode* aProps);
76 std::string getLocalisedString(const SGPropertyNode* aRoot, const char* aName) const;
78 SGPropertyNode_ptr m_props;
88 } // of namespace simgear
90 #endif // of SG_PACKAGE_PACKAGE_HXX