Functions | |
KvaXmlStatus | kvaXmlToBuffer (const char *xmlbuf, unsigned int xmllen, char *outbuf, unsigned int *outlen, long *version) |
KvaXmlStatus | kvaXmlToFile (const char *infile, const char *outfile) |
KvaXmlStatus | kvaFileToXml (const char *parfile, const char *xmlfile) |
KvaXmlStatus | kvaXmlDebugOutput (int on) |
KvaXmlStatus | kvaBufferToXml (const char *inbuf, unsigned int inlen, char *xmlbuf, unsigned int *xmllen, long *version, const char *scriptpath) |
KvaXmlStatus | kvaXmlGetErrorText (KvaXmlStatus status, char *buf, unsigned int len) |
KvaXmlStatus kvaBufferToXml | ( | const char * | inbuf, |
unsigned int | inlen, | ||
char * | xmlbuf, | ||
unsigned int * | xmllen, | ||
long * | version, | ||
const char * | scriptpath | ||
) |
Convert a buffer containing param.lif with size inlen to a new XML settings buffer xmlbuf with length xmllen. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor). Scripts from the param.lif will be written to the directory specified in scriptpath.
[in] | inbuf | Buffer containing the param.lif settings. |
[in] | inlen | Size of param.lif buffer in bytes. |
[out] | xmlbuf | Buffer to receive the XML settings. |
[out] | xmllen | Size of the XML buffer in bytes. |
[out] | version | XML version. |
[in] | scriptpath | Path to destination of scripts. |
KvaXmlStatus kvaFileToXml | ( | const char * | parfile, |
const char * | xmlfile | ||
) |
Convert the binary settings from parfile and write the XML settings to xmlfile.
[in] | parfile | Path and name of the file containing the param.lif settings. |
[out] | xmlfile | Path and name of the file to receive the XML settings. |
KvaXmlStatus kvaXmlDebugOutput | ( | int | on | ) |
Enable detailed information about the XML conversion on standard out. This can be very useful when the error that causes the failure is masked by subsequent errors.
[in] | on | Enable debug output if non-zero. |
KvaXmlStatus kvaXmlGetErrorText | ( | KvaXmlStatus | status, |
char * | buf, | ||
unsigned int | len | ||
) |
Get a human readable description of error with supplied error code.
[in] | status | KvaXmlStatus error code. |
[out] | buf | Buffer to receive error message. |
[in] | len | Buffer size in bytes. |
KvaXmlStatus kvaXmlToBuffer | ( | const char * | xmlbuf, |
unsigned int | xmllen, | ||
char * | outbuf, | ||
unsigned int * | outlen, | ||
long * | version | ||
) |
Convert the XML settings from buffer xmlbuf with length xmllen. The resulting param.lif is written to the buffer outbuf and has length outlen. Use the macro PARAMLIF_SIZE to allocate the ouput buffer to ensure that it is sufficiently large. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor).
[in] | xmlbuf | Buffer containing the XML settings. |
[in] | xmllen | Size of the XML buffer in bytes. |
[out] | outbuf | Buffer to receive the param.lif settings. |
[out] | outlen | Size of the param.lif buffer in bytes. |
[out] | version | XML version. |
KvaXmlStatus kvaXmlToFile | ( | const char * | infile, |
const char * | outfile | ||
) |
Convert the XML settings from infile and write the binary settings to outfile.
[in] | infile | Path and name of the file containing the XML settings. |
[out] | outfile | Path and name of the file to receive the param.lif settings. |