00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00045 #ifndef _DEF_SVX_H_
00046 #define _DEF_SVX_H_
00047
00048 #include <string>
00049
00050 class TiXmlDocument;
00051
00052 namespace libsvx {
00053
00054 class Svx;
00055 class Product;
00056 class MNetwork;
00057 class Version;
00058
00063 class Document {
00064
00065 public:
00066 Document();
00067 ~Document();
00068
00069 bool Parse(const std::string & the_SVX_buffer, const bool AllowURLRetrieval);
00070 bool ParseAdd(const std::string & the_SVX_buffer, const bool AllowURLRetrieval);
00071 bool ParseBack(::TiXmlDocument & m_XML_Document);
00072
00073
00074
00075 bool LoadFile(const std::string & the_filename, const bool AllowURLRetrieval);
00076 bool AddFile(const std::string & the_filename, const bool AllowURLRetrieval);
00077 bool LoadURL(const std::string & the_filename, const bool AllowURLRetrieval);
00078
00079 bool SaveFile(const std::string & the_filename);
00080
00081 void UpdateProduct(const std::string & the_product_name, const bool AllowDependencyRetrieval);
00082
00083
00084
00085 Product * FindProduct(const std::string & the_product_uid) const;
00086
00087 void Iterate_Product_Begin();
00088 bool Iterate_Product_IsEnd();
00089 const std::string & Iterate_Product_Next();
00090 const std::string & Iterate_Product_Prev();
00091
00092
00093
00094 bool IsOldProductVersion(const std::string & the_product_uid, const std::string & the_version_to_check) const;
00095 const Version *GetLatestProductVersion(const std::string & the_product_uid);
00096
00097
00098
00099 const Version * FindVersion(const std::string & the_product_uid, const std::string & the_version_name) const;
00100
00101 void Iterate_Version_Begin(const std::string & the_product_uid);
00102 bool Iterate_Version_IsBegin(const std::string & the_product_uid);
00103 bool Iterate_Version_IsEnd(const std::string & the_product_uid);
00104 const std::string & Iterate_Version_Next(const std::string & the_product_uid);
00105 const std::string & Iterate_Version_Prev(const std::string & the_product_uid);
00106
00107 protected:
00109 Svx * m_SvxInfo;
00111 MNetwork * m_Network;
00112 };
00113
00114 };
00115
00116 #endif // _DEF_SVX_H_