navit  0.5.3-trunk
mapset.h
Go to the documentation of this file.
1 
20 #ifndef NAVIT_MAPSET_H
21 #define NAVIT_MAPSET_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /* prototypes */
28 enum attr_type;
29 struct attr;
30 struct attr_iter;
31 struct item;
32 struct map;
33 
40 struct mapset;
41 
42 struct mapset_handle;
43 struct mapset_search;
44 struct mapset *mapset_new(struct attr *parent, struct attr **attrs);
45 struct mapset *mapset_dup(struct mapset *ms);
46 struct attr_iter *mapset_attr_iter_new(void * unused);
48 int mapset_add_attr(struct mapset *ms, struct attr *attr);
49 int mapset_remove_attr(struct mapset *ms, struct attr *attr);
50 int mapset_get_attr(struct mapset *ms, enum attr_type type, struct attr *attr, struct attr_iter *iter);
51 void mapset_destroy(struct mapset *ms);
52 struct map *mapset_get_map_by_name(struct mapset *ms, const char*map_name);
53 struct mapset_handle *mapset_open(struct mapset *ms);
54 struct map *mapset_next(struct mapset_handle *msh, int active);
55 void mapset_close(struct mapset_handle *msh);
56 struct mapset_search *mapset_search_new(struct mapset *ms, struct item *item, struct attr *search_attr, int partial);
57 struct item *mapset_search_get_item(struct mapset_search *this_);
58 void mapset_search_destroy(struct mapset_search *this_);
59 struct mapset * mapset_ref(struct mapset* m);
60 void mapset_unref(struct mapset *m);
61 /* end of prototypes */
62 #ifdef __cplusplus
63 }
64 #endif
65 #endif
attr_type
Definition: attr.h:34
char type[3]
Definition: garmin_img.c:2
struct mapset_handle * mapset_open(struct mapset *ms)
Returns a new handle for a mapset.
Definition: mapset.c:164
struct mapset * mapset_new(struct attr *parent, struct attr **attrs)
Creates a new, empty mapset.
Definition: mapset.c:53
struct mapset_search * mapset_search_new(struct mapset *ms, struct item *item, struct attr *search_attr, int partial)
Starts a search on a mapset.
Definition: mapset.c:295
int mapset_add_attr(struct mapset *ms, struct attr *attr)
Adds a map to a mapset.
Definition: mapset.c:86
void mapset_attr_iter_destroy(struct attr_iter *iter)
Definition: mapset.c:76
void mapset_destroy(struct mapset *ms)
Destroys a mapset.
Definition: mapset.c:138
void mapset_unref(struct mapset *m)
struct map * mapset_next(struct mapset_handle *msh, int active)
Gets the next map from a mapset handle.
Definition: mapset.c:192
struct item * mapset_search_get_item(struct mapset_search *this_)
Returns the next found item from a mapset search.
Definition: mapset.c:321
struct attr_iter * mapset_attr_iter_new(void *unused)
Definition: mapset.c:72
int mapset_remove_attr(struct mapset *ms, struct attr *attr)
Definition: mapset.c:97
int mapset_get_attr(struct mapset *ms, enum attr_type type, struct attr *attr, struct attr_iter *iter)
Definition: mapset.c:108
void mapset_search_destroy(struct mapset_search *this_)
Destroys a mapset search.
Definition: mapset.c:374
struct map * mapset_get_map_by_name(struct mapset *ms, const char *map_name)
Gets a map from the mapset by name.
Definition: mapset.c:230
struct mapset * mapset_dup(struct mapset *ms)
Definition: mapset.c:64
struct mapset * mapset_ref(struct mapset *m)
void mapset_close(struct mapset_handle *msh)
Closes a mapset handle after it is no longer used.
Definition: mapset.c:255
struct attr active
Definition: speech.c:77
Definition: config_.c:47
void * iter
Definition: config_.c:48
Definition: attr.h:157
Represents an object on a map.
Definition: item.h:115
Definition: map.c:55
Handle for a mapset in use.
Definition: mapset.c:150
Holds information about a search in a mapset.
Definition: mapset.c:266
int partial
Definition: mapset.c:271
struct attr * search_attr
Definition: mapset.c:270
struct map_search * ms
Definition: mapset.c:268
Definition: mapset.c:39
Definition: gpx2navit_txt.h:51