ReactOS 0.4.17-dev-1196-gb6224c3
Exe Struct Reference

#include <xml2sdb.h>

Collaboration diagram for Exe:

Public Member Functions

bool fromXml (XMLHandle dbNode)
 
bool toSdb (Database &db)
 

Public Attributes

std::string Name
 
GUID ExeID = {}
 
std::string AppName
 
std::string Vendor
 
TAGID Tagid = 0
 
std::list< MatchingFile > MatchingFiles
 
std::list< ShimRef > ShimRefs
 
std::list< FlagRef > FlagRefs
 
PlatformType Platform = PLATFORM_ANY
 
bool KDriver = false
 

Detailed Description

Definition at line 164 of file xml2sdb.h.

Member Function Documentation

◆ fromXml()

bool Exe::fromXml ( XMLHandle  dbNode)

Definition at line 623 of file xml2sdb.cpp.

624{
625 Name = ReadStringNode(dbNode, "NAME");
626 ReadGuidNode(dbNode, "EXE_ID", ExeID);
627 AppName = ReadStringNode(dbNode, "APP_NAME");
628 Vendor = ReadStringNode(dbNode, "VENDOR");
629
630 ReadGeneric(dbNode, MatchingFiles, "MATCHING_FILE");
631
632 KDriver = ToNodeName(dbNode) == "KDRIVER";
633 if (KDriver)
634 {
635 ReadGeneric(dbNode, ShimRefs, "KSHIM_REF");
636 }
637 else
638 {
639 ReadGeneric(dbNode, ShimRefs, "SHIM_REF");
640 ReadGeneric(dbNode, FlagRefs, "FLAG_REF");
641 }
642
643 Platform = ReadPlatformNode(dbNode, "RUNTIME_PLATFORM");
644
645 return !Name.empty();
646}
PlatformType Platform
Definition: xml2sdb.h:177
std::list< MatchingFile > MatchingFiles
Definition: xml2sdb.h:174
std::string Name
Definition: xml2sdb.h:169
std::string AppName
Definition: xml2sdb.h:171
GUID ExeID
Definition: xml2sdb.h:170
std::list< ShimRef > ShimRefs
Definition: xml2sdb.h:175
bool KDriver
Definition: xml2sdb.h:178
std::string Vendor
Definition: xml2sdb.h:172
std::list< FlagRef > FlagRefs
Definition: xml2sdb.h:176
bool ReadGuidNode(XMLHandle dbNode, const char *nodeName, GUID &guid)
Definition: xml2sdb.cpp:251
PlatformType ReadPlatformNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:139
void ReadGeneric(XMLHandle dbNode, std::list< T > &result, const char *nodeName)
Definition: xml2sdb.cpp:307
std::string ToNodeName(XMLHandle node)
Definition: xml2sdb.cpp:100
std::string ReadStringNode(XMLHandle dbNode, const char *nodeName)
Definition: xml2sdb.cpp:110

◆ toSdb()

bool Exe::toSdb ( Database &  db)

Definition at line 648 of file xml2sdb.cpp.

649{
651
652 db.WriteString(TAG_NAME, Name, true);
653 if (IsEmptyGuid(ExeID))
656
657
660
661 if (!WriteGeneric(MatchingFiles, db))
662 return false;
663 if (!WriteGeneric(ShimRefs, db))
664 return false;
665 if (!WriteGeneric(FlagRefs, db))
666 return false;
667
668 return !!db.EndWriteListTag(Tagid);
669}
#define TAG_EXE
Definition: db.cpp:87
#define TAG_APP_NAME
Definition: db.cpp:101
#define TAG_VENDOR
Definition: db.cpp:100
#define TAG_EXE_ID
Definition: db.cpp:120
#define TAG_KDRIVER
Definition: sdbtagid.h:190
void WriteString(TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:688
BOOL EndWriteListTag(TAGID tagid)
Definition: xml2sdb.cpp:721
void WriteBinary(TAG tag, const GUID &guid, bool always=false)
Definition: xml2sdb.cpp:676
TAGID BeginWriteListTag(TAG tag)
Definition: xml2sdb.cpp:716
TAGID Tagid
Definition: xml2sdb.h:173
#define TAG_NAME
Definition: vfat.h:553
void RandomGuid(GUID &g)
Definition: xml2sdb.cpp:82
bool WriteGeneric(std::list< T > &data, Database &db)
Definition: xml2sdb.cpp:335
bool IsEmptyGuid(const GUID &g)
Definition: xml2sdb.cpp:77

Member Data Documentation

◆ AppName

std::string Exe::AppName

Definition at line 171 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ ExeID

GUID Exe::ExeID = {}

Definition at line 170 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ FlagRefs

std::list<FlagRef> Exe::FlagRefs

Definition at line 176 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ KDriver

bool Exe::KDriver = false

Definition at line 178 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ MatchingFiles

std::list<MatchingFile> Exe::MatchingFiles

Definition at line 174 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Name

std::string Exe::Name

Definition at line 169 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Platform

PlatformType Exe::Platform = PLATFORM_ANY

Definition at line 177 of file xml2sdb.h.

Referenced by fromXml().

◆ ShimRefs

std::list<ShimRef> Exe::ShimRefs

Definition at line 175 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Tagid

TAGID Exe::Tagid = 0

Definition at line 173 of file xml2sdb.h.

Referenced by toSdb().

◆ Vendor

std::string Exe::Vendor

Definition at line 172 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().


The documentation for this struct was generated from the following files: