2
* Copyright (C) 2011 Jonathan Matthew <jonathan@d14n.org>
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.
9
* The Rhythmbox authors hereby grant permission for non-GPL compatible
10
* GStreamer plugins to be used and distributed together with GStreamer
11
* and Rhythmbox. This permission is above and beyond the permissions granted
12
* by the GPL license by which Rhythmbox is covered. If you modify this code
13
* you may extend this exception to your version of the code, but you are not
14
* obligated to do so. If you do not wish to do so, delete this exception
15
* statement from your version.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
28
#ifndef RB_TRANSFER_TARGET_H
29
#define RB_TRANSFER_TARGET_H
31
#include <glib-object.h>
33
#include <rhythmdb/rhythmdb.h>
34
#include <shell/rb-track-transfer-batch.h>
36
#define RB_TYPE_TRANSFER_TARGET (rb_transfer_target_get_type ())
37
#define RB_TRANSFER_TARGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_TRANSFER_TARGET, RBTransferTarget))
38
#define RB_IS_TRANSFER_TARGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_TRANSFER_TARGET))
39
#define RB_TRANSFER_TARGET_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), RB_TYPE_TRANSFER_TARGET, RBTransferTargetInterface))
41
typedef struct _RBTransferTarget RBTransferTarget;
42
typedef struct _RBTransferTargetInterface RBTransferTargetInterface;
44
struct _RBTransferTargetInterface
46
GTypeInterface g_iface;
48
char* (*build_dest_uri) (RBTransferTarget *target,
50
const char *media_type,
51
const char *extension);
52
gboolean (*track_added) (RBTransferTarget *target,
56
const char *media_type);
57
gboolean (*track_add_error) (RBTransferTarget *target,
61
gboolean (*should_transfer) (RBTransferTarget *target,
62
RhythmDBEntry *entry);
65
GType rb_transfer_target_get_type (void);
67
char* rb_transfer_target_build_dest_uri (RBTransferTarget *target,
69
const char *media_type,
70
const char *extension);
71
void rb_transfer_target_track_added (RBTransferTarget *target,
75
const char *media_type);
76
void rb_transfer_target_track_add_error (RBTransferTarget *target,
80
gboolean rb_transfer_target_should_transfer (RBTransferTarget *target,
81
RhythmDBEntry *entry);
83
GList * rb_transfer_target_get_format_descriptions (RBTransferTarget *target);
84
gboolean rb_transfer_target_check_category (RBTransferTarget *target,
85
RhythmDBEntry *entry);
86
gboolean rb_transfer_target_check_duplicate (RBTransferTarget *target,
87
RhythmDBEntry *entry);
89
RBTrackTransferBatch *rb_transfer_target_transfer (RBTransferTarget *target, GList *entries);
94
#endif /* RB_TRANSFER_TARGET_H */