udapted vi.po
[rhythmbox.git] / podcast / rb-podcast-manager.h
blob539c9389b3d716b42630bf007fc416ba62137290
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.
23 #include <glib.h>
24 #include "rhythmdb.h"
26 #ifndef RB_PODCAST_MANAGER_H
27 #define RB_PODCAST_MANAGER_H
29 G_BEGIN_DECLS
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;
40 typedef struct
42 GObject parent;
44 RBPodcastManagerPrivate *priv;
45 } RBPodcastManager;
47 typedef struct
49 GObjectClass parent_class;
51 /* signals */
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_available) (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_download_entry (RBPodcastManager *pd, RhythmDBEntry *entry);
63 void rb_podcast_manager_cancel_download (RBPodcastManager *pd, RhythmDBEntry *entry);
64 void rb_podcast_manager_update_feeds (RBPodcastManager *pd);
65 void rb_podcast_manager_start_sync (RBPodcastManager *pd);
66 void rb_podcast_manager_set_remove_files (RBPodcastManager *pd, gboolean flag);
67 gboolean rb_podcast_manager_get_remove_files (RBPodcastManager *pd);
68 gboolean rb_podcast_manager_remove_feed (RBPodcastManager *pd,
69 const gchar* url,
70 gboolean remove_files);
71 gchar * rb_podcast_manager_get_podcast_dir (RBPodcastManager *pd);
73 gboolean rb_podcast_manager_subscribe_feed (RBPodcastManager *pd, const gchar* url);
74 void rb_podcast_manager_unsubscribe_feed (RhythmDB *db, const gchar* url);
75 void rb_podcast_manager_shutdown (RBPodcastManager *pd);
76 RhythmDBEntry * rb_podcast_manager_add_post (RhythmDB *db,
77 const char *name,
78 const char *title,
79 const char *subtitle,
80 const char *generator,
81 const char *uri,
82 const char *description,
83 gulong date,
84 gulong duration,
85 guint64 filesize);
87 gboolean rb_podcast_manager_entry_downloaded (RhythmDBEntry *entry);
89 G_END_DECLS
91 #endif /* RB_PODCAST_MANAGER_H */