-
Notifications
You must be signed in to change notification settings - Fork 0
/
dfi-reader.h
108 lines (89 loc) · 9.3 KB
/
dfi-reader.h
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
* Copyright © 2013 Canonical Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2 of the licence or (at
* your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors: Ryan Lortie <[email protected]>
*/
#include "common.h"
struct dfi_index;
struct dfi_index * dfi_index_new (const gchar *directory);
void dfi_index_free (struct dfi_index *index);
const struct dfi_string_list * dfi_index_get_app_names (const struct dfi_index *index);
const struct dfi_string_list * dfi_index_get_key_names (const struct dfi_index *index);
const struct dfi_string_list * dfi_index_get_locale_names (const struct dfi_index *index);
const struct dfi_string_list * dfi_index_get_group_names (const struct dfi_index *index);
const struct dfi_pointer_array * dfi_index_get_implementors (const struct dfi_index *index);
const struct dfi_pointer_array * dfi_index_get_text_indexes (const struct dfi_index *index);
const struct dfi_pointer_array * dfi_index_get_desktop_files (const struct dfi_index *index);
const struct dfi_pointer_array * dfi_index_get_mime_types (const struct dfi_index *index);
gboolean dfi_id_valid (dfi_id id);
guint dfi_id_get (dfi_id id);
guint dfi_pointer_array_get_length (const struct dfi_pointer_array *array,
const struct dfi_index *dfi);
const gchar * dfi_pointer_array_get_item_key (const struct dfi_pointer_array *array,
const struct dfi_index *dfi,
gint i);
dfi_pointer dfi_pointer_array_get_pointer (const struct dfi_pointer_array *array,
gint i);
const dfi_id * dfi_id_list_get_ids (const struct dfi_id_list *list,
gint *n_ids);
const struct dfi_id_list * dfi_id_list_from_pointer (const struct dfi_index *index,
dfi_pointer pointer);
const struct dfi_string_list * dfi_string_list_from_pointer (const struct dfi_index *index,
dfi_pointer pointer);
gint dfi_string_list_binary_search (const struct dfi_string_list *list,
const struct dfi_index *index,
const gchar *string);
guint dfi_string_list_get_length (const struct dfi_string_list *list);
const gchar * dfi_string_list_get_string (const struct dfi_string_list *list,
const struct dfi_index *dfi,
dfi_id id);
const gchar * dfi_string_list_get_string_at_index (const struct dfi_string_list *list,
const struct dfi_index *dfi,
gint i);
const struct dfi_text_index * dfi_text_index_from_pointer (const struct dfi_index *dfi,
dfi_pointer pointer);
const gchar * dfi_text_index_get_string (const struct dfi_index *dfi,
const struct dfi_text_index *text_index,
dfi_id id);
const struct dfi_text_index_item * dfi_text_index_binary_search (const struct dfi_index *dfi,
const struct dfi_text_index *text_index,
const gchar *string);
const dfi_id * dfi_text_index_item_get_ids (const struct dfi_index *dfi,
const struct dfi_text_index_item *item,
gint *n_results);
const dfi_id * dfi_text_index_get_ids_for_exact_match (const struct dfi_index *dfi,
const struct dfi_text_index *index,
const gchar *string,
gint *n_results);
const struct dfi_keyfile * dfi_keyfile_from_pointer (const struct dfi_index *dfi,
dfi_pointer pointer);
const struct dfi_keyfile_group * dfi_keyfile_get_groups (const struct dfi_keyfile *file,
const struct dfi_index *dfi,
gint *n_groups);
const gchar * dfi_keyfile_group_get_name (const struct dfi_keyfile_group *group,
const struct dfi_index *dfi);
const struct dfi_keyfile_item * dfi_keyfile_group_get_items (const struct dfi_keyfile_group *group,
const struct dfi_index *dfi,
const struct dfi_keyfile *file,
gint *n_items);
const gchar * dfi_keyfile_item_get_key (const struct dfi_keyfile_item *item,
const struct dfi_index *dfi);
const gchar * dfi_keyfile_item_get_locale (const struct dfi_keyfile_item *item,
const struct dfi_index *dfi);
const gchar * dfi_keyfile_item_get_value (const struct dfi_keyfile_item *item,
const struct dfi_index *dfi);