This file is indexed.

/usr/include/libmpd-1.0/libmpd/libmpd-database.h is in libmpd-dev 0.20.0-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
/* libmpd (high level libmpdclient library)
 * Copyright (C) 2004-2009 Qball Cow <qball@sarine.nl>
 * Project homepage: http://gmpcwiki.sarine.nl/
 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.

 * 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 __MPD_LIB_DATABASE__
#define __MPD_LIB_DATABASE__

/** \defgroup database Database
 */
/*@{*/



/**
 * @param mi A #MpdObj
 * @param artist an artist name
 *
 * Grabs a list of albums of a certain artist from mpd.
 * if artist is %NULL it grabs all albums
 *
 * @returns A #MpdData list.
 */
MpdData *	mpd_database_get_albums		(MpdObj *mi,const char *artist);


/**
 * @param mi a #MpdObj
 *
 * returns a list of all available artists.
 *
 * @returns a #MpdData list
 */
MpdData *	mpd_database_get_artists		(MpdObj *mi);


/**
 * @param mi a #MpdObj
 *
 * Gets the complete database, only returns songs
 *
 * @returns a #MpdData list with songs
 */

MpdData * mpd_database_get_complete(MpdObj *mi);


/**
 *@param mi A #MpdObj
 *@param path The path mpd should update.
 *
 * Force mpd to update (parts of) the database.
 *
 * @returns a #MpdError
 */
int 	mpd_database_update_dir		(MpdObj *mi,const char *path);


/**
 * @param mi a #MpdObj
 * @param table table
 * @param string string to search for
 * @param exact if #TRUE only return exact matches
 * WARNING: This function is deprecated, use mpd_database_search_start 
 * @returns a #MpdData list
 */
MpdData * mpd_database_find(MpdObj *mi, int table,const char *string, int exact);

/**
 * @param mi a #MpdObj
 * @param path a NULL terminated path string
 *
 * Gets the contents of a directory, it can return songs, directories and playlists
 *
 * @returns a #MpdData list with songs, directories and playlists
 */
MpdData * mpd_database_get_directory(MpdObj *mi,const char *path);

/**
 * @param mi a #MpdObj
 * @param path a string containing the  path
 *
 * Recursively list all the songs directory path
 *
 * @returns a #MpdData
 */
MpdData * mpd_database_get_directory_recursive(MpdObj *mi, const char *path);

/**
 * @param mi A #MpdObj
 * @param path an Path to a file
 *
 * Grabs the song info for a single file. Make sure you pass a url to a song
 * and not a directory, that might result in strange behaviour.
 *
 * @returns a #mpd_Song
 */
mpd_Song * mpd_database_get_fileinfo(MpdObj *mi,const char *path);

/*@}*/

/** \defgroup advsearch Database Advanced Search 
 * \ingroup database 
 * The following functions provide an interface to the improved search capabilities of mpd 0.12.0. 
 */
/*@{*/


/**
 * @param mi A #MpdObj
 * @param field A #mpd_TagItems
 * @param value a string that %field needs to match
 *
 * Adds a constraint to the search 
 */
void mpd_database_search_add_constraint(MpdObj *mi, mpd_TagItems field, const char *value);

/**
 * @param mi A #MpdObj
 * @param exact a boolean indicating if the search is fuzzy or exact
 *
 * Starts a search, you can add "constraints" by calling mpd_database_search_add_constraint
 * For Example if you want all songs by Eric Clapton you could do:
 *
 * @code
 * mpd_database_search_start(mi, TRUE);
 * mpd_database_search_add_constraint(mi, MPD_TAG_ITEM_ARTIST, "Eric Clapton");
 * data= mpd_database_search_commit(mi);
 * @endcode
 *
 * If you only want the songs from the album unplugged:
 *
 * @code
 * mpd_database_search_start(mi, TRUE);
 * mpd_database_search_add_constraint(mi, MPD_TAG_ITEM_ARTIST, "Eric Clapton");
 * mpd_database_search_add_constraint(mi, MPD_TAG_ITEM_ALBUM, "Unplugged");
 * data= mpd_database_search_commit(mi);
 * @endcode
 *
 * This function requires mpd 0.12.0 or higher 
 */

void mpd_database_search_start(MpdObj *mi, int exact);

