Fix:map_csv:Disable default notification of each deleted item.
[profile/ivi/navit.git] / navit / navit / search.h
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 /* prototypes */
74 struct attr;
75 struct mapset;
76 struct search_list;
77 struct search_list_result;
78 struct jni_object;
79 struct search_list *search_list_new(struct mapset *ms);
80 void search_list_search(struct search_list *this_, struct attr *search_attr, int partial);
81 char *search_postal_merge(char *mask, char *new_);
82 char *search_postal_merge_replace(char *mask, char *new_);
83 struct search_list_common *search_list_select(struct search_list *this_, enum attr_type attr_type, int id, int mode);
84 char *search_list_get_unique(struct search_list *this_, char *unique);
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(struct search_list *this_, const char *addr, int partial, struct jni_object *jni);
89 /* end of prototypes */
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif
95