-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcpXmlCmdApplication.h
63 lines (50 loc) · 1.32 KB
/
cpXmlCmdApplication.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*
* File: mvXmlCmdApplication.h
* Author: Jay Sprenkle
*
* Created on May 26, 2015
*/
#ifndef CPXMLCMDAPPLICATION_H
#define CPXMLCMDAPPLICATION_H
#include <errno.h>
#include "libxml.h"
#include "libxml/xmlreader.h"
#include "cpXmlCmdOutput.h"
class cpXmlCmdApplication
{
public:
/**
* Constructor
* @param ResultDocumentFileName: optional. If null then no output document is produced
*/
cpXmlCmdApplication( const char* ResultDocumentFileName, int argc, char** argv );
virtual ~cpXmlCmdApplication();
/**
* initialize counters and output document prior to any copy operations
*/
void initialize();
bool process( const char* filename );
/**
* Copy a file
* @param source
* @param destination
* @return
*/
bool copy( const char* source, const char* destination );
/**
* ensure the destination directory exists
* @param destination
*/
void validate( const char* destination );
bool status;
private:
void processNode( xmlTextReaderPtr readerptr );
bool compareNode( xmlTextReaderPtr readerptr, const char* NodeName );
const char* cpXmlCmdNamespace;
cpXmlCmdOutput* output;
int copied, failed;
time_t start, finish;
int argc;
char** argv;
};
#endif