added skeletons for YUM messages and packages
authorJiri Srain <jsrain@suse.cz>
Fri, 18 Nov 2005 10:23:30 +0000 (10:23 +0000)
committerJiri Srain <jsrain@suse.cz>
Fri, 18 Nov 2005 10:23:30 +0000 (10:23 +0000)
zypp/source/yum/Makefile.am
zypp/source/yum/YUMMessageImpl.cc [new file with mode: 0644]
zypp/source/yum/YUMMessageImpl.h [new file with mode: 0644]
zypp/source/yum/YUMPackageImpl.cc [new file with mode: 0644]
zypp/source/yum/YUMPackageImpl.h [new file with mode: 0644]

index 39ac1ae..7721cd3 100644 (file)
@@ -5,8 +5,10 @@ SUBDIRS =
 
 ## ##################################################
 
-include_HEADERS =      \
-       YUMScriptImpl.h
+include_HEADERS =              \
+       YUMScriptImpl.h         \
+       YUMMessageImpl.h                \
+       YUMPackageImpl.h
 
 
 noinst_LTLIBRARIES =   lib@PACKAGE@_source_yum.la
@@ -14,6 +16,8 @@ noinst_LTLIBRARIES =  lib@PACKAGE@_source_yum.la
 ## ##################################################
 
 lib@PACKAGE@_source_yum_la_SOURCES =   \
-       YUMScriptImpl.cc
+       YUMScriptImpl.cc                \
+       YUMMessageImpl.cc               \
+       YUMPackageImpl.cc
 
 ## ##################################################
