[Amarok] 12eac13 Forgot these files, sorry for the build breakage.
Bart Cerneels
bart.cerneels at kde.org
Wed Jan 20 08:54:03 CET 2010
commit 12eac135ad6eee3fe69f551a438092224b2b4624
Author: Bart Cerneels <bart.cerneels at kde.org>
Date: Wed Jan 20 08:49:46 2010 +0100
Forgot these files, sorry for the build breakage.
CCMAIL:amarok-devel at kde.org
diff --git a/src/collection/mediadevicecollection/podcast/MediaDevicePodcastMeta.h b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastMeta.h
new file mode 100644
index 0000000..deeb0bf
--- /dev/null
+++ b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastMeta.h
@@ -0,0 +1,32 @@
+#ifndef MEDIADEVICEPODCASTMETA_H
+#define MEDIADEVICEPODCASTMETA_H
+
+#endif // MEDIADEVICEPODCASTMETA_H
+
+#include "podcasts/PodcastMeta.h"
+
+namespace Handler
+{
+ class MediaDevicePodcastChannel;
+ typedef KSharedPtr<MediaDevicePodcastChannel> MediaDevicePodcastChannelPtr;
+ typedef QList<MediaDevicePodcastChannelPtr> MediaDevicePodcastChannelList;
+
+ class MediaDevicePodcastEpisode;
+ typedef KSharedPtr<MediaDevicePodcastEpisode> MediaDevicePodcastEpisodePtr;
+ typedef QList<MediaDevicePodcastEpisodePtr> MediaDevicePodcastEpisodeList;
+
+ class MediaDevicePodcastChannel : public Meta::PodcastChannel
+ {
+
+ };
+
+ class MediaDevicePodcastEpisode : public Meta::PodcastEpisode
+ {
+
+ };
+}
+
+Q_DECLARE_METATYPE( Handler::MediaDevicePodcastChannelPtr )
+Q_DECLARE_METATYPE( Handler::MediaDevicePodcastChannelList )
+Q_DECLARE_METATYPE( Handler::MediaDevicePodcastEpisodePtr )
+Q_DECLARE_METATYPE( Handler::MediaDevicePodcastEpisodeList )
diff --git a/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.cpp b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.cpp
new file mode 100644
index 0000000..61d69ad
--- /dev/null
+++ b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.cpp
@@ -0,0 +1,66 @@
+#include "MediaDevicePodcastProvider.h"
+
+using namespace Meta;
+
+MediaDevicePodcastProvider::MediaDevicePodcastProvider( MediaDeviceHandler *handler )
+ : m_handler( handler )
+{
+}
+
+void
+MediaDevicePodcastProvider::addPodcast( const KUrl &url )
+{
+ //can this handler even fetch feeds itself?
+}
+
+PodcastChannelPtr
+MediaDevicePodcastProvider::addChannel( PodcastChannelPtr channel )
+{
+ return PodcastChannelPtr();
+}
+
+PodcastEpisodePtr
+MediaDevicePodcastProvider::addEpisode( PodcastEpisodePtr episode )
+{
+ return PodcastEpisodePtr();
+}
+
+PodcastChannelList
+MediaDevicePodcastProvider::channels()
+{
+ PodcastChannelList channels;
+ return channels;
+}
+
+void
+MediaDevicePodcastProvider::removeSubscription( PodcastChannelPtr channel )
+{
+}
+
+void
+MediaDevicePodcastProvider::configureProvider()
+{
+}
+
+void
+MediaDevicePodcastProvider::configureChannel( PodcastChannelPtr channel )
+{
+}
+
+QString
+MediaDevicePodcastProvider::prettyName() const
+{
+ return i18nc( "Podcasts on a media device", "Podcasts on %1" )
+ .arg( m_handler->prettyName() );
+}
+
+PlaylistList
+MediaDevicePodcastProvider::playlists()
+{
+ PlaylistList playlists;
+
+ foreach( PodcastChannelPtr channel, channels() )
+ playlists << PlaylistPtr::dynamicCast( channel );
+
+ return playlists;
+}
diff --git a/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.h b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.h
new file mode 100644
index 0000000..48ea553
--- /dev/null
+++ b/src/collection/mediadevicecollection/podcast/MediaDevicePodcastProvider.h
@@ -0,0 +1,38 @@
+#ifndef MEDIADEVICEPODCASTPROVIDER_H
+#define MEDIADEVICEPODCASTPROVIDER_H
+
+#include "PodcastProvider.h"
+#include "handler/MediaDeviceHandler.h"
+
+class MediaDevicePodcastProvider : public PodcastProvider
+{
+ public:
+ MediaDevicePodcastProvider( Meta::MediaDeviceHandler *handler );
+
+ //TODO:implement these
+ virtual bool possiblyContainsTrack( const KUrl &url ) const { Q_UNUSED(url); return false;}
+ virtual Meta::TrackPtr trackForUrl( const KUrl &url ) { Q_UNUSED(url); return Meta::TrackPtr(); }
+
+ virtual void addPodcast( const KUrl &url );
+
+ virtual Meta::PodcastChannelPtr addChannel( Meta::PodcastChannelPtr channel );
+ virtual Meta::PodcastEpisodePtr addEpisode( Meta::PodcastEpisodePtr episode );
+
+ virtual Meta::PodcastChannelList channels();
+
+ virtual void removeSubscription( Meta::PodcastChannelPtr channel );
+
+ virtual void configureProvider();
+ virtual void configureChannel( Meta::PodcastChannelPtr channel );
+
+ // PlaylistProvider methods
+ virtual QString prettyName() const;
+ virtual int category() const { return (int)PlaylistManager::PodcastChannel; }
+
+ virtual Meta::PlaylistList playlists();
+
+ private:
+ Meta::MediaDeviceHandler *m_handler;
+};
+
+#endif // MEDIADEVICEPODCASTPROVIDER_H
More information about the Amarok-devel
mailing list