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
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* arch-tag: Header files for podcast download manager
*
* Copyright (C) 2005 Renato Araujo Oliveira Filho - INdT <renato.filho@indt.org.br>
*
* 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.
*
*/
#include <glib.h>
#include "rhythmdb.h"
#ifndef RB_PODCAST_MANAGER_H
#define RB_PODCAST_MANAGER_H
G_BEGIN_DECLS
#define RB_TYPE_PODCAST_MANAGER (rb_podcast_manager_get_type ())
#define RB_PODCAST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_PODCAST_MANAGER, RBPodcastManager))
#define RB_PODCAST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_PODCAST_MANAGER, RBPodcastManagerClass))
#define RB_IS_PODCAST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_PODCAST_MANAGER))
#define RB_IS_PODCAST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_PODCAST_MANAGER))
#define RB_PODCAST_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_PODCAST_MANAGER, RBPodcastManagerClass))
typedef struct RBPodcastManagerPrivate RBPodcastManagerPrivate;
typedef struct
{
GObject parent;
RBPodcastManagerPrivate *priv;
} RBPodcastManager;
typedef struct
{
GObjectClass parent_class;
/* signals */
void (*status_changed) (RBPodcastManager* pd, RhythmDBEntry *entry, glong value);
void (*start_download) (RBPodcastManager* pd, RhythmDBEntry *entry);
void (*finish_download) (RBPodcastManager* pd, RhythmDBEntry *entry);
void (*feed_updates_avaliable) (RBPodcastManager* pd, RhythmDBEntry *entry);
void (*process_error) (RBPodcastManager* pd, const char *error);
} RBPodcastManagerClass;
GType rb_podcast_manager_get_type (void);
RBPodcastManager* rb_podcast_manager_new (RhythmDB *db);
void rb_podcast_manager_cancel_all (RBPodcastManager *pd);
void rb_podcast_manager_download_entry (RBPodcastManager *pd, RhythmDBEntry *entry);
void rb_podcast_manager_cancel_download (RBPodcastManager *pd, RhythmDBEntry *entry);
void rb_podcast_manager_update_feeds (RBPodcastManager *pd);
void rb_podcast_manager_start_sync (RBPodcastManager *pd);
void rb_podcast_manager_set_remove_files (RBPodcastManager *pd, gboolean flag);
gboolean rb_podcast_manager_get_remove_files (RBPodcastManager *pd);
gboolean rb_podcast_manager_remove_feed (RBPodcastManager *pd,
const gchar* url,
gboolean remove_files);
gchar * rb_podcast_manager_get_podcast_dir (RBPodcastManager *pd);
gboolean rb_podcast_manager_subscribe_feed (RBPodcastManager *pd, const gchar* url);
void rb_podcast_manager_unsubscribe_feed (RhythmDB *db, const gchar* url);
void rb_podcast_manager_shutdown (RBPodcastManager *pd);
gboolean rb_podcast_manager_add_post (RhythmDB *db,
const char *name,
const char *title,
const char *subtitle,
const char *generator,
const char *uri,
const char *description,
gulong status,
gulong date,
gulong duration,
guint64 filesize);
gboolean rb_podcast_manager_entry_downloaded (RhythmDBEntry *entry);
G_END_DECLS
#endif /* RB_PODCAST_MANAGER_H */
|