1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3 * arch-tag: Header files for podcast download manager
5 * Copyright (C) 2005 Renato Araujo Oliveira Filho - INdT <renato.filho@indt.org.br>
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
26 #ifndef RB_PODCAST_MANAGER_H
27 #define RB_PODCAST_MANAGER_H
31 #define RB_TYPE_PODCAST_MANAGER (rb_podcast_manager_get_type ())
32 #define RB_PODCAST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RB_TYPE_PODCAST_MANAGER, RBPodcastManager))
33 #define RB_PODCAST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RB_TYPE_PODCAST_MANAGER, RBPodcastManagerClass))
34 #define RB_IS_PODCAST_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RB_TYPE_PODCAST_MANAGER))
35 #define RB_IS_PODCAST_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RB_TYPE_PODCAST_MANAGER))
36 #define RB_PODCAST_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RB_TYPE_PODCAST_MANAGER, RBPodcastManagerClass))
38 typedef struct RBPodcastManagerPrivate RBPodcastManagerPrivate
;
44 RBPodcastManagerPrivate
*priv
;
49 GObjectClass parent_class
;
52 void (*status_changed
) (RBPodcastManager
* pd
, RhythmDBEntry
*entry
, glong value
);
53 void (*start_download
) (RBPodcastManager
* pd
, RhythmDBEntry
*entry
);
54 void (*finish_download
) (RBPodcastManager
* pd
, RhythmDBEntry
*entry
);
55 void (*feed_updates_avaliable
) (RBPodcastManager
* pd
, RhythmDBEntry
*entry
);
56 void (*process_error
) (RBPodcastManager
* pd
, const char *error
);
58 } RBPodcastManagerClass
;
60 GType
rb_podcast_manager_get_type (void);
61 RBPodcastManager
* rb_podcast_manager_new (RhythmDB
*db
);
62 void rb_podcast_manager_cancel_all (RBPodcastManager
*pd
);
63 void rb_podcast_manager_download_entry (RBPodcastManager
*pd
, RhythmDBEntry
*entry
);
64 void rb_podcast_manager_cancel_download (RBPodcastManager
*pd
, RhythmDBEntry
*entry
);
65 void rb_podcast_manager_update_feeds (RBPodcastManager
*pd
);
66 void rb_podcast_manager_start_sync (RBPodcastManager
*pd
);
67 void rb_podcast_manager_set_remove_files (RBPodcastManager
*pd
, gboolean flag
);
68 gboolean
rb_podcast_manager_get_remove_files (RBPodcastManager
*pd
);
69 gboolean
rb_podcast_manager_remove_feed (RBPodcastManager
*pd
,
71 gboolean remove_files
);
72 gchar
* rb_podcast_manager_get_podcast_dir (RBPodcastManager
*pd
);
74 gboolean
rb_podcast_manager_subscribe_feed (RBPodcastManager
*pd
, const gchar
* url
);
75 void rb_podcast_manager_unsubscribe_feed (RhythmDB
*db
, const gchar
* url
);
76 void rb_podcast_manager_shutdown (RBPodcastManager
*pd
);
77 RhythmDBEntry
* rb_podcast_manager_add_post (RhythmDB
*db
,
81 const char *generator
,
83 const char *description
,
88 gboolean
rb_podcast_manager_entry_downloaded (RhythmDBEntry
*entry
);
92 #endif /* RB_PODCAST_MANAGER_H */