rygel r335 - trunk/src/rygel



Author: zeeshanak
Date: Sun Dec 14 20:21:34 2008
New Revision: 335
URL: http://svn.gnome.org/viewvc/rygel?rev=335&view=rev

Log:
Add a convience method to create URI from path.

Modified:
   trunk/src/rygel/rygel-streamer.vala

Modified: trunk/src/rygel/rygel-streamer.vala
==============================================================================
--- trunk/src/rygel/rygel-streamer.vala	(original)
+++ trunk/src/rygel/rygel-streamer.vala	Sun Dec 14 20:21:34 2008
@@ -49,6 +49,13 @@
         this.path_hash.set (path, mimetype);
     }
 
+    public string create_uri_for_path (string path) {
+        return "http://%s:%u%s%s".printf (this.context.host_ip,
+                                          this.context.port,
+                                          SERVER_PATH_ROOT,
+                                          path);
+    }
+
     private void server_handler (Soup.Server        server,
                                  Soup.Message       msg,
                                  string             server_path,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]