Fix:map_csv:Disable default notification of each deleted item.
[profile/ivi/navit.git] / navit / navit / bookmarks.h
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2010 Navit Team
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  #ifndef NAVIT_BOOKMARKS_H
21  #define NAVIT_BOOKMARKS_H
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /* prototypes */
28 struct bookmarks;
29 struct bookmarks *bookmarks_new(struct attr *parent, struct attr **attrs, struct transformation *trans);
30 void bookmarks_destroy(struct bookmarks *this_);
31 void bookmarks_add_callback(struct bookmarks *this_, struct callback *cb);
32
33 int bookmarks_add_bookmark(struct bookmarks *this_, struct pcoord *c, const char *description);
34 int bookmarks_cut_bookmark(struct bookmarks *this_, const char *label);
35 int bookmarks_copy_bookmark(struct bookmarks *this_, const char *label);
36 int bookmarks_paste_bookmark(struct bookmarks *this_);
37 int bookmarks_rename_bookmark(struct bookmarks *this_, const char *oldName, const char* newName);
38 int bookmarks_delete_bookmark(struct bookmarks *this_, const char *label);
39
40 struct map* bookmarks_get_map(struct bookmarks *this_);
41 enum projection bookmarks_get_projection(struct bookmarks *this_);
42
43 void bookmarks_move_root(struct bookmarks *this_);
44 void bookmarks_move_up(struct bookmarks *this_);
45 int bookmarks_move_down(struct bookmarks *this_,const char* name);
46
47 struct item* bookmarks_get_item(struct bookmarks* this_);
48 int bookmarks_get_bookmark_count(struct bookmarks* this_);
49 void bookmarks_item_rewind(struct bookmarks* this_);
50 const char* bookmarks_item_cwd(struct bookmarks* this_);
51
52 char* bookmarks_get_user_data_directory(gboolean create);
53 char* bookmarks_get_destination_file(gboolean create);
54 void bookmarks_set_center_from_file(struct bookmarks *this_, char *file);
55 char* bookmarks_get_center_file(gboolean create);
56 void bookmarks_write_center_to_file(struct bookmarks *this_, char *file);
57 void bookmarks_append_coord(struct map *former_destination_map, char *file, struct pcoord *c, enum item_type type, const char *description, int limit);
58 /* end of prototypes */
59
60 #ifdef __cplusplus
61 }
62 #endif
63
64  #endif /* NAVIT_BOOKMARKS_H */