source: ether_eccad/trunk/API_EXTRACT/src/xml.h @ 68

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
17typedef struct {
18      char *name;
19      char * value;
20} Arg, *ptrArg;
21
22ptrArg allocArg(char *name, char *value);
23void freeArg(ptrArg arg);
24
25
26// la structure reponse
27typedef 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
44typedef ptrGrid (*PFG)(LIST grids, LIST args, ptrResponse R, ptrParam p);
45
46typedef struct {
47      char *name;
48      PFG function;
49} BKF, *ptrBKF;
50#define errorResponse( r, msg)  strcpy((r)->error, (msg))
51
52ptrResponse allocResponse(ptrZone z, ptrTemporal t);
53void freeResponse(ptrResponse response);
54//void errorResponse(ptrResponse response, char *msg);
55char * response2xml(ptrResponse response);
56char * xmlRequest( char * request);
57
58//ptrZone loadXmlZone(xmlDocPtr doc, xmlNodePtr domaine);
59xmlNodePtr getFirstNode( xmlNodePtr p, xmlChar *name);
60xmlChar * contentOfNode(xmlDocPtr doc, xmlNodePtr p);
61xmlChar * contentOfNodeNamed(xmlDocPtr doc, xmlNodePtr p, char *name);
62ptrGrid getEmissionGrid(LIST grids,LIST args,  ptrResponse R, ptrParam p);
63
64
65
66/*
67// la structure requete
68typedef struct {
69   int idProduit;
70   ptrParam param;
71   ptrTemporal temporal;
72   ptrZone zone;
73   ptrConnect db;
74   ptrFunction func;
75}Request, *ptrRequest;
76
77ptrRequete allocRequest(int id, ptrParam p, ptrZone z);
78*/
79
80#endif //XML_H
Note: See TracBrowser for help on using the repository browser.