Audacity 3.2.0
|
A class that parses update server data format. More...
#include <UpdateDataParser.h>
Public Member Functions | |
UpdateDataParser () | |
~UpdateDataParser () | |
bool | Parse (const VersionPatch::UpdateDataFormat &updateData, VersionPatch *versionPatch) |
Parsing from update data format to VersionPatch fields. More... | |
Public Member Functions inherited from XMLTagHandler | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
Private Types | |
enum class | XmlParsedTags : int { kNotUsedTag , kUpdateTag , kDescriptionTag , kOsTag , kWin32Tag , kWin64Tag , kMacosTag , kLinuxTag , kVersionTag , kLinkTag } |
Private Member Functions | |
bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs) override |
void | HandleXMLEndTag (const std::string_view &tag) override |
void | HandleXMLContent (const std::string_view &content) override |
XMLTagHandler * | HandleXMLChild (const std::string_view &tag) override |
wxArrayString | SplitChangelogSentences (const wxString &changelogContent) |
Private Attributes | |
XmlParsedTags | mXmlParsingState { XmlParsedTags::kNotUsedTag } |
std::map< XmlParsedTags, const char * > | mXmlTagNames |
VersionPatch * | mVersionPatch { nullptr } |
A class that parses update server data format.
Definition at line 19 of file UpdateDataParser.h.
|
strongprivate |
Enumerator | |
---|---|
kNotUsedTag | |
kUpdateTag | |
kDescriptionTag | |
kOsTag | |
kWin32Tag | |
kWin64Tag | |
kMacosTag | |
kLinuxTag | |
kVersionTag | |
kLinkTag |
Definition at line 34 of file UpdateDataParser.h.
UpdateDataParser::UpdateDataParser | ( | ) |
Definition at line 16 of file UpdateDataParser.cpp.
UpdateDataParser::~UpdateDataParser | ( | ) |
Definition at line 19 of file UpdateDataParser.cpp.
|
overrideprivatevirtual |
Implements XMLTagHandler.
Definition at line 163 of file UpdateDataParser.cpp.
References mXmlTagNames.
|
overrideprivate |
Definition at line 134 of file UpdateDataParser.cpp.
References VersionPatch::changelog, VersionPatch::download, kDescriptionTag, kLinkTag, kVersionTag, mVersionPatch, mXmlParsingState, VersionId::ParseFromString(), SplitChangelogSentences(), and VersionPatch::version.
|
overrideprivate |
Definition at line 122 of file UpdateDataParser.cpp.
References kDescriptionTag, kLinkTag, kNotUsedTag, kOsTag, kVersionTag, and mXmlParsingState.
|
overrideprivatevirtual |
Implements XMLTagHandler.
Definition at line 52 of file UpdateDataParser.cpp.
References BasicUI::Get(), kDescriptionTag, kLinkTag, kLinuxTag, kMacosTag, kOsTag, kVersionTag, kWin32Tag, kWin64Tag, mXmlParsingState, and mXmlTagNames.
bool UpdateDataParser::Parse | ( | const VersionPatch::UpdateDataFormat & | updateData, |
VersionPatch * | versionPatch | ||
) |
Parsing from update data format to VersionPatch fields.
updateData | InputData. |
versionPath | Parsed output data. |
Definition at line 22 of file UpdateDataParser.cpp.
References mVersionPatch, and XMLFileReader::ParseString().
Referenced by UpdateManager::GetUpdates().
|
private |
Definition at line 31 of file UpdateDataParser.cpp.
References Tuple::detail::npos().
Referenced by HandleXMLContent().
|
private |
Definition at line 68 of file UpdateDataParser.h.
Referenced by HandleXMLContent(), and Parse().
|
private |
Definition at line 46 of file UpdateDataParser.h.
Referenced by HandleXMLContent(), HandleXMLEndTag(), and HandleXMLTag().
|
private |
Definition at line 48 of file UpdateDataParser.h.
Referenced by HandleXMLChild(), and HandleXMLTag().