summaryrefslogtreecommitdiff
path: root/server/src/transactionparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/transactionparser.cc')
-rw-r--r--server/src/transactionparser.cc40
1 files changed, 0 insertions, 40 deletions
diff --git a/server/src/transactionparser.cc b/server/src/transactionparser.cc
index 2ba4fc4..78c9b21 100644
--- a/server/src/transactionparser.cc
+++ b/server/src/transactionparser.cc
@@ -71,41 +71,6 @@ void TransactionParser::startTag(std::string name, std::map< std::string, std::s
}
}
-void TransactionParser::endTag(std::string name)
-{
- if(name == "pracro") done = true;
-}
-
-int TransactionParser::readData(char *data, size_t size)
-{
- printf("readData is not uasble with transaction parser!.\nUse parse(std::string) instead.\n");
- return 0;
-}
-
-bool TransactionParser::parse(std::string data)
-{
- bufferbytes = data.length();
- totalbytes += bufferbytes;
-
- if(! XML_Parse(p, (char*)data.c_str(), data.size(), false) ) {
- if(XML_GetErrorCode(p) == XML_ERROR_JUNK_AFTER_DOC_ELEMENT) return true;
- parseError((char*)data.c_str(), data.size(), XML_ErrorString(XML_GetErrorCode(p)), (int)XML_GetCurrentLineNumber(p));
- return false;
- }
-
- if(done) {
- if(! XML_Parse(p, (char*)data.c_str(), 0, true) ) {
- if(XML_GetErrorCode(p) == XML_ERROR_JUNK_AFTER_DOC_ELEMENT) return true;
- parseError((char*)data.c_str(), 0, XML_ErrorString(XML_GetErrorCode(p)), (int)XML_GetCurrentLineNumber(p));
- return false;
- }
- }
-
- printf("Got END_OF_TEMPLATE at %ld\n", XML_GetCurrentByteIndex(p));
-
- return done;
-}
-
void TransactionParser::parseError(char *buf, size_t len, std::string error, int lineno)
{
fprintf(stderr, "TransactionParser error at line %d: %s\n", lineno, error.c_str());
@@ -114,8 +79,3 @@ void TransactionParser::parseError(char *buf, size_t len, std::string error, int
fprintf(stderr, "]\n");
fflush(stderr);
}
-
-unsigned int TransactionParser::usedBytes()
-{
- return bufferbytes + (XML_GetCurrentByteIndex(p) - totalbytes);
-}