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
|
/*
* Copyright (C) 2003 Ross Burton <ross@burtonini.com>
*
* Sound Juicer - sound-juicer.h
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Ross Burton <ross@burtonini.com>
*/
#ifndef SOUND_JUICER_H
#define SOUND_JUICER_H
#include <glib/gi18n.h>
#include <brasero-medium-selection.h>
#include <gconf/gconf-client.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
#include "sj-extractor.h"
/**
* A GConf client
*/
extern GConfClient *gconf_client;
/**
* The main window
*/
extern GtkWidget *main_window;
/**
* The GtkBuilder UI file
*/
extern GtkBuilder *builder;
#define GET_WIDGET(name) GTK_WIDGET(gtk_builder_get_object(builder, (name)))
/**
* The extractor GObject being used
*/
extern SjExtractor *extractor;
/**
* Set if currently extracting
*/
extern gboolean extracting;
/**
* The columns in the list view
*/
typedef enum {
COLUMN_STATE,
COLUMN_EXTRACT,
COLUMN_NUMBER,
COLUMN_TITLE,
COLUMN_ARTIST,
COLUMN_DURATION,
COLUMN_DETAILS,
COLUMN_TOTAL
} ViewColumn;
typedef enum {
STATE_IDLE,
STATE_PLAYING,
STATE_PAUSED,
STATE_EXTRACTING
} TrackState;
typedef enum {
DEBUG_CD = 1 << 0,
DEBUG_METADATA = 1 << 1,
DEBUG_EXTRACTING = 1 << 2,
DEBUG_PLAYING = 1 << 3,
} SjDebugDomain;
/**
* The GtkTreeModel which all of the tracks are stored in
*/
extern GtkListStore *track_store;
/**
* The device we are extracting from.
*/
extern BraseroDrive *drive;
/**
* The root path to write files too
*/
extern GFile *base_uri;
/**
* The pattern to expand when naming folders
*/
extern char *path_pattern;
/**
* The pattern to expand when naming files
*/
extern char *file_pattern;
/**
* If file names should be shell-friendly (i.e no [ /&*?\] characters
*/
extern gboolean strip_chars;
/**
* If the CD-ROM should be ejected when it has been extracted.
*/
extern gboolean eject_finished;
/**
* If the destination folder should be opened when the rip has finished.
*/
extern gboolean open_finished;
/**
* If we are in auto-start mode
*/
extern gboolean autostart;
/**
* Toggle, Title and Artist Renderers
*/
extern GtkCellRenderer *toggle_renderer, *title_renderer, *artist_renderer;
/**
* Debug
*/
void sj_debug (SjDebugDomain domain, const gchar* format, ...);
/**
* GConf key names
*/
#define GCONF_ROOT "/apps/sound-juicer"
#define GCONF_DEVICE GCONF_ROOT "/device"
#define GCONF_EJECT GCONF_ROOT "/eject"
#define GCONF_OPEN GCONF_ROOT "/open_completed"
#define GCONF_BASEPATH GCONF_ROOT "/base_path"
#define GCONF_BASEURI GCONF_ROOT "/base_uri"
#define GCONF_FILE_PATTERN GCONF_ROOT "/file_pattern"
#define GCONF_PATH_PATTERN GCONF_ROOT "/path_pattern"
#define GCONF_AUDIO_PROFILE GCONF_ROOT "/audio_profile"
#define GCONF_AUDIO_PROFILE_MEDIA_TYPE GCONF_ROOT "/audio_profile_media_type"
#define GCONF_PARANOIA GCONF_ROOT "/paranoia"
#define GCONF_STRIP GCONF_ROOT "/strip-special"
#define GCONF_WINDOW GCONF_ROOT "/window"
#define GCONF_AUDIO_VOLUME GCONF_ROOT "/volume"
#define GCONF_PROXY_ROOT "/system/http_proxy"
#define GCONF_HTTP_PROXY_ENABLE GCONF_PROXY_ROOT "/use_http_proxy"
#define GCONF_HTTP_PROXY GCONF_PROXY_ROOT "/host"
#define GCONF_HTTP_PROXY_PORT GCONF_PROXY_ROOT "/port"
/**
* Custom stock icons
*/
#define SJ_STOCK_EXTRACT "sj-stock-extract"
/* TODO: need to add a SjWindow object or something */
void sj_main_set_title (const char* detail);
#endif /* SOUND_JUICER_H */
|