1 /* 2 * Copyright (c) 2017-2019 gnome-mpv 3 * 4 * This file is part of Celluloid. 5 * 6 * Celluloid is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * Celluloid 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 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with Celluloid. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef METADATA_CACHE 21 #define METADATA_CACHE 22 23 #include <glib-object.h> 24 25 G_BEGIN_DECLS 26 27 typedef struct _CelluloidMetadataCacheEntry CelluloidMetadataCacheEntry; 28 29 struct _CelluloidMetadataCacheEntry 30 { 31 gint references; 32 gchar *title; 33 gdouble duration; 34 GPtrArray *tags; 35 }; 36 37 #define CELLULOID_TYPE_METADATA_CACHE (celluloid_metadata_cache_get_type()) 38 39 G_DECLARE_FINAL_TYPE(CelluloidMetadataCache, celluloid_metadata_cache, CELLULOID, METADATA_CACHE, GObject) 40 41 CelluloidMetadataCache * 42 celluloid_metadata_cache_new(void); 43 44 void 45 celluloid_metadata_cache_ref_entry( CelluloidMetadataCache *cache, 46 const gchar *uri ); 47 48 void 49 celluloid_metadata_cache_unref_entry( CelluloidMetadataCache *cache, 50 const gchar *uri ); 51 52 void 53 celluloid_metadata_cache_load_playlist( CelluloidMetadataCache *cache, 54 const GPtrArray *playlist ); 55 56 CelluloidMetadataCacheEntry * 57 celluloid_metadata_cache_lookup( CelluloidMetadataCache *cache, 58 const gchar *uri ); 59 60 G_END_DECLS 61 62 #endif 63