src/rygel/rygel-av-transport.vala
src/rygel/rygel-rendering-control.vala
src/rygel/rygel-dbus-service.vala
-src/rygel/rygel-didl-lite-writer.vala
src/rygel/rygel-gst-utils.vala
src/rygel/rygel-http-byte-seek.vala
src/rygel/rygel-http-get-handler.vala
src/rygel/rygel-content-directory.c
src/rygel/rygel-av-transport.c
src/rygel/rygel-rendering-control.c
-src/rygel/rygel-didl-lite-writer.c
src/rygel/rygel-gst-utils.c
src/rygel/rygel-http-byte-seek.c
src/rygel/rygel-http-get.c
rygel-relational-expression.vala \
rygel-logical-expression.vala \
rygel-search-criteria-parser.vala \
- rygel-didl-lite-writer.vala \
rygel-transcoder.vala \
rygel-mp2ts-transcoder.vala \
rygel-mp3-transcoder.vala \
+++ /dev/null
-/*
- * Copyright (C) 2009 Nokia Corporation.
- *
- * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
- * <zeeshan.ali@nokia.com>
- *
- * This file is part of Rygel.
- *
- * Rygel is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Rygel 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 Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-using GUPnP;
-using Gee;
-
-internal errordomain Rygel.DIDLLiteWriterError {
- UNSUPPORTED_OBJECT
-}
-
-/**
- * Responsible for serializing media objects.
- */
-internal class Rygel.DIDLLiteWriter : GUPnP.DIDLLiteWriter {
- public Rygel.HTTPServer http_server;
-
- public DIDLLiteWriter (HTTPServer http_server) {
- this.http_server = http_server;
- }
-
- public void serialize (MediaObject media_object) throws Error {
- media_object.serialize (this);
- }
-}
private ContentDirectory content_dir;
private ServiceAction action;
- private Rygel.DIDLLiteWriter didl_writer;
+ private DIDLLiteWriter didl_writer;
private DIDLLiteParser didl_parser;
public Cancellable cancellable { get; set; }
this.content_dir = content_dir;
this.cancellable = content_dir.cancellable;
this.action = (owned) action;
- this.didl_writer = new Rygel.DIDLLiteWriter (content_dir.http_server);
+ this.didl_writer = new DIDLLiteWriter (null);
this.didl_parser = new DIDLLiteParser ();
}
this.item.place_holder = true;
yield container.add_item (this.item, this.cancellable);
- this.didl_writer.serialize (this.item);
+ this.item.serialize (didl_writer, this.content_dir.http_server);
// Conclude the successful action
this.conclude ();
}
}
- internal override DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal override DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error {
var didl_container = writer.add_container ();
if (this.parent != null) {
}
}
- internal override DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal override DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error {
var didl_item = writer.add_item ();
* can handle.
*/
if (this.place_holder) {
- this.add_proxy_resources (writer.http_server, didl_item);
+ this.add_proxy_resources (http_server, didl_item);
} else {
// Add the transcoded/proxy URIs first
- this.add_proxy_resources (writer.http_server, didl_item);
+ this.add_proxy_resources (http_server, didl_item);
// then original URIs
bool internal_allowed;
- internal_allowed = writer.http_server.context.interface == "lo" ||
- writer.http_server.context.host_ip ==
- "127.0.0.1";
+ internal_allowed = http_server.context.interface == "lo" ||
+ http_server.context.host_ip == "127.0.0.1";
this.add_resources (didl_item, internal_allowed);
}
return null;
}
- internal abstract DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal abstract DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error;
internal virtual int compare_by_property (MediaObject media_object,
public Cancellable cancellable { get; set; }
protected MediaContainer root_container;
+ protected HTTPServer http_server;
protected uint32 system_update_id;
protected ServiceAction action;
- protected Rygel.DIDLLiteWriter didl_writer;
+ protected DIDLLiteWriter didl_writer;
protected XBoxHacks xbox_hacks;
protected string object_id_arg;
protected MediaQueryAction (ContentDirectory content_dir,
owned ServiceAction action) {
this.root_container = content_dir.root_container;
+ this.http_server = content_dir.http_server;
this.system_update_id = content_dir.system_update_id;
this.cancellable = content_dir.cancellable;
this.action = (owned) action;
- this.didl_writer = new Rygel.DIDLLiteWriter (content_dir.http_server);
+ this.didl_writer = new DIDLLiteWriter (null);
try {
this.xbox_hacks = new XBoxHacks.for_action (this.action);
this.xbox_hacks.apply (result as MediaItem);
}
- this.didl_writer.serialize (result);
+ result.serialize (this.didl_writer, this.http_server);
}
// Conclude the successful Browse/Search action
}
}
- internal override DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal override DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error {
- var didl_item = base.serialize (writer);
+ var didl_item = base.serialize (writer, http_server);
if (this.artist != null && this.artist != "") {
var contributor = didl_item.add_artist ();
}
}
- internal override DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal override DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error {
- var didl_item = base.serialize (writer);
+ var didl_item = base.serialize (writer, http_server);
if (this.creator != null && this.creator != "") {
var contributor = didl_item.add_creator ();
}
}
- internal override DIDLLiteObject serialize (DIDLLiteWriter writer)
+ internal override DIDLLiteObject serialize (DIDLLiteWriter writer,
+ HTTPServer http_server)
throws Error {
- var didl_item = base.serialize (writer);
+ var didl_item = base.serialize (writer, http_server);
if (this.author != null && this.author != "") {
var contributor = didl_item.add_author ();