/[zanavi_public1]/navit/navit/s_index.h_stub
ZANavi

Contents of /navit/navit/s_index.h_stub

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (show annotations) (download)
Sun Mar 19 08:44:36 2017 UTC (7 years ago) by zoff99
File size: 3455 byte(s)
updates
1 /**
2 * ZANavi, Zoff Android Navigation system.
3 * Copyright (C) 2015 Zoff <zoff@zoff.cc>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU 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 General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * 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
21 #define MAX_INDEXSEARCH_TOWNNAME 1
22
23 int IN_BUF_SIZE2 = sizeof(struct streets_index_data_block) * 2;
24 int t_IN_BUF_SIZE2 = sizeof(struct town_index_data_block) * 2;
25 uint8 *s_inbuf;
26 uint8 *t_s_inbuf;
27
28
29 int OUT_BUF_SIZE2 = (sizeof(struct streets_index_data_block) * 1);
30 int t_OUT_BUF_SIZE2 = (sizeof(struct town_index_data_block) * 1);
31 uint8 *s_outbuf;
32 uint8 *t_s_outbuf;
33
34 static long long street_index_size = 0;
35
36 #define my_min(a,b) (((a) < (b)) ? (a) : (b))
37 #define NUMBER_OF_TOWNS_TO_CACHE 1
38
39 static struct town_index_data_block_c *town_lookup_cache = NULL;
40 static struct town_index_data_block_c *town_lookup_cache_cur = NULL;
41 static struct town_index_data_block_c *town_lookup_cache_found = NULL;
42 static int town_lookup_cache_items = 0;
43 static int town_lookup_cache_cur_item = 0;
44
45
46 static int ascii_cmp_local_faster(char *name, char *match, int partial);
47 static int ascii_cmp_local_faster_DEBUG(char *name, char *match, int partial);
48
49
50 static int search_address_housenumber_for_street(char *hn_name_match, char *street_name_match, char *town_string, struct coord *c, int partial, struct jni_object *jni);
51
52
53
54 void town_index_init_cache()
55 {
56 }
57
58 void town_index_insert_cache(struct town_index_data_block* t, char* townname_long)
59 {
60 }
61
62 int town_index_lookup_cache(long long townid)
63 {
64 return 0;
65 }
66
67 char* town_index_lookup(struct street_index_head *sih, long long townid)
68 {
69 char *townname = NULL;
70 return townname;
71 }
72
73
74
75 struct street_index_head* street_index_init(const char* idxfile_name)
76 {
77 struct street_index_head *ret=g_new0(struct street_index_head, 1);
78 return ret;
79 }
80
81 void town_index_setpos(struct street_index_head *sih, int town_data_block_num)
82 {
83 }
84
85 void street_index_setpos(struct street_index_head *sih, int data_block_num)
86 {
87 }
88
89 int street_index_read_data(struct street_index_head *sih)
90 {
91 return 1;
92 }
93
94 int town_index_read_data(struct street_index_head *sih)
95 {
96 return 1;
97 }
98
99 void street_index_close_compr(struct street_index_head *sih)
100 {
101 }
102
103 void town_index_close_compr(struct street_index_head *sih)
104 {
105 }
106
107 void street_index_init_compr(struct street_index_head *sih, long long size)
108 {
109 }
110
111 void town_index_init_compr(struct street_index_head *sih, long long size)
112 {
113 }
114
115 int street_index_decompress_data_block(struct street_index_head *sih)
116 {
117 return -3;
118 }
119
120
121 int town_index_decompress_data_block(struct street_index_head *sih)
122 {
123 return -3;
124 }
125
126 void street_index_close(struct street_index_head *sih)
127 {
128 }
129
130
131 #include <sys/types.h>
132 #include <dirent.h>
133
134 void spill_index()
135 {
136 }
137
138 void search_v2(char *addr, char *town, char* hn, int partial, struct jni_object *jni)
139 {
140
141 }
142
143 int search_v2_work(char *addr, char *town, char* hn, int partial, struct jni_object *jni, const char* idxfile_name)
144 {
145 return 0;
146 }
147
148

   
Visit the ZANavi Wiki