2
* Copyright (C) 2012 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 grants 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_CHUNK_LOADER_H
29
#define __RB_CHUNK_LOADER_H
35
#define RB_TYPE_CHUNK_LOADER (rb_chunk_loader_get_type ())
36
#define RB_CHUNK_LOADER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_CHUNK_LOADER, RBChunkLoader))
37
#define RB_CHUNK_LOADER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_CHUNK_LOADER, RBChunkLoaderClass))
38
#define RB_IS_CHUNK_LOADER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_CHUNK_LOADER))
39
#define RB_IS_CHUNK_LOADER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_CHUNK_LOADER))
40
#define RB_CHUNK_LOADER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_CHUNK_LOADER, RBChunkLoaderClass))
42
typedef struct _RBChunkLoader RBChunkLoader;
43
typedef struct _RBChunkLoaderClass RBChunkLoaderClass;
44
typedef struct _RBChunkLoaderPrivate RBChunkLoaderPrivate;
46
typedef void (*RBChunkLoaderCallback) (RBChunkLoader *loader, GString *data, goffset total, gpointer user_data);
51
RBChunkLoaderPrivate *priv;
54
struct _RBChunkLoaderClass
56
GObjectClass parent_class;
59
GType rb_chunk_loader_get_type (void);
61
RBChunkLoader * rb_chunk_loader_new (void);
63
void rb_chunk_loader_set_callback (RBChunkLoader *loader,
64
RBChunkLoaderCallback callback,
66
GDestroyNotify destroy_data);
68
GError * rb_chunk_loader_get_error (RBChunkLoader *loader);
70
void rb_chunk_loader_start (RBChunkLoader *loader,
74
void rb_chunk_loader_cancel (RBChunkLoader *loader);
78
#endif /* __RB_CHUNK_LOADER_H */