/**
 * @param mi a #MpdObj
 * @param field a #mpd_TagItems
 *
 * Starts a field search, eg. if you want a list of all albums, you do;
 * 
 * @code 
 * mpd_database_search_field_start(mi, MPD_TAG_ITEM_ALBUM);
 * data = mpd_database_search_commit(mi);
 * @endcode
 * 
 * You can add constraints using mpd_database_search_add_constraint, for example if you want 
 * all albums by eric clapton:
 * 
 * @code
 * mpd_database_search_field_start(mi, MPD_TAG_ITEM_ALBUM);
 * mpd_database_search_add_constraint(mi, MPD_TAG_ITEM_ARTIST, "Eric Clapton");
 * data = mpd_database_search_commit(mi);
 * @endcode
 */
void mpd_database_search_field_start(MpdObj *mi, mpd_TagItems field);

/**
 * @param mi A #MpdObj
 *
 * Commits the search and gathers the result in a #MpdData list.
 *
 * @returns a #MpdData list with the search result, or NULL when nothing is found
 */
MpdData * mpd_database_search_commit(MpdObj *mi);



/*@}*/
/** \defgroup databaseSearchStats Database Search Statistics
 * \ingroup database
 * A extension to the database search, that instead of returning the full results.
 * Only reports back a few statistics about the result. 
 * For now Number of Songs are reported and total playtime.
 */
/*@{*/

/*! \var typedef mpd_SearchStat MpdDBStats 
    \brief A Structure containing numberOfSongs and playTime 
    
    see #mpd_SearchStats
*/

typedef mpd_SearchStats MpdDBStats;

/**
 * @param mi A #MpdObj
 *
 * Starts a search, you can add constraints by calling #mpd_database_search_add_constraint.
 * To get the result call #mpd_database_search_stats_commit
 * 
 * This function requires mpd 0.13.0 or higher 
 */

void mpd_database_search_stats_start(MpdObj *mi);


/**
 * @param mi A #MpdObj
 *
 * Gets statistics results of a search.
 * 
 * @returns a #MpdDBStats
 */
MpdDBStats * mpd_database_search_stats_commit(MpdObj *mi);

/**
 * @param data a #MpdDBStats
 *
 * frees the #MpdDBStats structure.
 */
void mpd_database_search_free_stats(MpdDBStats *data);

/*@}*/

/** \defgroup databasePlaylist Database Playlist
 * \ingroup database
 */
/*@{*/


/**
 * @param mi A #MpdObj
 * @param path path of the playlist
 *
 * Deletes a playlist.
 * @returns a #MpdError
 */

int mpd_database_delete_playlist(MpdObj *mi,const char *path);

/**
 * @param mi a #MpdObj
 * @param name The name of the playlist
 *
 * Saves the current playlist to a file.
 *
 * @returns a #MpdError. #MPD_OK if successful,
 * #MPD_DATABASE_PLAYLIST_EXIST when the playlist already exists.
 */ 
int		mpd_database_save_playlist			(MpdObj *mi,const char *name);

/**
 * @param mi a #MpdObj
 * @param playlist the playlist you need the content of.
 *
 * Needs mpd 0.12.0 or higher.
 *
 * @returns a #MpdData list
 */
MpdData *mpd_database_get_playlist_content(MpdObj *mi,const char *playlist);

/**
 * @param mi a #MpdObj
 * @param path a string contains the path of the playlist
 * @param file a string contains the path of the song to add
 *
 * Add a path to a stored playlist.
 * Needs 0.13.0
 */
void mpd_database_playlist_list_add(MpdObj *mi, const char *path, const char *file);

/**
 * @param mi a #MpdObj
 * @param path a string containing the path of the playlist
 * @param pos an int representing the position of a song
 *
 * Deletes the song at position pos from a playlist.
 * Needs mpd 0.13.0
 *
 */
void mpd_database_playlist_list_delete(MpdObj *mi, const char *path, int pos);

/**
 * @param mi a #MpdObj
 * @param path a string containing the path of the playlist
 *
 * Clears the content of a stored playlist, also used to create an empty playlist
 * Needs mpd 0.13.0
 */
void mpd_database_playlist_clear(MpdObj *mi,const char *path);

/**
 * @param mi a #MpdObj
 * @param old a string, old playlist name
 * @param new  a string, new playlist name
 * 
 * Renames a stored playlist
 * Needs mpd 0.13.0
 */
void mpd_database_playlist_rename(MpdObj *mi, const char *old_name, const char *new_name);

/**
 * @param mi a #MpdObj
 * @param playlist a string containing the path of the playlist
 * @param old_pos an integer representing old position
 * @param new_pos an integer representing the position to move old_pos to.
 *
 * Moves songs in a stored playlist
 * Needs mpd 0.13.0
 */
int mpd_database_playlist_move(MpdObj *mi, const char *playlist, int old_pos, int new_pos);
MpdData * mpd_database_playlist_list(MpdObj *mi);
/*@}*/
#endif