Navit SVN

/work/compile/navit/src/navit/search.h

00001 
00020 #ifndef NAVIT_SEARCH_H
00021 #define NAVIT_SEARCH_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 struct search_list_common {
00027         void *parent;
00028         struct item unique,item;
00029         int selected;
00030         struct pcoord *c;
00031         char *town_name;
00032         char *district_name;
00033         char *postal;
00034         char *postal_mask;
00035         char *county_name;
00036 };
00037 
00038 struct search_list_country {
00039         struct search_list_common common;
00040         char *car;
00041         char *iso2;
00042         char *iso3;
00043         char *name;
00044         char *flag;
00045 };
00046 
00047 struct search_list_town {
00048         struct search_list_common common;
00049         struct item itemt;
00050         char *county;
00051 };
00052 
00053 struct search_list_street {
00054         struct search_list_common common;
00055         char *name;
00056 };
00057 
00058 struct search_list_house_number {
00059         struct search_list_common common;
00060         char *house_number;
00061         int interpolation;
00062 };
00063 
00064 struct search_list_result {
00065         int id;
00066         struct pcoord *c;
00067         struct search_list_country *country;
00068         struct search_list_town *town;
00069         struct search_list_street *street;
00070         struct search_list_house_number *house_number;
00071 };
00072 
00073 /* prototypes */
00074 struct attr;
00075 struct mapset;
00076 struct search_list;
00077 struct search_list_result;
00078 struct jni_object;
00079 struct search_list *search_list_new(struct mapset *ms);
00080 void search_list_search(struct search_list *this_, struct attr *search_attr, int partial);
00081 char *search_postal_merge(char *mask, char *new_);
00082 char *search_postal_merge_replace(char *mask, char *new_);
00083 struct search_list_common *search_list_select(struct search_list *this_, enum attr_type attr_type, int id, int mode);
00084 char *search_list_get_unique(struct search_list *this_, char *unique);
00085 struct search_list_result *search_list_get_result(struct search_list *this_);
00086 void search_list_destroy(struct search_list *this_);
00087 void search_init(void);
00088 GList * search_by_address(struct search_list *this_, const char *addr, int partial, struct jni_object *jni);
00089 /* end of prototypes */
00090 #ifdef __cplusplus
00091 }
00092 #endif
00093 
00094 #endif
00095