Last change
on this file since 68 was
68,
checked in by cbipsl, 14 years ago
|
commit v1 eccad
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
1.7 KB
|
Line | |
---|
1 | #ifndef XML_H_ |
---|
2 | #define XML_H_ |
---|
3 | #include <stdlib.h> |
---|
4 | #include <stdio.h> |
---|
5 | #include <stdarg.h> |
---|
6 | #include <string.h> |
---|
7 | #include <limits.h> |
---|
8 | #include <unistd.h> |
---|
9 | |
---|
10 | #include <libxml/tree.h> |
---|
11 | #include <libxml/valid.h> |
---|
12 | #include <libxml/parser.h> |
---|
13 | |
---|
14 | #include "eccad.h" |
---|
15 | |
---|
16 | |
---|
17 | typedef struct { |
---|
18 | char *name; |
---|
19 | char * value; |
---|
20 | } Arg, *ptrArg; |
---|
21 | |
---|
22 | ptrArg allocArg(char *name, char *value); |
---|
23 | void freeArg(ptrArg arg); |
---|
24 | |
---|
25 | |
---|
26 | // la structure reponse |
---|
27 | typedef struct { |
---|
28 | ptrTemporal temporal; |
---|
29 | ptrZone zone; |
---|
30 | EccadDB db; |
---|
31 | char file[512]; |
---|
32 | char error[512]; |
---|
33 | double paslat; |
---|
34 | double paslon; |
---|
35 | double mini; |
---|
36 | double maxi; |
---|
37 | double centerValue; |
---|
38 | float centerLat; |
---|
39 | float centerLon; |
---|
40 | LIST valeurs; |
---|
41 | LIST points; |
---|
42 | }Response, *ptrResponse; |
---|
43 | |
---|
44 | typedef ptrGrid (*PFG)(LIST grids, LIST args, ptrResponse R, ptrParam p); |
---|
45 | |
---|
46 | typedef struct { |
---|
47 | char *name; |
---|
48 | PFG function; |
---|
49 | } BKF, *ptrBKF; |
---|
50 | #define errorResponse( r, msg) strcpy((r)->error, (msg)) |
---|
51 | |
---|
52 | ptrResponse allocResponse(ptrZone z, ptrTemporal t); |
---|
53 | void freeResponse(ptrResponse response); |
---|
54 | //void errorResponse(ptrResponse response, char *msg); |
---|
55 | char * response2xml(ptrResponse response); |
---|
56 | char * xmlRequest( char * request); |
---|
57 | |
---|
58 | //ptrZone loadXmlZone(xmlDocPtr doc, xmlNodePtr domaine); |
---|
59 | xmlNodePtr getFirstNode( xmlNodePtr p, xmlChar *name); |
---|
60 | xmlChar * contentOfNode(xmlDocPtr doc, xmlNodePtr p); |
---|
61 | xmlChar * contentOfNodeNamed(xmlDocPtr doc, xmlNodePtr p, char *name); |
---|
62 | ptrGrid getEmissionGrid(LIST grids,LIST args, ptrResponse R, ptrParam p); |
---|
63 | |
---|
64 | |
---|
65 | |
---|
66 | /* |
---|
67 | // la structure requete |
---|
68 | typedef struct { |
---|
69 | int idProduit; |
---|
70 | ptrParam param; |
---|
71 | ptrTemporal temporal; |
---|
72 | ptrZone zone; |
---|
73 | ptrConnect db; |
---|
74 | ptrFunction func; |
---|
75 | }Request, *ptrRequest; |
---|
76 | |
---|
77 | ptrRequete allocRequest(int id, ptrParam p, ptrZone z); |
---|
78 | */ |
---|
79 | |
---|
80 | #endif //XML_H |
---|
Note: See
TracBrowser
for help on using the repository browser.