* Author : Boris Mikhailenko <stg34@stargazer.dp.ua>
*/
- /*
- $Revision: 1.8 $
- $Date: 2010/08/04 00:40:38 $
- $Author: faust $
- */
-
#include "stg/servconf.h"
#include "stg/common.h"
#include <cstdio>
#include <cstring>
-using namespace std;
-
//-----------------------------------------------------------------------------
-int AnsRecv(void * data, list<string> * list1)
+int AnsRecv(void * data, std::list<std::string> * list1)
{
SERVCONF * sc = static_cast<SERVCONF *>(data);
int len, done = 0;
//loop parsing
-list<string>::iterator node;
+std::list<std::string>::iterator node;
node = list1->begin();
while (node != list1->end())
return st_xml_parse_error;
}
++node;
-
}
return st_ok;
//-----------------------------------------------------------------------------
void Start(void *data, const char *el, const char **attr)
{
-SERVCONF * sc;
-sc = (SERVCONF*)data;
+SERVCONF * sc = static_cast<SERVCONF *>(data);
sc->Start(el, attr);
}
//-----------------------------------------------------------------------------
-void End(void *data, const char *el)
+void End(void * data, const char * el)
{
-SERVCONF * sc;
-sc = (SERVCONF*)data;
+SERVCONF * sc = static_cast<SERVCONF *>(data);
sc->End(el);
}
//-----------------------------------------------------------------------------
SERVCONF::SERVCONF()
- : currParser(NULL),
- RecvSendMessageCb(NULL),
- sendMessageDataCb(NULL)
+ : currParser(NULL)
{
parser = XML_ParserCreate(NULL);
nt.SetRxCallback(this, AnsRecv);