diff options
author | jbj <devnull@localhost> | 2002-06-04 15:06:36 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-06-04 15:06:36 +0000 |
commit | 9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3 (patch) | |
tree | ea4413d1fff8fa55fa56bed9cbd4c3b104ed1cc5 /xmlspec/XMLFiles.h | |
parent | bf7fc63baa6fe063bc159011e796d88117723bcd (diff) | |
download | librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.tar.gz librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.tar.bz2 librpm-tizen-9d880e91429b66f64f4d162a7b50ef5c4c5ac7f3.zip |
Update from "Jaco Greeff" <jaco@puxedo.org>.
CVS patchset: 5462
CVS date: 2002/06/04 15:06:36
Diffstat (limited to 'xmlspec/XMLFiles.h')
-rw-r--r-- | xmlspec/XMLFiles.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/xmlspec/XMLFiles.h b/xmlspec/XMLFiles.h index 7cf9444f5..681fd21cb 100644 --- a/xmlspec/XMLFiles.h +++ b/xmlspec/XMLFiles.h @@ -13,6 +13,9 @@ #include "XMLAttrs.h" #include "XMLBase.h" +// rpm includes +#include <rpmbuild.h> + // forward class definitions class XMLPackage; class XMLFiles; @@ -50,12 +53,14 @@ public: * @param szAttr The file's attribute (NULL if default) * @param szOwner The file's owner (NULL if default) * @param szGroup The file's group (NULL if default) + * @param szConfig The configuration parameter * @param szPath The file path * @return none **/ XMLFile(const char* szAttr, const char* szOwner, const char* szGroup, + const char* szConfig, const char* szPath); /** @@ -187,14 +192,37 @@ public: return m_sGroup.c_str(); } + /** + * Checks for config directives + * . + * @param none + * @return true if we have one, false otherwise + **/ + bool hasConfig() + { + return m_sConfig.length() ? true : false; + } + + /** + * Returns the config attribute + * . + * @param none + * @return the sttribute string + **/ + const char* getConfig() + { + return m_sConfig.c_str(); + } + // // member variables // protected: - string m_sPath; - string m_sAttr; - string m_sOwner; - string m_sGroup; + string m_sPath; + string m_sAttr; + string m_sOwner; + string m_sGroup; + string m_sConfig; }; // <files ...> @@ -214,6 +242,18 @@ public: static bool parseCreate(XMLAttrs* pAttrs, XMLSpec* pSpec); + /** + * Creates file objects from an RPM Spec structure + * . + * @param pPackage Pointer to the package + * @param pSpec Pointer to the RPM spec + * @param pXSpec pointer to the XMLSpec object to populate + * @return true on success, false otherwise + **/ + static bool structCreate(PackageStruct* pPackage, + Spec pSpec, + XMLSpec* pXSpec); + // // constructors/destructor // |