📄 xmlencapsulate.cpp
字号:
#include "stdafx.h"
#include "XmlEncapsulate.h"
HANDLE CLASSInit(const char* fileName)
{
XmlEPG* pobj = NULL;
pobj = new XmlEPG( fileName );
return HANDLE( pobj );
}
void CLASSDestroy(HANDLE hobj)
{
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj != NULL )
{
delete pobj;
}
}
XML_ERROR_T XmlDocInit(HANDLE hobj)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlDocInit();
return res;
}
XML_ERROR_T XmlWriteFile(HANDLE hobj, const char* fileName)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlWriteFile( fileName );
return res;
}
XML_ERROR_T XmlLoad(HANDLE hobj, const char* fileName)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlLoad( fileName );
return res;
}
XML_ERROR_T XmlGETi(HANDLE hobj, const char* labelname,
const char* attriname, int* iVal)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlGETi( labelname, attriname, iVal );
return res;
}
XML_ERROR_T XmlGETs(HANDLE hobj, const char* labelname,
const char* attriname, char* sVal, int lenth)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlGETs( labelname, attriname, sVal, lenth );
return res;
}
XML_ERROR_T XmlGETAll(HANDLE hobj, const char* labelname, EPGPROGRAM* Pro)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlGETAll( labelname, Pro );
return res;
}
XML_ERROR_T XmlGETDigChan(HANDLE hobj, const char* labelname, DIGITAL_PGROGRAM* DigChan)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlGETDigChan( labelname, DigChan );
return res;
}
XML_ERROR_T XmlGETFastList(HANDLE hobj, int* DigAdd, int len, int type)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlGETFastList( DigAdd, len, type );
return res;
}
XML_ERROR_T XmlMODi(HANDLE hobj, const char* labelname,
const char* attriname, int iVal)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlMODi( labelname, attriname, iVal );
return res;
}
XML_ERROR_T XmlMODs(HANDLE hobj, const char* labelname,
const char* attriname, char* sVal)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlMODs( labelname, attriname, sVal);
return res;
}
XML_ERROR_T XmlDEL(HANDLE hobj, const char* labelname)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlDEL( labelname );
return res;
}
XML_ERROR_T XmlADD_NET_INFO(HANDLE hobj, NET_INFO info,
const char* labelname, const char* disname)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_NET_INFO( info, labelname, disname );
return res;
}
XML_ERROR_T XmlADD_PHYSICAL_INFO(HANDLE hobj, PHYSICAL_CHANNAL info,
const char* labelname, const char* disname)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_PHYSICAL_INFO( info, labelname, disname );
return res;
}
XML_ERROR_T XmlADD_DIGITAL_INFO(HANDLE hobj, DIGITAL_PGROGRAM info,
const char* labelname, const char* disname)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_DIGITAL_INFO( info, labelname, disname);
return res;
}
XML_ERROR_T XmlADD_EPG_PROGRAM(HANDLE hobj, EPGPROGRAM info,
const char* labelname, const char* disname)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_EPG_PROGRAM( info, labelname, disname );
return res;
}
XML_ERROR_T XmlADD_FASTLIST(HANDLE hobj, ProgramIndex info,
const char* disname)
{
XML_ERROR_T res;
XmlEPG *pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_FASTLIST( info, disname );
return res;
}
XML_ERROR_T XmlADD_CURPRG_INFO(HANDLE hobj, Cur_Prg_Info info,
const char* disname)
{
XML_ERROR_T res;
XmlEPG *pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_CURPRG_INFO( info, disname );
return res;
}
XML_ERROR_T XmlADD_BOOKED_EVENT(HANDLE hobj, BOOKED_EVENT info,
const char* labelname, const char* disname)
{
XML_ERROR_T res;
XmlEPG *pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlADD_BOOKED_EVENT( info, labelname, disname );
return res;
}
XML_ERROR_T XmlCOUNT(HANDLE hobj, const char* labelname, int* count, const char** nametag)
{
XML_ERROR_T res;
XmlEPG* pobj = ( XmlEPG* )hobj;
if( pobj == NULL )
{
return XML_ERROR_COMM;
}
res = pobj->XmlCOUNT( labelname, count, nametag );
return res;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -