[rygel] VideoItem -> style
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] VideoItem -> style
- Date: Sun, 3 May 2009 15:16:56 -0400 (EDT)
commit 3b258440edf97688e05f38a348f43a9cbb256f92
Author: Jens Georg <mail jensge org>
Date: Sun May 3 01:31:14 2009 +0200
VideoItem -> style
---
src/plugins/mediathek/Makefile.am | 6 ++--
.../mediathek/rygel-mediathek-rss-container.vala | 4 +-
...k-item.vala => rygel-mediathek-video-item.vala} | 22 ++++++++++----------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/plugins/mediathek/Makefile.am b/src/plugins/mediathek/Makefile.am
index edea03f..a95c275 100644
--- a/src/plugins/mediathek/Makefile.am
+++ b/src/plugins/mediathek/Makefile.am
@@ -15,7 +15,7 @@ AM_CFLAGS = \
BUILT_SOURCES = rygel-media-mediathek.stamp \
rygel-mediathek-asx-playlist.c \
rygel-mediathek-plugin.c \
- rygel-mediathek-item.c \
+ rygel-mediathek-video-item.c \
rygel-mediathek-root-container.c \
rygel-mediathek-rss-container.c
@@ -24,8 +24,8 @@ librygel_media_mediathek_la_SOURCES = \
rygel-mediathek-asx-playlist.vala \
rygel-mediathek-plugin.c \
rygel-mediathek-plugin.vala \
- rygel-mediathek-item.c \
- rygel-mediathek-item.vala \
+ rygel-mediathek-video-item.c \
+ rygel-mediathek-video-item.vala \
rygel-mediathek-root-container.c \
rygel-mediathek-root-container.vala \
rygel-mediathek-rss-container.c \
diff --git a/src/plugins/mediathek/rygel-mediathek-rss-container.vala b/src/plugins/mediathek/rygel-mediathek-rss-container.vala
index 61d2de1..a7fc6db 100644
--- a/src/plugins/mediathek/rygel-mediathek-rss-container.vala
+++ b/src/plugins/mediathek/rygel-mediathek-rss-container.vala
@@ -68,11 +68,11 @@ public class Rygel.MediathekRssContainer : MediaContainer {
for (int i = 0; i < xpo->nodesetval->length(); i++) {
Xml.Node* node = xpo->nodesetval->item(i);
try {
- var item = VideoItem.create_from_xml(this, node);
+ var item = MediathekVideoItem.create_from_xml(this, node);
this.items.add(item);
ret = true;
}
- catch (VideoItemError error) {
+ catch (MediathekVideoItemError error) {
GLib.message("Error creating video item: %s",
error.message);
}
diff --git a/src/plugins/mediathek/rygel-mediathek-item.vala b/src/plugins/mediathek/rygel-mediathek-video-item.vala
similarity index 77%
rename from src/plugins/mediathek/rygel-mediathek-item.vala
rename to src/plugins/mediathek/rygel-mediathek-video-item.vala
index eef7801..2a07398 100644
--- a/src/plugins/mediathek/rygel-mediathek-item.vala
+++ b/src/plugins/mediathek/rygel-mediathek-video-item.vala
@@ -22,12 +22,12 @@ using GLib;
using Rygel;
using Xml;
-public errordomain ZdfMediathek.VideoItemError {
+public errordomain Rygel.MediathekVideoItemError {
XML_PARSE_ERROR
}
-public class ZdfMediathek.VideoItem : Rygel.MediaItem {
- private VideoItem(MediaContainer parent, string title) {
+public class Rygel.MediathekVideoItem : Rygel.MediaItem {
+ private MediathekVideoItem(MediaContainer parent, string title) {
base(Checksum.compute_for_string(ChecksumType.MD5, title), parent, title, MediaItem.VIDEO_CLASS);
this.mime_type = "video/x-ms-asf";
this.author = "ZDF - Zweites Deutsches Fernsehen";
@@ -37,9 +37,9 @@ public class ZdfMediathek.VideoItem : Rygel.MediaItem {
return node->ns != null && node->ns->prefix == "media";
}
- public static VideoItem create_from_xml(MediaContainer parent, Xml.Node *item) throws VideoItemError {
+ public static MediathekVideoItem create_from_xml(MediaContainer parent, Xml.Node *item) throws MediathekVideoItemError {
string title = null;
- VideoItem video_item = null;
+ MediathekVideoItem video_item = null;
MediathekAsxPlaylist asx = null;
for (Xml.Node* item_child = item->children; item_child != null; item_child = item_child->next)
@@ -65,17 +65,17 @@ public class ZdfMediathek.VideoItem : Rygel.MediaItem {
}
}
else {
- throw new VideoItemError.XML_PARSE_ERROR("group node has url property");
+ throw new MediathekVideoItemError.XML_PARSE_ERROR("group node has url property");
}
}
else {
- throw new VideoItemError.XML_PARSE_ERROR("invalid or no namespace");
+ throw new MediathekVideoItemError.XML_PARSE_ERROR("invalid or no namespace");
}
}
}
}
else {
- throw new VideoItemError.XML_PARSE_ERROR("invalid or no namespace on group node");
+ throw new MediathekVideoItemError.XML_PARSE_ERROR("invalid or no namespace on group node");
}
break;
default:
@@ -85,15 +85,15 @@ public class ZdfMediathek.VideoItem : Rygel.MediaItem {
}
if (title == null) {
- throw new VideoItemError.XML_PARSE_ERROR("Could not find title");
+ throw new MediathekVideoItemError.XML_PARSE_ERROR("Could not find title");
}
if (asx == null) {
- throw new VideoItemError.XML_PARSE_ERROR("Could not find uris");
+ throw new MediathekVideoItemError.XML_PARSE_ERROR("Could not find uris");
}
- video_item = new VideoItem(parent, title);
+ video_item = new MediathekVideoItem(parent, title);
foreach (string uri in asx.uris) {
video_item.uris.add(uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]