2010-10-24 03:12:37 +04:00
|
|
|
#ifndef EXPORT_H
|
|
|
|
#define EXPORT_H
|
|
|
|
|
|
|
|
#include <libxml/encoding.h>
|
|
|
|
#include <libxml/xmlwriter.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2011-02-07 14:13:18 +03:00
|
|
|
struct export_data
|
|
|
|
{
|
|
|
|
PGresult * res;
|
|
|
|
PGresult * resNames;
|
|
|
|
PGresult * resAddress;
|
|
|
|
PGresult * resExtraTags;
|
|
|
|
};
|
|
|
|
|
2010-10-24 03:12:37 +04:00
|
|
|
void nominatim_export(int rank_min, int rank_max, const char *conninfo, const char *structuredoutputfile);
|
|
|
|
void nominatim_exportCreatePreparedQueries(PGconn * conn);
|
2011-02-07 14:13:18 +03:00
|
|
|
|
2010-10-24 03:12:37 +04:00
|
|
|
xmlTextWriterPtr nominatim_exportXMLStart(const char *structuredoutputfile);
|
|
|
|
void nominatim_exportXMLEnd(xmlTextWriterPtr writer);
|
2011-02-07 14:13:18 +03:00
|
|
|
|
|
|
|
void nominatim_exportEndMode(xmlTextWriterPtr writer);
|
|
|
|
|
|
|
|
void nominatim_exportPlaceQueries(uint64_t place_id, PGconn * conn, struct export_data * querySet);
|
|
|
|
void nominatim_exportFreeQueries(struct export_data * querySet);
|
|
|
|
|
|
|
|
void nominatim_exportPlace(uint64_t place_id, PGconn * conn,
|
|
|
|
xmlTextWriterPtr writer, pthread_mutex_t * writer_mutex, struct export_data * prevQuerySet);
|
2010-10-24 03:12:37 +04:00
|
|
|
const char * getRankLabel(int rank);
|
|
|
|
|
|
|
|
#endif
|