Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

document.h

Go to the documentation of this file.
00001 /******************************************************************************
00002 
00003                            Copyright Notice.
00004 
00005                Licensed material - Property of Steve Lhomme
00006 
00007 This source file is part of Steve Lhomme's libSVX.
00008 (C) Copyright Steve Lhomme, France, 2001-2002.
00009 All rights reserved. Modifications (C) copyrighted by their respective
00010 contributors, all rights reserved.
00011 
00012 The contents of this file are subject to the Bixoft Public License
00013 Version 1.0 (the "License"); you may not use this file in any way except
00014 in compliance with the License. You should have received a copy of the
00015 License with this source; see <file or member name>. You may also obtain
00016 a copy of the License at http://www.bixoft.nl/english/license.htm
00017 or http://mukoli.free.fr/BXAPL/
00018 
00019 ANY USE OF THE SOFTWARE CONSTITUTES ACCEPTANCE OF THE LICENSE.
00020 
00021 Anything distributed under the License is distributed on an "AS IS" basis,
00022 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
00023 the specific language governing rights and limitations under the License.
00024 
00025 Definitions required by the License:
00026 Copyright Holder: Steve Lhomme, France
00027           e-mail: steve.lhomme@free.fr
00028 Country: France, i.e. the laws of France apply.
00029 Court  : ????
00030 Programming Tool status: This source is not a Programming Tool.
00031 
00032 Contributor(s):                      Contribution:
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     // loading/saing routines
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     // Product searching routines
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     // Product oriented functions
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     // Version searching routines
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_

Generated on Sat Apr 13 15:45:48 2002 for libsvx by doxygen1.2.15