Commit 47cd9b18 authored by Sebastian Ramacher's avatar Sebastian Ramacher
Browse files

List recent files


Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 1cd609d3
......@@ -68,3 +68,11 @@ zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_fileinfo(db, file, file_info);
}
girara_list_t*
zathura_db_get_recent_files(zathura_database_t* db)
{
g_return_val_if_fail(ZATHURA_IS_DATABASE(db), NULL);
return ZATHURA_DATABASE_GET_INTERFACE(db)->get_recent_files(db);
}
......@@ -50,6 +50,8 @@ struct _ZathuraDatabaseInterface
bool (*set_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
bool (*get_fileinfo)(ZathuraDatabase* db, const char* file, zathura_fileinfo_t* file_info);
girara_list_t* (*get_recent_files)(ZathuraDatabase* db);
};
GType zathura_database_get_type(void);
......@@ -128,4 +130,13 @@ bool zathura_db_set_fileinfo(zathura_database_t* db, const char* file,
bool zathura_db_get_fileinfo(zathura_database_t* db, const char* file,
zathura_fileinfo_t* file_info);
/* Get a list of recent files from the database. The most recent file is listed
* first.
*
* @param db The database instance
* @return list of files
*/
girara_list_t* zathura_db_get_recent_files(zathura_database_t* db);
#endif // DATABASE_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment