packageinfo.h

00001 
00002 // Name:        packageinfo.h
00003 // Purpose:     wxPackageInfo
00004 // Author:      Julian Smart, Francesco Montorsi, Daniel J. Lauk
00005 // Modified by:
00006 // Created:     2004-11-07
00007 // RCS-ID:      $Id: packageinfo.h,v 1.18 2007/01/31 13:27:46 frm Exp $
00008 // Copyright:   (c) Julian Smart, Francesco Montorsi, Daniel J. Lauk
00009 // Licence:     wxWidgets licence
00011 
00012 #ifndef _PACKAGEINFO_H_
00013 #define _PACKAGEINFO_H_
00014 
00015 // Includes
00016 #include "wx/download.h"
00017 #include "wx/xml/xml.h"
00018 #include "wx/tokenzr.h"
00019 #include "wx/filefn.h"
00020 #include "wx/filesys.h"
00021 
00022 #include "wxp/packageutils.h"
00023 #include "wxp/packagecmd.h"
00024 #include "wxp/packagedep.h"
00025 
00026 // forward declarations
00027 class wxConfigBase;
00028 class wxPackage;
00029 class wxPackageArray;
00030 class wxFFileInputStream;
00031 class wxPackageCommandSet;
00032 
00033 
00034 
00035 // ----------------------------------------------------------------------------
00036 // enums
00037 // ----------------------------------------------------------------------------
00038 
00041 enum wxPackageCategory
00042 {
00043     wxPC_INVALID = -1,
00044 
00045     wxPC_APPLICATION,
00046     wxPC_CONTROL,
00047     wxPC_DIALOG,
00048     wxPC_DATABASE,
00049     wxPC_DATACONTAINER,
00050     wxPC_GRAPHICS,
00051     wxPC_IMPORTEXPORT,
00052     wxPC_MISCELLANEOUS,
00053     wxPC_NETWORKING,
00054     wxPC_PRINTING,
00055     wxPC_STREAM,
00056     wxPC_SYSTEM,
00057     wxPC_TEXTPROCESSING,
00058     wxPC_TUTORIALDOC,
00059     wxPC_WINDOWCONTAINER,
00060     wxPC_WINDOWLAYOUT,
00061     wxPC_WRAPPER,
00062     wxPC_XRC,
00063 
00064     wxPC_MAX
00065 };
00066 
00068 enum wxPackageLicenseType
00069 {
00070     wxPLT_INVALID = -1,
00071 
00072     wxPLT_OPENSOURCE,
00073     wxPLT_COMMERCIAL,
00074     wxPLT_SHAREWARE,
00075     wxPLT_FREEWARE,
00076     wxPLT_OTHER,
00077 
00078     wxPLT_MAX
00079 };
00080 
00082 enum wxPackageDevelopmentStatus
00083 {
00084     wxPDS_INVALID = -1,
00085 
00086     wxPDS_ALPHA,
00087     wxPDS_BETA,
00088     wxPDS_STABLE,
00089 
00090     wxPDS_MAX
00091 };
00092 
00094 enum wxPackageProgLanguage
00095 {
00096     wxPPL_INVALID = -1,
00097 
00098     wxPPL_CPP,
00099     wxPPL_LUA,
00100     wxPPL_PYTHON,
00101     wxPPL_RUBY,
00102     wxPPL_PERL,
00103 
00104     wxPPL_MAX
00105 };
00106 
00108 enum wxPackageCompressionMode
00109 {
00110     wxPCM_INVALID = -1,
00111 
00112     wxPCM_ZIP,
00113     wxPCM_TAR_GZ,
00114 
00115     wxPCM_MAX
00116 };
00117 
00120 enum wxPackageExcludeMode
00121 {
00122     wxPEM_INVALID = -1,
00123 
00124     wxPEM_FILE,
00125     wxPEM_DIRECTORY,
00126     wxPEM_PATTERN,
00127 
00128     wxPEM_MAX
00129 };
00130 
00131 wxDEFINE_STRING2ENUM(PackageCategory)
00132 wxDEFINE_STRING2ENUM(PackageLicenseType)
00133 wxDEFINE_STRING2ENUM(PackageDevelopmentStatus)
00134 wxDEFINE_STRING2ENUM(PackageProgLanguage)
00135 wxDEFINE_STRING2ENUM(PackageCompressionMode)
00136 wxDEFINE_STRING2ENUM(PackageExcludeMode)
00137 
00138 // the compression levels for the compression formats defined above
00139 #define wxPKG_TARGZ_COMPRESSION_LEVEL     wxZ_BEST_COMPRESSION
00140 #define wxPKG_ZIP_COMPRESSION_LEVEL       8 /* in 0-9 range where 9 is best compression */
00141 
00142 // the flags accepted by wxPackageInfo::GetSubstCmdForStage
00143 enum
00144 {
00145     // substitute only the options whose value differs from the default value
00146     wxPKGCMD_ONLY_CHANGED = 2,
00147 
00148     // substitute only the options which "match" (see wxPackageCondition::Matches)
00149     // a particular wxPackageCondition
00150     wxPKGCMD_ONLY_MATCHING_CONDITION = 4
00151 };
00152 
00153 
00154 
00155 // ----------------------------------------------------------------------------
00156 // wxPackageInfo
00157 // ----------------------------------------------------------------------------
00158 
00162 class wxPackageInfo : public wxPackageId
00163 {
00164     friend class wxPackageArray;
00165     DECLARE_DYNAMIC_CLASS(wxPackageInfo)
00166 
00167 public:
00168 
00170     wxPackageInfo();
00171 
00173     virtual ~wxPackageInfo() {}
00174 
00175 
00176 public:     // misc
00177 /*
00178     bool operator== (const wxPackageInfo& package) const;
00179     bool operator!= (const wxPackageInfo& package) const
00180         { return !(*this == package); }
00181 */
00182     // just a simple function to write more readable code
00183     bool HasSameIdOf(const wxPackageInfo &pkg) const
00184         { return ((const wxPackageId &)*this) == ((const wxPackageId &)pkg); }
00185 
00186 public:     // static
00187 
00188     static wxPackageHTMLOutputFormatHashMap s_hashmapHTMLFormats;
00189 
00191     static bool LoadStandardOutputFormats(const wxString &dirbase);
00192 
00193 public:    // BASICS getters
00194 
00195     wxString GetDescription() const { return m_strDescription; }
00196     wxArrayString GetKeywords() const { return m_arrKeywords; }
00197     wxString GetKeywordsStr() const { return wxArray2String(m_arrKeywords, wxT(", ")); }
00198     wxString GetWebsite() const { return m_strWebsite; }
00199     wxDateTime GetCreationDate() const { return m_creationDate; }
00200 
00201     wxPackageCategory GetPrimaryCategory() const { return m_catPrimary; }
00202     wxPackageCategory GetSecondaryCategory() const { return m_catSecondary; }
00203 
00204     wxString GetPrimaryCategoryStr() const
00205         { return wxPackageCategory2String(GetPrimaryCategory()); }
00206     wxString GetSecondaryCategoryStr() const
00207         { return wxPackageCategory2String(GetSecondaryCategory()); }
00208 
00209 public:     // PACKAGING getters
00210 
00211     wxString GetRelativeRoot() const { return m_strRoot; }
00212     wxString GetOutputFileName() const { return m_strFileName; }
00213     wxArrayString GetExcluded(wxPackageExcludeMode type) const
00214         { return m_arrExcluded[type]; }
00215     wxPackageCompressionMode GetCompressionMode() const { return m_compressMode; }
00216 
00217     wxString GetCompressionModeStr() const
00218         { return wxPackageCompressionMode2String(m_compressMode); }
00219 
00220     wxString GetUploadDestination() const
00221         { return m_strUpload; }
00222 
00223     // not a simple getter: given the ABSOLUTE path of the WXP location, it returns
00224     // the (absolute) project folder.
00225     wxString GetProjectFolder(const wxString &wxppath) const;
00226 
00227 public:     // DETAILS getters
00228 
00229     wxPackageBuildSystemType GetBuildSystemType() const
00230         { return m_buildSystemType; }
00231     wxPackageDevelopmentStatus GetDevelopmentStatus() const
00232         { return m_devStatus; }
00233     wxPackageProgLanguage GetProgLanguage() const
00234         { return m_language; }
00235 
00236     wxString GetBuildSystemTypeStr() const
00237         { return wxPackageBuildSystemType2String(GetBuildSystemType()); }
00238     wxString GetDevelopmentStatusStr() const
00239         { return wxPackageDevelopmentStatus2String(GetDevelopmentStatus()); }
00240     wxString GetProgLanguageStr() const
00241         { return wxPackageProgLanguage2String(GetProgLanguage()); }
00242 
00243     wxString GetRSSHref() const
00244         { return m_strRSSHref; }
00245 
00246     wxArrayString GetDownloadHref() const
00247         { return m_arrDownloadHref; }
00248     wxString GetDownloadHref(size_t n) const
00249         { return SubstituteInfo(m_arrDownloadHref[n]); }
00250     wxString GetRepoDownloadLink() const
00251         { return SubstituteInfo(m_strDownloadFromRepoHref); }
00252 
00253     // not a trivial getter: returns the URL to use when you want to
00254     // download this package. It gives priority to the repo download
00255     // link and, if this is not available, chooses a random mirror
00256     // from the download href array:
00257     wxString GetDownloadLink() const;
00258 
00259     wxPackageDataWithRef GetLogoRef() const
00260         { return m_refLogo; }
00261 
00262     wxPackageDataWithRefArray GetDocumentation() const
00263         { return m_arrDocumentation; }
00264     wxPackageDataWithRef GetDocumentation(size_t n) const
00265         { return m_arrDocumentation[n]; }
00266     wxPackageDataWithRefArray GetScreenshots() const
00267         { return m_arrScreenshots; }
00268     wxPackageDataWithRef GetScreenshot(size_t n) const
00269        { return m_arrScreenshots[n]; }
00270 
00271     size_t GetNumberOfSamples() const
00272         { return m_nSamples; }
00273     wxULongLong GetCompressedSize() const
00274         { return m_nCompressedSize; }
00275 
00276     wxString GetMD5() const
00277         { return m_strMD5; }
00278 
00279 public:     // LICENSING getters
00280 
00281     wxPackageDataWithRef GetLicenseRef() const { return m_refLicense; }
00282     wxString GetLicenseTypeStr() const
00283         { return wxPackageLicenseType2String(GetLicenseType()); }
00284     wxPackageLicenseType GetLicenseType() const { return m_nLicenseType; }
00285 
00286     wxString GetOrganization() const { return m_strOrganization; }
00287     wxString GetOrganizationHref() const { return m_strOrganizationHref; }
00288 
00289     wxString GetCost() const { return m_strCost; }
00290 
00291     wxArrayString GetAuthors() const { return m_arrAuthorName; }
00292     wxArrayString GetAuthorsHref() const { return m_arrAuthorHref; }
00293     wxArrayString GetMaintainers() const { return m_arrMaintainerName; }
00294     wxArrayString GetMaintainersHref() const { return m_arrMaintainerHref; }
00295 
00296     wxString GetCredits() const { return m_strCredits; }
00297     wxString GetCopyright() const { return m_strCopyright; }
00298 
00299 public:     // DEPENDENCIES getters
00300 
00301     long GetSupportedPortFlag() const
00302     {
00303         long ret = 0;
00304         for (size_t i=0; i < m_arrSupportedPort.GetCount(); i++)
00305             ret |= m_arrSupportedPort[i];
00306         return ret;
00307     }
00308 
00309     long GetTestedPortFlag() const
00310     {
00311         long ret = 0;
00312         for (size_t i=0; i < m_arrTestedPort.GetCount(); i++)
00313             ret |= m_arrTestedPort[i];
00314         return ret;
00315     }
00316 
00317     wxArrayInt GetSupportedPorts() const
00318         { return m_arrSupportedPort; }
00319     wxArrayInt GetTestedPorts() const
00320         { return m_arrTestedPort; }
00321     wxVersionRangeArray GetSupportedVersions() const
00322         { return m_arrSupportedVersion; }
00323     wxVersionRangeArray GetTestedVersions() const
00324         { return m_arrTestedVersion; }
00325 
00326     wxPackageDependencyArray GetDependencies() const
00327         { return m_arrDependencies; }
00328 
00329     bool SupportsWxPort(wxPortId p, const wxVersion &ver) const;
00330 
00331     bool HasSameSupportedPortVersions() const
00332     {
00333         for (size_t i=0; i < m_arrSupportedPort.GetCount() - 1; i++)
00334             if (m_arrSupportedVersion[i] != m_arrSupportedVersion[i+1])
00335                 return false;
00336         return true;
00337     }
00338 
00339     bool HasSameTestedPortVersions() const
00340     {
00341         for (size_t i=0; i < m_arrTestedPort.GetCount() - 1; i++)
00342             if (m_arrTestedVersion[i] != m_arrTestedVersion[i+1])
00343                 return false;
00344         return true;
00345     }
00346 
00347 public:     // BUILD SYSTEM getters
00348 
00349     // provide both const and non-const overloads of the getters:
00350 
00351     wxPackageCommandArray &GetCmdForStage(wxPackageBuildSystemStage stage)
00352         { return m_arrCommands[wxPackageBuildSystemStage2Idx(stage)]; }
00353     const wxPackageCommandArray &GetCmdForStage(wxPackageBuildSystemStage stage) const
00354         { return m_arrCommands[wxPackageBuildSystemStage2Idx(stage)]; }
00355 
00356     wxPackageCommandOptionArray &GetBuildSysOptions()
00357         { return m_opt; }
00358     const wxPackageCommandOptionArray &GetBuildSysOptions() const
00359         { return m_opt; }
00360 
00361     long GetSupportedBuildSysFormats() const
00362         { return m_nSupportedFormats; }
00363     wxString GetBuildSystemHref() const
00364         { return m_strBuildSystemHref; }
00365 
00366 
00367     // non-trivial (i.e. not-inlined) getters:
00368 
00372     wxPackageCommandArray 
00373         GetSubstCmdForStage(wxPackageBuildSystemStage stage,
00374                             long flags,
00375                             const wxPackageCondition &cond = 
00376                                     wxEmptyPackageCondition) const;
00377 
00380     wxPackageCommandOptionArray GetSubstBuildSysOptions() const;
00381 
00383     bool SupportsBuildSysFormat(wxPackageCompilerFormat fmt) const;
00384 
00387     wxArrayString GetUsedOptionPresets() const;
00388 
00394     wxString GetUsedCommandPreset(wxStringHashMap &h) const;
00395 
00396 public:     // BASICS setters
00397 
00398     void SetDescription(const wxString &str)
00399         { m_strDescription=str; }
00400 
00401     void SetKeywords(const wxString &str)
00402     { 
00403         m_arrKeywords=wxString2Array(str, wxT(',')); 
00404         for (size_t i=0; i<m_arrKeywords.GetCount(); i++)
00405             m_arrKeywords[i] = m_arrKeywords[i].Strip(wxString::both);
00406     }
00407     void SetKeywords(const wxArrayString &arr)
00408         { m_arrKeywords=arr; }
00409 
00410     void SetWebsite(const wxString &str)
00411         { m_strWebsite=str; }
00412     void SetCreationDate(const wxDateTime &date)
00413         { m_creationDate=date; }
00414     void SetCreationDate(const wxString &str)
00415         { m_creationDate.ParseDate(str); }
00416 
00417     void SetCategories(wxPackageCategory primary, wxPackageCategory secondary)
00418         { m_catPrimary=primary; m_catSecondary=secondary; }
00419 
00420     void SetPrimaryCategoryStr(const wxString &str)
00421         { m_catPrimary = wxString2PackageCategory(str); }
00422     void SetSecondaryCategoryStr(const wxString &str)
00423         { m_catSecondary = wxString2PackageCategory(str); }
00424 
00425 public:     // PACKAGING setters
00426 
00427     void SetRoot(const wxString &root)
00428         { m_strRoot=root; }
00429     void SetFileName(const wxString &filename)
00430         { m_strFileName=filename; } 
00431 
00432     void SetExcluded(wxPackageExcludeMode mode,
00433                      const wxArrayString &arr)
00434     { 
00435         m_arrExcluded[mode]=arr; 
00436     }
00437 
00438     void SetCompressionMode(wxPackageCompressionMode mode)
00439         { m_compressMode=mode; }
00440     void SetCompressModeStr(const wxString &str)
00441         { m_compressMode=wxString2PackageCompressionMode(str); }
00442 
00443     void SetUploadDestination(const wxString &str)
00444         { m_strUpload=str; }
00445 
00446 public:     // LICENSING setters
00447 
00448     void SetLicenseRef(const wxPackageDataWithRef &ref)
00449         { m_refLicense=ref; }
00450     void SetLicenseType(wxPackageLicenseType t)
00451         { m_nLicenseType=t; }
00452     void SetLicenseTypeStr(const wxString &str)
00453         { m_nLicenseType=wxString2PackageLicenseType(str); }
00454 
00455     void SetOrganization(const wxString &str, const wxString &href)
00456         { m_strOrganization=str; m_strOrganizationHref=href; }
00457 
00458     void SetCost(const wxString &str)
00459         { m_strCost=str; }
00460     void SetCredits(const wxString &str)
00461         { m_strCredits=str; }
00462     void SetCopyright(const wxString &str)
00463         { m_strCopyright=str; }
00464 
00465     void SetAuthors(const wxArrayString &name, const wxArrayString &href)
00466         { m_arrAuthorName=name; m_arrAuthorHref=href; }
00467     void AddAuthor(const wxString &name, const wxString &href)
00468         { m_arrAuthorName.Add(name); m_arrAuthorHref.Add(href); }
00469 
00470     void SetMaintainers(const wxArrayString &name, const wxArrayString &href)
00471         { m_arrMaintainerName=name; m_arrMaintainerHref=href; }
00472     void AddMaintainer(const wxString &name, const wxString &href)
00473         { m_arrMaintainerName.Add(name); m_arrMaintainerHref.Add(href); }
00474 
00475 public:     // DETAILS setters
00476 
00477     void SetDevelopmentStatus(wxPackageDevelopmentStatus t)
00478         { m_devStatus=t; }
00479     void SetDevelopmentStatusStr(const wxString &str)
00480         { m_devStatus=wxString2PackageDevelopmentStatus(str); }
00481 
00482     void SetProgLanguage(wxPackageProgLanguage t)
00483         { m_language=t; }
00484     void SetProgLanguageStr(const wxString &str)
00485         { m_language=wxString2PackageProgLanguage(str); }
00486 
00487     void SetRSSHref(const wxString &str)
00488         { m_strRSSHref=str; }
00489     void AddMirror(const wxString &href)
00490         { m_arrDownloadHref.Add(href); }
00491 
00492     void SetRepoDownloadLink(const wxString &href)
00493         { m_strDownloadFromRepoHref=href; }
00494 
00495     // href & localref management
00496     void AddDoc(const wxPackageDataWithRef &ref)
00497         { m_arrDocumentation.Add(ref); }
00498     void AddDoc(const wxString &type, const wxString &href, const wxString &localref)
00499         { m_arrDocumentation.Add(wxPackageDataWithRef(type, href, localref)); }
00500 
00501     void AddScreenshot(const wxPackageDataWithRef &ref)
00502         { m_arrScreenshots.Add(ref); }
00503     void AddScreenshot(const wxString &href, const wxString &localref)
00504         { m_arrScreenshots.Add(wxPackageDataWithRef(href, href, localref)); }
00505 
00506     void SetLogoRef(const wxPackageDataWithRef &ref)
00507         { m_refLogo=ref; }
00508     void SetLogo(const wxString &href, const wxString &localref)
00509         { m_refLogo.SetHref(href); m_refLogo.SetLocalRef(localref); }
00510     void SetNumberOfSamples(size_t n)
00511         { m_nSamples=n; }
00512     void SetCompressedSize(wxULongLong n)
00513         { m_nCompressedSize=n; }
00514     void SetMD5(const wxString &md5)
00515         { m_strMD5=md5; }
00516 
00517 public:     // DEPENDENCIES setters
00518 
00519     void AddSupportedPort(wxPortId port, const wxVersionRange &version)
00520     {
00521         if (port != wxPORT_UNKNOWN)
00522         {
00523             m_arrSupportedPort.Add(port);
00524             m_arrSupportedVersion.Add(version);
00525         }
00526     }
00527 
00528     void AddTestedPort(wxPortId port, const wxVersionRange &version)
00529     {
00530         if (port != wxPORT_UNKNOWN)
00531         {
00532             m_arrTestedPort.Add(port);
00533             m_arrTestedVersion.Add(version);
00534         }
00535     }
00536 
00537     void AddSupportedPort(const wxString &port, const wxVersionRange &version)
00538         { AddSupportedPort(wxPlatformInfo::GetPortId(port), version); }
00539     void AddTestedPort(const wxString &port, const wxVersionRange &version)
00540         { AddTestedPort(wxPlatformInfo::GetPortId(port), version); }
00541 
00542     void SetSupportedPorts(const wxArrayInt &port, const wxVersionRangeArray &version)
00543     {
00544         wxASSERT(port.GetCount() == version.GetCount());
00545         m_arrSupportedPort.Clear();
00546         m_arrSupportedVersion.Clear();
00547         for (size_t i=0; i<port.GetCount(); i++)
00548             AddSupportedPort((wxPortId)port[i], version[i]);
00549     }
00550 
00551     void SetTestedPorts(const wxArrayInt &port, const wxVersionRangeArray &version)
00552     {
00553         wxASSERT(port.GetCount() == version.GetCount());
00554         m_arrTestedPort.Clear();
00555         m_arrTestedVersion.Clear();
00556         for (size_t i=0; i<port.GetCount(); i++)
00557             AddTestedPort((wxPortId)port[i], version[i]);
00558     }
00559 
00560     void AddDependency(const wxPackageDependency &toadd)
00561         { m_arrDependencies.Add(toadd); m_arrDependencies.Last().SetOwnerId(*this); }
00562 
00563     void SetDependencies(const wxPackageDependencyArray &arr)
00564     {
00565         m_arrDependencies = arr;
00566         for (size_t i=0; i<arr.GetCount(); i++)
00567             m_arrDependencies[i].SetOwnerId(*this);
00568     }
00569 
00570 public:     // BUILD SYSTEM setters
00571 
00572 
00573     void AddBuildSysOption(const wxPackageCommandOption &opt)
00574         { m_opt.Add(opt); }
00575     void AddBuildSysOptions(const wxPackageCommandOptionArray &arr)
00576     {
00577         for (size_t j=0; j<arr.GetCount(); j++)
00578             AddBuildSysOption(arr[j]);
00579     }
00580 
00581     void AddBuildSysCommand(long stages, const wxPackageCommand &cmd);
00582     void AddBuildSysCommands(const wxPackageCommandArray &arr);
00583 
00584     void SetBuildSysOptions(const wxPackageCommandOptionArray &arr)
00585         { m_opt=arr; }
00586     void SetBuildSysCommands(wxPackageBuildSystemStage stage, const wxPackageCommandArray &arr)
00587         { m_arrCommands[wxPackageBuildSystemStage2Idx(stage)]=arr; }
00588 
00589     void SetBuildSysHref(const wxString &href)
00590         { m_strBuildSystemHref=href; }
00591 
00592     void SetBuildSystemType(wxPackageBuildSystemType t)
00593         { m_buildSystemType=t; }
00594     void SetBuildSystemTypeStr(const wxString &str)
00595         { m_buildSystemType=wxString2PackageBuildSystemType(str); }
00596 
00597     void SetSupportedFormats(long n)
00598         { m_nSupportedFormats=n; }
00599 
00600 public:     // misc utilities
00601 
00602     bool IsOk() const;
00603 
00608     virtual wxString SubstituteInfo(const wxString &str,
00609                                     wxPackageSubstituteInfoContext ctx = wxPSIC_WXHTML) const;
00610 
00613     void UpdateSubstitutionHashMap(wxPackageSubstituteInfoContext ctx = wxPSIC_INVALID);
00614 
00616     wxStringHashMap GetSubstitutionHashMap(wxPackageSubstituteInfoContext ctx) const
00617         { return m_hashmapSubstitution[ctx]; }
00618 
00621     bool IsCachedSubstitutionHashMapValid(wxPackageSubstituteInfoContext ctx) const
00622         { return !m_hashmapSubstitution[ctx].empty(); }
00623 
00627     void InvalidateCachedSubstHashMap(wxPackageSubstituteInfoContext ctx = wxPSIC_INVALID);
00628 
00629 public:         // static substitutions
00630 
00633     static wxStringHashMap s_hashmapKeywords;
00634 
00637     static wxStringHashMap GetStandardSubstitutionHashMap();
00638 
00641     static wxString SubstituteStandard(const wxString &str)
00642         { return wxDoStringSubstitution(str, GetStandardSubstitutionHashMap()); }
00643 
00644 protected:      // misc utilities
00645 
00647     virtual void DoUpdateSubstitutionHashMap(wxPackageSubstituteInfoContext ctx);
00648 
00651     virtual wxPackageCommand GetCmd(const wxPackageCommand &cmd, 
00652                                     wxPackageBuildSystemStage stage,
00653                                     long flags,
00654                                     const wxPackageCondition &cond) const;
00655 
00656 protected:      // BASICS
00657 
00658     wxArrayString m_arrKeywords;
00659     wxString m_strDescription;
00660     wxString m_strWebsite;
00661     wxDateTime m_creationDate;
00662 
00663     wxPackageCategory m_catPrimary, m_catSecondary;
00664 
00665 protected:      // PACKAGING
00666 
00667     wxString m_strRoot;
00668     wxString m_strFileName;
00669     wxString m_strUpload;
00670 
00671     wxArrayString m_arrExcluded[wxPEM_MAX];
00672     wxPackageCompressionMode m_compressMode;
00673 
00674 protected:      // LICENSING
00675 
00676     wxPackageDataWithRef m_refLicense;
00677     wxPackageLicenseType m_nLicenseType;
00678 
00679     wxString m_strOrganization, m_strOrganizationHref;
00680     wxString m_strCost;
00681 
00682     wxArrayString m_arrAuthorName, m_arrAuthorHref;
00683     wxArrayString m_arrMaintainerName, m_arrMaintainerHref;
00684 
00685     wxString m_strCredits;
00686     wxString m_strCopyright;
00687 
00688 protected:      // DETAILS
00689 
00690     wxPackageDevelopmentStatus m_devStatus;
00691     wxPackageProgLanguage m_language;
00692 
00693     wxString m_strRSSHref;
00694     wxArrayString m_arrDownloadHref;
00695 
00696     // the repository download link: this is the URL to use when downloading
00697     // a package which is part of a repository.
00698     // NOTE: this info is not part of the WXP description file
00699     //       but rather of the WXL repository descriptor: thus it's
00700     //       set only when this wxPackageInfo has been created when
00701     //       parsing a WXL file.
00702     wxString m_strDownloadFromRepoHref;
00703 
00704     // these can have both an href and a localref
00705     wxPackageDataWithRef m_refLogo;
00706     wxPackageDataWithRefArray m_arrDocumentation;
00707     wxPackageDataWithRefArray m_arrScreenshots;
00708 
00709     size_t m_nSamples;
00710 
00711     // the size, in bytes, of the WXZ for this package or 0
00712     // if not available.
00713     wxULongLong m_nCompressedSize;
00714 
00715     // the MD5 checksum
00716     // NOTE: this info is not part of the WXP description file
00717     //       but rather of the WXL repository descriptor: thus it's
00718     //       set only when this wxPackageInfo has been created when
00719     //       parsing a WXL file.
00720     wxString m_strMD5;
00721 
00722 protected:      // DEPENDENCIES
00723 
00724     wxVersionRangeArray m_arrSupportedVersion, m_arrTestedVersion;
00725 
00726     // WARNING: cannot use a simple flag here which contains
00727     //          combined values of supported/tested ports as
00728     //          in that case we could not understand which
00729     //          version is supported by which port.
00730     wxArrayInt m_arrSupportedPort, m_arrTestedPort;
00731 
00732     // inter-packages dependencies
00733     wxPackageDependencyArray m_arrDependencies;
00734 
00735 protected:      // BUILD SYSTEM
00736 
00738     wxPackageBuildSystemType m_buildSystemType;
00739 
00746     wxString m_strBuildSystemHref;
00747 
00750     long m_nSupportedFormats;
00751 
00753     wxPackageCommandOptionArray m_opt;
00754 
00758     wxPackageCommandArray m_arrCommands[wxPBSS_MAX];
00759 
00760 protected:     // OTHERS
00761 
00764     wxStringHashMap m_hashmapSubstitution[wxPSIC_MAX];
00765 };
00766 
00767 #endif      // _PACKAGEINFO_H_
00768 

Generated on Thu Feb 1 22:14:31 2007 for wxWidgets Package Manager by  doxygen 1.5.1-p1