gwenhywfar
4.8.0beta
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
html
g_generic.c
Go to the documentation of this file.
1
/***************************************************************************
2
begin : Sat Feb 20 2010
3
copyright : (C) 2010 by Martin Preuss
4
email : martin@libchipcard.de
5
6
***************************************************************************
7
* Please see toplevel file COPYING for license details *
8
***************************************************************************/
9
10
11
#ifdef HAVE_CONFIG_H
12
# include <config.h>
13
#endif
14
15
#define DISABLE_DEBUGLOG
16
17
#include "g_generic_p.h"
18
#include "
htmlctx_l.h
"
19
20
#include <gwenhywfar/misc.h>
21
#include <gwenhywfar/debug.h>
22
23
24
25
26
HTML_GROUP
*
HtmlGroup_Generic_new
(
const
char
*groupName,
27
HTML_GROUP
*parent,
28
GWEN_XML_CONTEXT
*ctx) {
29
HTML_GROUP
*g;
30
31
/* create base group */
32
g=
HtmlGroup_new
(groupName, parent, ctx);
33
assert(g);
34
35
/* set virtual functions */
36
HtmlGroup_SetEndTagFn
(g,
HtmlGroup_Generic_EndTag
);
37
HtmlGroup_SetAddDataFn
(g,
HtmlGroup_Generic_AddData
);
38
HtmlGroup_SetEndSubGroupFn
(g,
HtmlGroup_Generic_EndSubGroup
);
39
40
return
g;
41
}
42
43
44
45
int
HtmlGroup_Generic_EndTag
(
HTML_GROUP
*g,
const
char
*tagName) {
46
assert(g);
47
48
if
(strcasecmp(
HtmlGroup_GetGroupName
(g), tagName)!=0) {
49
DBG_INFO
(
GWEN_LOGDOMAIN
,
50
"Tag [%s] does not close [%s], ignoring"
,
51
tagName,
HtmlGroup_GetGroupName
(g));
52
/*return GWEN_ERROR_BAD_DATA;*/
53
return
0;
54
}
55
56
/* always end this tag */
57
return
1;
58
}
59
60
61
62
int
HtmlGroup_Generic_AddData
(
HTML_GROUP
*g,
const
char
*data) {
63
assert(g);
64
65
/* just ignore the data */
66
return
0;
67
}
68
69
70
71
int
HtmlGroup_Generic_EndSubGroup
(
HTML_GROUP
*g,
HTML_GROUP
*sg){
72
assert(g);
73
74
/* just ignore the end of sub group */
75
return
0;
76
}
77
78
79
80
81
82
83
84
85
86
87
Generated on Tue Nov 12 2013 10:50:20 for gwenhywfar by
1.8.1.2