1 /*
2 |  Copyright (C) 2002-2007 Jorg Schuler <jcsjcs at users sourceforge net>
3 |  Part of the gtkpod project.
4 |
5 |  URL: http://www.gtkpod.org/
6 |  URL: http://gtkpod.sourceforge.net/
7 |
8 |  This program is free software; you can redistribute it and/or modify
9 |  it under the terms of the GNU General Public License as published by
10 |  the Free Software Foundation; either version 2 of the License, or
11 |  (at your option) any later version.
12 |
13 |  This program is distributed in the hope that it will be useful,
14 |  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 |  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 |  GNU General Public License for more details.
17 |
18 |  You should have received a copy of the GNU General Public License
19 |  along with this program; if not, write to the Free Software
20 |  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 |
22 |  iTunes and iPod are trademarks of Apple
23 |
24 |  This product is not supported/written/published by Apple!
25 |
26 |  $Id$
27 */
28 
29 #ifndef __INFO_H__
30 #define __INFO_H__
31 
32 #ifdef HAVE_CONFIG_H
33 #  include <config.h>
34 #endif
35 
36 #include <glib.h>
37 #include "itdb.h"
38 
39 /* callbacks */
40 typedef void (*info_update_callback) ();
41 
42 void register_info_update (info_update_callback cb);
43 void register_info_update_track_view (info_update_callback cb);
44 void register_info_update_playlist_view (info_update_callback cb);
45 void register_info_update_totals_view (info_update_callback cb);
46 
47 void unregister_info_update (info_update_callback cb);
48 void unregister_info_update_track_view (info_update_callback cb);
49 void unregister_info_update_playlist_view (info_update_callback cb);
50 void unregister_info_update_totals_view (info_update_callback cb);
51 
52 /* generic functions */
53 void fill_in_info (GList *tl, guint32 *tracks, guint32 *playtime, gdouble *filesize);
54 iTunesDB *get_itdb_ipod (void);
55 iTunesDB *get_itdb_local (void);
56 gdouble get_ipod_free_space(void);
57 
58 /* info window */
59 void info_update (void);
60 void info_update_track_view (void);
61 void info_update_playlist_view (void);
62 void info_update_totals_view (void);
63 
64 /* statusbar stuff */
65 #define STATUSBAR_TIMEOUT 4200
66 void gtkpod_statusbar_init(void);
67 void gtkpod_statusbar_message(const gchar *message, ...);
68 void gtkpod_statusbar_timeout (guint timeout);
69 void gtkpod_space_statusbar_init(void);
70 void gtkpod_tracks_statusbar_init(void);
71 void gtkpod_tracks_statusbar_update(void);
72 
73 /* space stuff */
74 void space_set_ipod_itdb (iTunesDB *itdb);
75 iTunesDB *space_get_ipod_itdb (void);
76 void space_data_update (void);
77 gboolean ipod_connected (void);
78 
79 /* standard messages */
80 void message_sb_no_itdb_selected (void);
81 void message_sb_no_tracks_selected (void);
82 void message_sb_no_playlist_selected (void);
83 void message_sb_no_ipod_itdb_selected (void);
84 
85 #endif
86