ReactOS 0.4.17-dev-1190-g4c812f4
Shim Struct Reference

#include <xml2sdb.h>

Collaboration diagram for Shim:

Public Member Functions

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

Public Attributes

std::string Name
 
std::string DllFile
 
GUID FixID = {}
 
TAGID Tagid = 0
 
std::list< InExclude > InExcludes
 
PlatformType Platform = PLATFORM_ANY
 
bool KShim = false
 

Detailed Description

Definition at line 88 of file xml2sdb.h.

Member Function Documentation

◆ fromXml()

bool Shim::fromXml ( XMLHandle  dbNode)

Definition at line 416 of file xml2sdb.cpp.

417{
418 Name = ReadStringNode(dbNode, "NAME");
419 KShim = ToNodeName(dbNode) == "KSHIM";
420 // Kernel shims are implemented in a module (for example 'NT kernel component')
421 DllFile = ReadStringNode(dbNode, KShim ? "MODULE" : "DLLFILE");
422 ReadGuidNode(dbNode, "FIX_ID", FixID);
423 // GENERAL ?
424 // DESCRIPTION_RC_ID
425 if (!KShim)
426 {
427 ReadGeneric(dbNode, InExcludes, "INCLUDE");
428 ReadGeneric(dbNode, InExcludes, "EXCLUDE");
429 }
430 return !Name.empty() && !DllFile.empty();
431}
GUID FixID
Definition: xml2sdb.h:95
std::list< InExclude > InExcludes
Definition: xml2sdb.h:97
bool KShim
Definition: xml2sdb.h:99
std::string DllFile
Definition: xml2sdb.h:94
std::string Name
Definition: xml2sdb.h:93
bool ReadGuidNode(XMLHandle dbNode, const char *nodeName, GUID &guid)
Definition: xml2sdb.cpp:251
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

Referenced by Database::fromXml().

◆ toSdb()

bool Shim::toSdb ( Database &  db)

Definition at line 433 of file xml2sdb.cpp.

434{
436 if (!KShim)
440 if (IsEmptyGuid(FixID))
443 if (!WriteGeneric(InExcludes, db))
444 return false;
445 return !!db.EndWriteListTag(Tagid);
446}
#define TAG_MODULE
Definition: db.cpp:99
#define TAG_FIX_ID
Definition: sdbtagid.h:209
#define TAG_KSHIM
Definition: sdbtagid.h:191
#define TAG_DLLFILE
Definition: sdbtagid.h:137
void InsertShimTagid(const sdbstring &name, TAGID tagid)
Definition: xml2sdb.cpp:835
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:96
#define TAG_SHIM
Definition: tag.h:144
#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

◆ DllFile

std::string Shim::DllFile

Definition at line 94 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ FixID

GUID Shim::FixID = {}

Definition at line 95 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ InExcludes

std::list<InExclude> Shim::InExcludes

Definition at line 97 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ KShim

bool Shim::KShim = false

Definition at line 99 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Name

std::string Shim::Name

Definition at line 93 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Platform

PlatformType Shim::Platform = PLATFORM_ANY

Definition at line 98 of file xml2sdb.h.

Referenced by Database::fromXml().

◆ Tagid

TAGID Shim::Tagid = 0

Definition at line 96 of file xml2sdb.h.

Referenced by toSdb().


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