1 |
/**
|
2 |
* Navit, a modular navigation system.
|
3 |
* Copyright (C) 2005-2008 Navit Team
|
4 |
*
|
5 |
* This program is free software; you can redistribute it and/or
|
6 |
* modify it under the terms of the GNU Library General Public License
|
7 |
* version 2 as published by the Free Software Foundation.
|
8 |
*
|
9 |
* This program is distributed in the hope that it will be useful,
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
* GNU Library General Public License for more details.
|
13 |
*
|
14 |
* You should have received a copy of the GNU Library General Public
|
15 |
* License along with this program; if not, write to the
|
16 |
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
17 |
* Boston, MA 02110-1301, USA.
|
18 |
*/
|
19 |
|
20 |
#ifndef NAVIT_SEARCH_H
|
21 |
#define NAVIT_SEARCH_H
|
22 |
|
23 |
#ifdef __cplusplus
|
24 |
extern "C" {
|
25 |
#endif
|
26 |
struct search_list_common {
|
27 |
void *parent;
|
28 |
struct item unique,item;
|
29 |
int selected;
|
30 |
struct pcoord *c;
|
31 |
char *town_name;
|
32 |
char *district_name;
|
33 |
char *postal;
|
34 |
char *postal_mask;
|
35 |
char *county_name;
|
36 |
};
|
37 |
|
38 |
struct search_list_country {
|
39 |
struct search_list_common common;
|
40 |
char *car;
|
41 |
char *iso2;
|
42 |
char *iso3;
|
43 |
char *name;
|
44 |
char *flag;
|
45 |
};
|
46 |
|
47 |
struct search_list_town {
|
48 |
struct search_list_common common;
|
49 |
struct item itemt;
|
50 |
char *county;
|
51 |
};
|
52 |
|
53 |
struct search_list_street {
|
54 |
struct search_list_common common;
|
55 |
char *name;
|
56 |
};
|
57 |
|
58 |
struct search_list_house_number {
|
59 |
struct search_list_common common;
|
60 |
char *house_number;
|
61 |
int interpolation;
|
62 |
};
|
63 |
|
64 |
struct search_list_result {
|
65 |
int id;
|
66 |
struct pcoord *c;
|
67 |
struct search_list_country *country;
|
68 |
struct search_list_town *town;
|
69 |
struct search_list_street *street;
|
70 |
struct search_list_house_number *house_number;
|
71 |
};
|
72 |
|
73 |
|
74 |
/* prototypes */
|
75 |
struct attr;
|
76 |
struct mapset;
|
77 |
struct search_list;
|
78 |
struct search_list_result;
|
79 |
struct jni_object;
|
80 |
struct search_list *search_list_new(struct mapset *ms);
|
81 |
void search_list_search(struct search_list *this_, struct attr *search_attr, int partial);
|
82 |
char *search_postal_merge(char *mask, char *new_);
|
83 |
char *search_postal_merge_replace(char *mask, char *new_);
|
84 |
struct search_list_common *search_list_select(struct search_list *this_, enum attr_type attr_type, int id, int mode);
|
85 |
struct search_list_result *search_list_get_result(struct search_list *this_);
|
86 |
void search_list_destroy(struct search_list *this_);
|
87 |
void search_init(void);
|
88 |
GList * search_by_address(GList *result_list,struct mapset *ms, char *addr, int partial, struct jni_object *jni, int search_country_flags, char *search_country_string);
|
89 |
void search_full_world(char *addr, int partial, int search_order, struct jni_object *jni,struct coord_geo *search_center, int search_radius);
|
90 |
|
91 |
/* end of prototypes */
|
92 |
#ifdef __cplusplus
|
93 |
}
|
94 |
#endif
|
95 |
|
96 |
#endif
|
97 |
|