~ubuntu-branches/ubuntu/quantal/rhythmbox/quantal-proposed

« back to all changes in this revision

Viewing changes to sources/rb-transfer-target.h

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Rico Tzschichholz
  • Date: 2011-12-05 19:31:23 UTC
  • mfrom: (1.1.60)
  • Revision ID: package-import@ubuntu.com-20111205193123-89047p8yplb0w1vx
Tags: 2.90.1~20111126.89c872b0-0ubuntu1
* Upload the new version to Ubuntu, should solve those issues:
  - the lack of rhythmbox-client command (lp: #875064)
  - the music sharing preferences dialog (lp: #894153)
  - several segfaults (lp: #859195, #814614)
* debian/control.in:
  - let the rhythmbox gir depends on gir1.2-peas-1.0 (lp: #874973)

[ Rico Tzschichholz ]
* New upstream git snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  Copyright (C) 2011 Jonathan Matthew  <jonathan@d14n.org>
 
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
 *  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.
 
16
 *
 
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.
 
21
 *
 
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.
 
25
 *
 
26
 */
 
27
 
 
28
#ifndef RB_TRANSFER_TARGET_H
 
29
#define RB_TRANSFER_TARGET_H
 
30
 
 
31
#include <glib-object.h>
 
32
 
 
33
#include <rhythmdb/rhythmdb.h>
 
34
#include <shell/rb-track-transfer-batch.h>
 
35
 
 
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))
 
40
 
 
41
typedef struct _RBTransferTarget RBTransferTarget;
 
42
typedef struct _RBTransferTargetInterface RBTransferTargetInterface;
 
43
 
 
44
struct _RBTransferTargetInterface
 
45
{
 
46
        GTypeInterface g_iface;
 
47
 
 
48
        char*           (*build_dest_uri)       (RBTransferTarget *target,
 
49
                                                 RhythmDBEntry *entry,
 
50
                                                 const char *media_type,
 
51
                                                 const char *extension);
 
52
        gboolean        (*track_added)          (RBTransferTarget *target,
 
53
                                                 RhythmDBEntry *entry,
 
54
                                                 const char *uri,
 
55
                                                 guint64 dest_size,
 
56
                                                 const char *media_type);
 
57
        gboolean        (*track_add_error)      (RBTransferTarget *target,
 
58
                                                 RhythmDBEntry *entry,
 
59
                                                 const char *uri,
 
60
                                                 GError *error);
 
61
        gboolean        (*should_transfer)      (RBTransferTarget *target,
 
62
                                                 RhythmDBEntry *entry);
 
63
};
 
64
 
 
65
GType           rb_transfer_target_get_type     (void);
 
66
 
 
67
char*           rb_transfer_target_build_dest_uri       (RBTransferTarget *target,
 
68
                                                         RhythmDBEntry *entry,
 
69
                                                         const char *media_type,
 
70
                                                         const char *extension);
 
71
void            rb_transfer_target_track_added          (RBTransferTarget *target,
 
72
                                                         RhythmDBEntry *entry,
 
73
                                                         const char *uri,
 
74
                                                         guint64 filesize,
 
75
                                                         const char *media_type);
 
76
void            rb_transfer_target_track_add_error      (RBTransferTarget *target,
 
77
                                                         RhythmDBEntry *entry,
 
78
                                                         const char *uri,
 
79
                                                         GError *error);
 
80
gboolean        rb_transfer_target_should_transfer      (RBTransferTarget *target,
 
81
                                                         RhythmDBEntry *entry);
 
82
 
 
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);
 
88
 
 
89
RBTrackTransferBatch *rb_transfer_target_transfer       (RBTransferTarget *target, GList *entries);
 
90
 
 
91
 
 
92
G_END_DECLS
 
93
 
 
94
#endif  /* RB_TRANSFER_TARGET_H */