diff --git a/zypp/source/yum/YUMMessageImpl.cc b/zypp/source/yum/YUMMessageImpl.cc
new file mode 100644 (file)
index 0000000..b22a2ab
--- /dev/null
@@ -0,0 +1,60 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/MessageImpl.cc
+ *
+*/
+
+#include "zypp/source/yum/YUMMessageImpl.h"
+
+using namespace std;
+using namespace zypp::detail;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    namespace YUM
+    {
+      ///////////////////////////////////////////////////////////////////
+      //
+      //        CLASS NAME : YUMMessageImpl
+      //
+      ///////////////////////////////////////////////////////////////////
+  
+      /** Default ctor */
+      YUMMessageImpl::YUMMessageImpl(
+       const zypp::parser::YUM::YUMPatchMessage & parsed
+      )
+#warning MA cannot be constructed that way
+#if 0
+      : MessageImpl(
+       parsed.name,
+       Edition(parsed.ver, parsed.rel, strtol(parsed.epoch.c_str(), NULL, 10)),
+       Arch("noarch")
+      )
+#endif
+      {
+       _text = parsed.text;
+/*
+    std::list<YUMDependency> provides;
+    std::list<YUMDependency> conflicts;
+    std::list<YUMDependency> obsoletes;
+    std::list<YUMDependency> freshen;
+    std::list<YUMDependency> requires;
+*/
+      }
+    } // namespace YUM 
+    /////////////////////////////////////////////////////////////////
+  } // namespace source
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/source/yum/YUMMessageImpl.h b/zypp/source/yum/YUMMessageImpl.h
new file mode 100644 (file)
index 0000000..bfce4f5
--- /dev/null
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/MessageImpl.h
+ *
+*/
+#ifndef ZYPP_SOURCE_YUM_YUMMESSAGEIMPL_H
+#define ZYPP_SOURCE_YUM_YUMMESSAGEIMPL_H
+
+#include "zypp/detail/MessageImpl.h"
+#include "zypp/parser/yum/YUMParserData.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    namespace YUM
+    { //////////////////////////////////////////////////////////////
+
+      ///////////////////////////////////////////////////////////////////
+      //
+      //        CLASS NAME : YUMMessageImpl
+      //
+      /** Class representing an update script */
+      class YUMMessageImpl : public detail::MessageImpl
+      {
+      public:
+        /** Default ctor */
+        YUMMessageImpl( const zypp::parser::YUM::YUMPatchMessage & parsed );
+       };
+      ///////////////////////////////////////////////////////////////////
+    } // namespace YUM
+    /////////////////////////////////////////////////////////////////
+  } // namespace source
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_SOURCE_YUM_YUMMESSAGEIMPL_H
diff --git a/zypp/source/yum/YUMPackageImpl.cc b/zypp/source/yum/YUMPackageImpl.cc
new file mode 100644 (file)
index 0000000..6cae51e
--- /dev/null
@@ -0,0 +1,119 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/PackageImpl.cc
+ *
+*/
+
+#include "zypp/source/yum/YUMPackageImpl.h"
+
+using namespace std;
+using namespace zypp::detail;
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    namespace YUM
+    {
+      ///////////////////////////////////////////////////////////////////
+      //
+      //        CLASS NAME : YUMPackageImpl
+      //
+      ///////////////////////////////////////////////////////////////////
+  
+      /** Default ctor */
+      YUMPackageImpl::YUMPackageImpl(
+       const zypp::parser::YUM::YUMPatchPackage & parsed
+      )
+#warning MA cannot be constructed that way
+#if 0
+      : PackageImpl(
+       parsed.name,
+       Edition(parsed.ver, parsed.rel, strtol(parsed.epoch.c_str(), NULL, 10)),
+       Arch(parsed.arch)
+      )
+#endif
+      {
+/*
+    std::string type;
+    std::string checksumType;
+    std::string checksumPkgid;
+    std::string checksum;
+    std::string summary;
+    std::string description;
+    std::string packager;
+    std::string url;
+    std::string timeFile;
+    std::string timeBuild;
+    std::string sizePackage;
+    std::string sizeInstalled;
+    std::string sizeArchive;
+    std::string location;
+    std::string license;
+    std::string vendor;
+    std::string group;
+    std::string buildhost;
+    std::string sourcerpm;
+    std::string headerStart;
+    std::string headerEnd;
+    std::list<YUMDependency> provides;
+    std::list<YUMDependency> conflicts;
+    std::list<YUMDependency> obsoletes;
+    std::list<YUMDependency> requires;
+    std::list<FileData> files;
+    // SuSE specific data
+    std::list<std::string> authors;
+    std::list<std::string> keywords;
+    std::string  media;
+    std::list<YUMDirSize> dirSizes;
+    std::list<YUMDependency> freshen;
+    bool installOnly;
+    // Change Log
+    std::list<ChangelogEntry> changelog;
+    // Package Files
+    struct {
+      std::string arch;
+      std::string filename;
+      std::string downloadsize;
+      std::string md5sum;
+      std::string buildtime;
+    } plainRpm;
+    struct {
+      std::string arch;
+      std::string filename;
+      std::string downloadsize;
+      std::string md5sum;
+      std::string buildtime;
+      std::list<YUMBaseVersion> baseVersions;
+    } patchRpm;
+    struct {
+      std::string arch;
+      std::string filename;
+      std::string downloadsize;
+      std::string md5sum;
+      std::string buildtime;
+      YUMBaseVersion baseVersion;
+    } deltaRpm;
+
+
+
+
+
+
+*/
+      }
+    } // namespace YUM 
+    /////////////////////////////////////////////////////////////////
+  } // namespace source
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
diff --git a/zypp/source/yum/YUMPackageImpl.h b/zypp/source/yum/YUMPackageImpl.h
new file mode 100644 (file)
index 0000000..2e331dc
--- /dev/null
@@ -0,0 +1,46 @@
+/*---------------------------------------------------------------------\
+|                          ____ _   __ __ ___                          |
+|                         |__  / \ / / . \ . \                         |
+|                           / / \ V /|  _/  _/                         |
+|                          / /__ | | | | | |                           |
+|                         /_____||_| |_| |_|                           |
+|                                                                      |
+\---------------------------------------------------------------------*/
+/** \file zypp/detail/PackageImpl.h
+ *
+*/
+#ifndef ZYPP_SOURCE_YUM_YUMPACKAGEIMPL_H
+#define ZYPP_SOURCE_YUM_YUMPACKAGEIMPL_H
+
+#include "zypp/detail/PackageImpl.h"
+#include "zypp/parser/yum/YUMParserData.h"
+
+///////////////////////////////////////////////////////////////////
+namespace zypp
+{ /////////////////////////////////////////////////////////////////
+  ///////////////////////////////////////////////////////////////////
+  namespace source
+  { /////////////////////////////////////////////////////////////////
+    namespace YUM
+    { //////////////////////////////////////////////////////////////
+
+      ///////////////////////////////////////////////////////////////////
+      //
+      //        CLASS NAME : YUMPackageImpl
+      //
+      /** Class representing an update script */
+      class YUMPackageImpl : public detail::PackageImpl
+      {
+      public:
+        /** Default ctor */
+        YUMPackageImpl( const zypp::parser::YUM::YUMPatchPackage & parsed );
+       };
+      ///////////////////////////////////////////////////////////////////
+    } // namespace YUM
+    /////////////////////////////////////////////////////////////////
+  } // namespace source
+  ///////////////////////////////////////////////////////////////////
+  /////////////////////////////////////////////////////////////////
+} // namespace zypp
+///////////////////////////////////////////////////////////////////
+#endif // ZYPP_SOURCE_YUM_YUMPACKAGEIMPL_H