1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2002 Mikael Hallendal <micke@imendio.com>
4  * Copyright (C) 2008 Imendio AB
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 #ifndef __DH_LINK_H__
23 #define __DH_LINK_H__
24 
25 #include <glib-object.h>
26 
27 typedef enum {
28         DH_LINK_TYPE_BOOK,
29         DH_LINK_TYPE_PAGE,
30         DH_LINK_TYPE_KEYWORD,
31         DH_LINK_TYPE_FUNCTION,
32         DH_LINK_TYPE_STRUCT,
33         DH_LINK_TYPE_MACRO,
34         DH_LINK_TYPE_ENUM,
35         DH_LINK_TYPE_TYPEDEF
36 } DhLinkType;
37 
38 typedef enum {
39         DH_LINK_FLAGS_NONE       = 0,
40         DH_LINK_FLAGS_DEPRECATED = 1 << 0
41 } DhLinkFlags;
42 
43 typedef struct _DhLink DhLink;
44 
45 #define DH_TYPE_LINK (dh_link_get_type ())
46 
47 GType        dh_link_get_type           (void);
48 DhLink *     dh_link_new                (DhLinkType     type,
49                                          const gchar   *base,
50                                          const gchar   *id,
51 					 const gchar   *name,
52                                          DhLink        *book,
53                                          DhLink        *page,
54 					 const gchar   *filename);
55 void         dh_link_free               (DhLink        *link);
56 gint         dh_link_compare            (gconstpointer  a,
57 					 gconstpointer  b);
58 DhLink *     dh_link_ref                (DhLink        *link);
59 void         dh_link_unref              (DhLink        *link);
60 const gchar *dh_link_get_name           (DhLink        *link);
61 const gchar *dh_link_get_book_name      (DhLink        *link);
62 const gchar *dh_link_get_page_name      (DhLink        *link);
63 const gchar *dh_link_get_file_name      (DhLink        *link);
64 const gchar *dh_link_get_book_id        (DhLink        *link);
65 gchar       *dh_link_get_uri            (DhLink        *link);
66 DhLinkFlags  dh_link_get_flags          (DhLink        *link);
67 void         dh_link_set_flags          (DhLink        *link,
68 					 DhLinkFlags    flags);
69 DhLinkType   dh_link_get_link_type      (DhLink        *link);
70 const gchar *dh_link_get_type_as_string (DhLink        *link);
71 
72 #endif /* __DH_LINK_H__ */
73