ReactOS 0.4.17-dev-1190-g4c812f4
ShimRef Struct Reference

#include <xml2sdb.h>

Public Member Functions

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

Public Attributes

std::string Name
 
std::string CommandLine
 
TAGID ShimTagid = 0
 
std::list< InExclude > InExcludes
 
bool KShim = false
 

Detailed Description

Definition at line 67 of file xml2sdb.h.

Member Function Documentation

◆ fromXml()

bool ShimRef::fromXml ( XMLHandle  dbNode)

Definition at line 350 of file xml2sdb.cpp.

351{
352 Name = ReadStringNode(dbNode, "NAME");
353 CommandLine = ReadStringNode(dbNode, "COMMAND_LINE");
354 KShim = ToNodeName(dbNode) == "KSHIM_REF";
355 if (!KShim)
356 {
357 ReadGeneric(dbNode, InExcludes, "INCLUDE");
358 ReadGeneric(dbNode, InExcludes, "EXCLUDE");
359 }
360 return !Name.empty();
361}
std::string CommandLine
Definition: xml2sdb.h:73
std::string Name
Definition: xml2sdb.h:72
std::list< InExclude > InExcludes
Definition: xml2sdb.h:75
bool KShim
Definition: xml2sdb.h:76
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 ShimRef::toSdb ( Database &  db)

Definition at line 363 of file xml2sdb.cpp.

364{
366 db.WriteString(TAG_NAME, Name, true);
368
369 if (KShim)
370 {
371 std::string Module = db.FindKShimModule(Name);
372 if (Module.empty())
373 {
374 SHIM_ERR("Unknown kernel shim '%s'\n", Name.c_str());
375 return false;
376 }
377 db.WriteString(TAG_MODULE, Module, true);
378 }
379 else
380 {
381 if (!ShimTagid)
384 }
385 return !!db.EndWriteListTag(tagid);
386}
DWORD TAGID
#define TAG_MODULE
Definition: db.cpp:99
#define TAG_COMMAND_LINE
Definition: db.cpp:102
#define TAG_SHIM_REF
Definition: db.cpp:89
#define SHIM_ERR(fmt,...)
Definition: sdbpapi.h:76
#define TAG_KSHIM_REF
Definition: sdbtagid.h:192
#define TAG_SHIM_TAGID
Definition: sdbtagid.h:67
TAGID FindShimTagid(const sdbstring &name)
Definition: xml2sdb.cpp:840
void WriteString(TAG tag, const sdbstring &str, bool always=false)
Definition: xml2sdb.cpp:688
BOOL EndWriteListTag(TAGID tagid)
Definition: xml2sdb.cpp:721
std::string FindKShimModule(const std::string &name)
Definition: xml2sdb.cpp:865
TAGID BeginWriteListTag(TAG tag)
Definition: xml2sdb.cpp:716
void WriteDWord(TAG tag, DWORD value, bool always=false)
Definition: xml2sdb.cpp:699
TAGID ShimTagid
Definition: xml2sdb.h:74
#define TAG_NAME
Definition: vfat.h:553

Member Data Documentation

◆ CommandLine

std::string ShimRef::CommandLine

Definition at line 73 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ InExcludes

std::list<InExclude> ShimRef::InExcludes

Definition at line 75 of file xml2sdb.h.

Referenced by fromXml().

◆ KShim

bool ShimRef::KShim = false

Definition at line 76 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ Name

std::string ShimRef::Name

Definition at line 72 of file xml2sdb.h.

Referenced by fromXml(), and toSdb().

◆ ShimTagid

TAGID ShimRef::ShimTagid = 0

Definition at line 74 of file xml2sdb.h.

Referenced by toSdb().


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