summaryrefslogtreecommitdiff
path: root/navit/bookmarks.h
blob: 792d2fe640bc3e267f498182d22d679e9f69b77c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
 * Navit, a modular navigation system.
 * Copyright (C) 2005-2010 Navit Team
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */

 #ifndef NAVIT_BOOKMARKS_H
 #define NAVIT_BOOKMARKS_H

#ifdef __cplusplus
extern "C" {
#endif

/* prototypes */
struct bookmarks;
struct bookmarks *bookmarks_new(struct attr *parent, struct attr **attrs, struct transformation *trans);
void bookmarks_destroy(struct bookmarks *this_);
void bookmarks_add_callback(struct bookmarks *this_, struct callback *cb);

int bookmarks_add_bookmark(struct bookmarks *this_, struct pcoord *c, const char *description);
int bookmarks_cut_bookmark(struct bookmarks *this_, const char *label);
int bookmarks_copy_bookmark(struct bookmarks *this_, const char *label);
int bookmarks_paste_bookmark(struct bookmarks *this_);
int bookmarks_rename_bookmark(struct bookmarks *this_, const char *oldName, const char* newName);
int bookmarks_delete_bookmark(struct bookmarks *this_, const char *label);

struct map* bookmarks_get_map(struct bookmarks *this_);
enum projection bookmarks_get_projection(struct bookmarks *this_);

void bookmarks_move_root(struct bookmarks *this_);
void bookmarks_move_up(struct bookmarks *this_);
int bookmarks_move_down(struct bookmarks *this_,const char* name);

struct item* bookmarks_get_item(struct bookmarks* this_);
void bookmarks_item_rewind(struct bookmarks* this_);
const char* bookmarks_item_cwd(struct bookmarks* this_);

char* bookmarks_get_user_data_directory(gboolean create);
char* bookmarks_get_destination_file(gboolean create);
void bookmarks_set_center_from_file(struct bookmarks *this_, char *file);
char* bookmarks_get_center_file(gboolean create);
void bookmarks_write_center_to_file(struct bookmarks *this_, char *file);
void bookmarks_append_coord(struct bookmarks *this_, char *file, struct pcoord *c, const char *type, const char *description, GHashTable *h, int limit);
/* end of prototypes */

#ifdef __cplusplus
}
#endif

 #endif /* NAVIT_BOOKMARKS_H */