00e88da0caf82c11ea18792e5b7a9825e52d2182
[profile/ivi/rygel.git] / src / librygel-server / rygel-media-server.vala
1 /*
2  * Copyright (C) 2012 Openismus GmbH.
3  * Copyright (C) 2012 Intel Corporation.
4  *
5  * Author: Jens Georg <jensg@openismus.com>
6  *
7  * Rygel is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * Rygel is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21
22 internal class Plugin : Rygel.MediaServerPlugin {
23     public Plugin (Rygel.MediaContainer root_container) {
24         base (root_container, _("LibRygelServer"));
25     }
26 }
27
28 /**
29  * This class may be used to implement in-process UPnP-AV media servers.
30  *
31  * Call rygel_media_device_add_interface() on the RygelMediaServer to allow it
32  * to serve media via that network interface.
33  *
34  * See the standalone-server.c example.
35  */
36 public class Rygel.MediaServer : MediaDevice {
37
38     /**
39      * Create a MediaServer to serve the media in the RygelMediaContainer.
40      * For instance, you might use a RygelSimpleContainer. Alternatively,
41      * you might use your own RygelMediaContainer implementation.
42      *
43      * Assuming that the RygelMediaContainer is correctly implemented,
44      * the RygelMediaServer will respond appropriately to changes in the
45      * RygelMediaContainer. 
46      */
47     public MediaServer (string title, MediaContainer root_container) {
48         base ();
49         this.plugin = new global::Plugin (root_container);
50         this.plugin.title = title;
51     }
52 }