[rygel] core,media-export: Rename DatabaseBackedMediaContainer
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] core,media-export: Rename DatabaseBackedMediaContainer
- Date: Thu, 25 Jun 2009 15:48:25 +0000 (UTC)
commit aee8cb0c729a54ab50cefe7636dcd68832f80731
Author: Jens Georg <mail jensge org>
Date: Thu Jun 25 14:33:17 2009 +0200
core,media-export: Rename DatabaseBackedMediaContainer
.../rygel-media-export-root-container.vala | 5 ++-
src/rygel/Makefile.am | 6 ++--
...ontainer.vala => rygel-media-db-container.vala} | 29 +++++++++----------
src/rygel/rygel-media-db-object-factory.vala | 20 ++++++-------
4 files changed, 29 insertions(+), 31 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala b/src/plugins/media-export/rygel-media-export-root-container.vala
index 5e9b0e2..b2e6817 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -19,18 +19,19 @@
*/
using Gee;
+using Rygel;
/**
* Represents the root container.
*/
-public class Rygel.MediaExportRootContainer : DatabaseBackedMediaContainer {
+public class Rygel.MediaExportRootContainer : MediaDBContainer {
private MetadataExtractor extractor;
private Gee.ArrayList<MediaExportHarvester> harvester;
private Gee.ArrayList<string> get_uris () {
ArrayList<string> uris;
- var config = Rygel.MetaConfig.get_default ();
+ var config = MetaConfig.get_default ();
try {
uris = config.get_string_list ("MediaExport", "uris");
diff --git a/src/rygel/Makefile.am b/src/rygel/Makefile.am
index bd642e1..3356c7f 100644
--- a/src/rygel/Makefile.am
+++ b/src/rygel/Makefile.am
@@ -64,7 +64,7 @@ BUILT_SOURCES = rygel-1.0.vapi \
rygel-media-item.c \
rygel-metadata-extractor.c \
rygel-media-db.c \
- rygel-database-backed-media-container.c \
+ rygel-media-db-container.c \
rygel-media-db-object-factory.c \
rygel-mp2ts-transcoder.c \
rygel-mp3-transcoder.c \
@@ -115,7 +115,7 @@ rygel_SOURCES = $(VAPI_SOURCE_FILES) \
rygel-mp3-transcoder-bin.c \
rygel-l16-transcoder-bin.c \
rygel-gst-utils.c \
- rygel-database-backed-media-container.c \
+ rygel-media-db-container.c \
rygel-media-db-object-factory.c
rygel.stamp: $(filter %.vala,$(rygel_SOURCES))
@@ -175,7 +175,7 @@ VAPI_SOURCE_FILES = rygel-configuration.vala \
rygel-gst-utils.vala \
rygel-media-db.vala \
rygel-metadata-extractor.vala \
- rygel-database-backed-media-container.vala \
+ rygel-media-db-container.vala \
rygel-media-db-object-factory.vala
rygel-1.0.vapi: $(VAPI_SOURCE_FILES)
diff --git a/src/rygel/rygel-database-backed-media-container.vala b/src/rygel/rygel-media-db-container.vala
similarity index 72%
rename from src/rygel/rygel-database-backed-media-container.vala
rename to src/rygel/rygel-media-db-container.vala
index ab52868..c9cacb2 100644
--- a/src/rygel/rygel-database-backed-media-container.vala
+++ b/src/rygel/rygel-media-db-container.vala
@@ -24,12 +24,10 @@
using Rygel;
-public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
+public class Rygel.MediaDBContainer : MediaContainer {
protected MediaDB media_db;
- public DatabaseBackedMediaContainer (Rygel.MediaDB media_db,
- string id,
- string title) {
+ public MediaDBContainer (MediaDB media_db, string id, string title) {
var count = media_db.get_child_count (id);
base (id, null, title, count);
@@ -38,16 +36,17 @@ public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
}
private void on_db_container_updated (MediaContainer container,
- MediaContainer container_updated) {
+ MediaContainer container_updated) {
this.child_count = media_db.get_child_count (this.id);
}
- public override void get_children (uint offset,
- uint max_count,
- Cancellable? cancellable,
+ public override void get_children (uint offset,
+ uint max_count,
+ Cancellable? cancellable,
AsyncReadyCallback callback) {
- var res = new Rygel.SimpleAsyncResult<Gee.ArrayList<MediaObject>>
- (this, callback);
+ var res = new SimpleAsyncResult<Gee.ArrayList<MediaObject>>
+ (this,
+ callback);
res.data = this.media_db.get_children (this.id,
offset,
max_count);
@@ -57,7 +56,7 @@ public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
public override Gee.List<MediaObject>? get_children_finish (
AsyncResult res)
throws GLib.Error {
- var result = (Rygel.SimpleAsyncResult<Gee.ArrayList<MediaObject>>)res;
+ var result = (SimpleAsyncResult<Gee.ArrayList<MediaObject>>)res;
foreach (var obj in result.data) {
obj.parent = this;
@@ -66,17 +65,17 @@ public class Rygel.DatabaseBackedMediaContainer : Rygel.MediaContainer {
}
- public override void find_object (string id,
- Cancellable? cancellable,
+ public override void find_object (string id,
+ Cancellable? cancellable,
AsyncReadyCallback callback) {
- var res = new Rygel.SimpleAsyncResult<MediaObject> (this, callback);
+ var res = new SimpleAsyncResult<MediaObject> (this, callback);
res.data = media_db.get_object (id);
res.complete_in_idle ();
}
public override MediaObject? find_object_finish (AsyncResult res) {
- return ((Rygel.SimpleAsyncResult<MediaObject>)res).data;
+ return ((SimpleAsyncResult<MediaObject>)res).data;
}
}
diff --git a/src/rygel/rygel-media-db-object-factory.vala b/src/rygel/rygel-media-db-object-factory.vala
index a05a980..21797ba 100644
--- a/src/rygel/rygel-media-db-object-factory.vala
+++ b/src/rygel/rygel-media-db-object-factory.vala
@@ -43,13 +43,11 @@ public class Rygel.MediaDBObjectFactory : Object {
* @param title title of the container
* @param child_count number of children in the container
*/
- public virtual MediaContainer get_container (Rygel.MediaDB media_db,
- string id,
- string title,
- uint child_count) {
- return new DatabaseBackedMediaContainer (media_db,
- id,
- title);
+ public virtual MediaContainer get_container (MediaDB media_db,
+ string id,
+ string title,
+ uint child_count) {
+ return new MediaDBContainer (media_db, id, title);
}
/**
@@ -60,11 +58,11 @@ public class Rygel.MediaDBObjectFactory : Object {
* @param title title of the item
* @param upnp_class upnp_class of the item
*/
- public virtual MediaItem get_item (Rygel.MediaDB media_db,
+ public virtual MediaItem get_item (MediaDB media_db,
MediaContainer parent,
- string id,
- string title,
- string upnp_class) {
+ string id,
+ string title,
+ string upnp_class) {
return new MediaItem (id, parent, title, upnp_class);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]