1 /*                                                     -*- linux-c -*-
2     Copyright (C) 2004 Tom Szilagyi
3 
4     This program is free software; you can redistribute it and/or modify
5     it under the terms of the GNU General Public License as published by
6     the Free Software Foundation; either version 2 of the License, or
7     (at your option) any later version.
8 
9     This program is distributed in the hope that it will be useful,
10     but WITHOUT ANY WARRANTY; without even the implied warranty of
11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12     GNU General Public License for more details.
13 
14     You should have received a copy of the GNU General Public License
15     along with this program; if not, write to the Free Software
16     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18     $Id: store_file.h 1236 2012-02-04 10:28:58Z assworth $
19 */
20 
21 #ifndef AQUALUNG_STORE_FILE_H
22 #define AQUALUNG_STORE_FILE_H
23 
24 #include <glib.h>
25 #include <gdk/gdk.h>
26 #include <gtk/gtk.h>
27 
28 
29 enum {
30 	BATCH_TAG_TITLE   = (1 << 0),
31 	BATCH_TAG_ARTIST  = (1 << 1),
32 	BATCH_TAG_ALBUM   = (1 << 2),
33 	BATCH_TAG_COMMENT = (1 << 3),
34 	BATCH_TAG_YEAR    = (1 << 4),
35 	BATCH_TAG_TRACKNO = (1 << 5)
36 };
37 
38 int store_file_iter_is_track(GtkTreeIter * iter);
39 void store_file_iter_addlist_defmode(GtkTreeIter * ms_iter, GtkTreeIter * pl_iter, int new_tab);
40 void store_file_selection_changed(GtkTreeIter * iter, GtkTextBuffer * buffer, GtkLabel * statusbar);
41 gboolean store_file_event_cb(GdkEvent * event, GtkTreeIter * iter, GtkTreePath * path);
42 void store_file_load_icons(void);
43 void store_file_create_popup_menu(void);
44 void store_file_insert_progress_bar(GtkWidget * vbox);
45 void store_file_set_toolbar_sensitivity(GtkTreeIter * iter, GtkWidget * edit,
46 					GtkWidget * add, GtkWidget * remove);
47 void store_file_toolbar__edit_cb(gpointer data);
48 void store_file_toolbar__add_cb(gpointer data);
49 void store_file_toolbar__remove_cb(gpointer data);
50 
51 gboolean store_file_remove_track(GtkTreeIter * iter);
52 gboolean store_file_remove_record(GtkTreeIter * iter);
53 gboolean store_file_remove_artist(GtkTreeIter * iter);
54 gboolean store_file_remove_store(GtkTreeIter * iter);
55 
56 void store_file_progress_bar_hide(void);
57 
58 void store__add_cb(gpointer data);
59 
60 void store_file_load(char * file, char * sort);
61 void store_file_save(GtkTreeIter * iter_store);
62 
63 void store__addlist_defmode(gpointer data);
64 void artist__addlist_defmode(gpointer data);
65 void record__addlist_defmode(gpointer data);
66 void track__addlist_cb(gpointer data);
67 
68 typedef struct {
69 	int type;
70 	int dirty;
71 	int readonly;
72 	int use_relative_paths;
73 	char * file;
74 	char * comment;
75 } store_data_t;
76 
77 typedef struct {
78 	char * comment;
79 } artist_data_t;
80 
81 typedef struct {
82 	int year;
83 	char * comment;
84 } record_data_t;
85 
86 typedef struct {
87 	char * file;
88 	float duration; /* length in seconds */
89 	float volume;   /* average volume in dBFS */
90 	float rva;      /* manual RVA in dB */
91 	int use_rva;    /* use manual RVA */
92 	char * comment;
93 	unsigned size;  /* file size in bytes */
94 } track_data_t;
95 
96 
97 #endif /* AQUALUNG_STORE_FILE_H */
98 
99 // vim: shiftwidth=8:tabstop=8:softtabstop=8 :
100