Exemple #1
0
 public BlockItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Title    = "Доступно только в полной версии";
     Id       = "block";
     ParentId = "0";
     _childItems.Add(this);
 }
Exemple #2
0
        public ItemRootContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
        {
            Title    = "Root";
            Id       = "0";
            ParentId = "0";
            _childItems.Add(new ChannelItemContainer(this, device));
            _childItems.Add(new ArchiveItemContainer(this, device));
            _childItems.Add(new RecordItemContainer(this, device));

            var plugs = _device.PluginProvider.GetPlugins();

            foreach (var plug in plugs)
            {
                try
                {
                    if (plug.GetContent(null) != null)
                    {
                        _childItems.Add(new PluginContainer(this, device, plug));
                    }
                }
                catch (Exception e)
                {
                    P2pProxyApp.Log.Write(e.Message, TypeMessage.Error);
                }
            }
        }
 public PluginContentProvider(P2pProxyDevice device)
 {
     _device = device;
     _plugins = new List<IPluginProxy>();
     LoadPlugins();
     InitPlugins();
     RoutePlugins();
 }
 public ArchiveContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl("/archive/", SendResponse, HttpMethod.Get);
     server.AddRouteUrl("/archive/play", Play, HttpMethod.Get);
     server.AddRouteUrl("/archive/play", SendHead, HttpMethod.Head);
     server.AddRouteUrl("/archive/channels", GetChannelsRequest, HttpMethod.Get);
     _device = device;
 }
 public PluginContentProvider(P2pProxyDevice device)
 {
     _device  = device;
     _plugins = new List <IPluginProxy>();
     LoadPlugins();
     InitPlugins();
     RoutePlugins();
 }
Exemple #6
0
 protected Item(ItemContainer parent, P2pProxyDevice device)
 {
     Title       = "Unknown";
     Id          = "0";
     ParentId    = "0";
     IconUrl     = null;
     this.parent = parent;
     _device     = device;
 }
 public ChannelContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl(PLAYLIST_PATH, SendResponse, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, Play, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, SendHead, HttpMethod.Head);
     server.AddRouteUrl(FAVOURITE_ADD, AddFavouriteRequest, HttpMethod.Get);
     server.AddRouteUrl(FAVOURITE_DEL, DelFavouriteRequest, HttpMethod.Get);
     _device = device;
 }
Exemple #8
0
 protected Item(ItemContainer parent, P2pProxyDevice device)
 {
     Title = "Unknown";
     Id = "0";
     ParentId = "0";
     IconUrl = null;
     this.parent = parent;
     _device = device;
 }
 public ArchiveContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl("/archive/", SendResponse, HttpMethod.Get);
     server.AddRouteUrl("/archive/play", Play, HttpMethod.Get);
     server.AddRouteUrl("/archive/play", SendHead, HttpMethod.Head);
     server.AddRouteUrl("/archive/channels", GetChannelsRequest, HttpMethod.Get);
     _device = device;
     
 }
Exemple #10
0
 public ArchiveItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Type        = MediaType.Video;
     _childItems = new List <Item>();
     IconUrl     = "";
     Id          = "archives";
     Title       = "Архив";
     ParentId    = parent.GetIds();
     this.parent = parent;
 }
Exemple #11
0
 public ChannelItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Type        = MediaType.Video;
     _childItems = new List <Item>();
     IconUrl     = "";
     Id          = "channels";
     Title       = "Каналы";
     ParentId    = parent.GetIds();
     this.parent = parent;
 }
 public RecordContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl(PLAYLIST_PATH, SendResponse, HttpMethod.Get);
     server.AddRouteUrl(ADD_PATH, AddRequest, HttpMethod.Get);
     server.AddRouteUrl(DEL_PATH, DelRequest, HttpMethod.Get);
     server.AddRouteUrl(STOP_PATH, StopRequest, HttpMethod.Get);
     server.AddRouteUrl(API_PATH, AllRequest, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, Play, HttpMethod.Get);
     _device = device;
 }
 public RecordContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl(PLAYLIST_PATH, SendResponse, HttpMethod.Get);
     server.AddRouteUrl(ADD_PATH, AddRequest, HttpMethod.Get);
     server.AddRouteUrl(DEL_PATH, DelRequest, HttpMethod.Get);
     server.AddRouteUrl(STOP_PATH, StopRequest, HttpMethod.Get);
     server.AddRouteUrl(API_PATH, AllRequest, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, Play, HttpMethod.Get);
     _device = device;
 }
 public ChannelContentProvider(WebServer server, P2pProxyDevice device)
 {
     server.AddRouteUrl(PLAYLIST_PATH, SendResponse, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, Play, HttpMethod.Get);
     server.AddRouteUrl(PLAY_PATH, SendHead, HttpMethod.Head);
     server.AddRouteUrl(FAVOURITE_ADD, AddFavouriteRequest, HttpMethod.Get);
     server.AddRouteUrl(FAVOURITE_DEL, DelFavouriteRequest, HttpMethod.Get);
     _device = device;
     
 }
Exemple #15
0
 public PluginContainer(ItemContainer parent, P2pProxyDevice device, IPluginProxy plugin) : base(parent, device)
 {
     _plugin = plugin;
     Id      = _plugin.Id;
     Title   = _plugin.Name;
     if (parent != null)
     {
         ParentId = parent.GetIds();
     }
     Type = MediaType.Video;
 }
 public EpgContentProvider(P2pProxyDevice device)
 {
     _device = device;
     _device.Web.AddRouteUrl("/epg/", SendResponse, HttpMethod.Get);
 }
Exemple #17
0
 public ItemManager(P2pProxyDevice TVProxyDevice)
 {
     this.P2pProxyDevice = P2pProxyDevice;
     _rootItems          = new ItemRootContainer(null, TVProxyDevice);
 }
Exemple #18
0
 public ItemStream(ItemContainer parent, MediaType type, P2pProxyDevice device, string file_ext = ".m2ts") : base(parent, device)
 {
     Type = type;
     _info = device.UpnpSettings.Profile.Live.Info.FirstOrDefault(info => info.FileExt.Equals(file_ext, StringComparison.OrdinalIgnoreCase)) ??
             device.UpnpSettings.Profile.Live.Info[0];
 }
Exemple #19
0
 public ItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     _childItems = new List<Item>();
 }
Exemple #20
0
 public PluginContainer(ItemContainer parent, P2pProxyDevice device, IPluginProxy plugin) : base(parent, device)
 {
     _plugin = plugin;
     Id = _plugin.Id;
     Title = _plugin.Name;
     if (parent != null)
         ParentId = parent.GetIds();
     Type = MediaType.Video;
 }
Exemple #21
0
 public ArchiveItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Type = MediaType.Video;
     _childItems = new List<Item>();
     IconUrl = "";
     Id = "archives";
     Title = "Архив";
     ParentId = parent.GetIds();
     this.parent = parent;
     
 }
Exemple #22
0
 public BlockItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Title = "Доступно только в полной версии";
     Id = "block";
     ParentId = "0";
     _childItems.Add(this);
 }
Exemple #23
0
        public ItemRootContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
        {
            Title = "Root";
            Id = "0";
            ParentId = "0";
            _childItems.Add(new ChannelItemContainer(this, device));
            _childItems.Add(new ArchiveItemContainer(this, device));
            _childItems.Add(new RecordItemContainer(this, device));

            var plugs = _device.PluginProvider.GetPlugins();
            foreach (var plug in plugs)
            {
                try
                {
                    if (plug.GetContent(null) != null)
                        _childItems.Add(new PluginContainer(this, device, plug));
                }
                catch (Exception e)
                {
                    P2pProxyApp.Log.Write(e.Message, TypeMessage.Error);
                }
            }
        }
Exemple #24
0
 public RecordItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Id    = "records";
     Title = "Локальные записи";
     Type  = MediaType.Video;
 }
Exemple #25
0
 public ChannelItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Type = MediaType.Video;
     _childItems = new List<Item>();
     IconUrl = "";
     Id = "channels";
     Title = "Каналы";
     ParentId = parent.GetIds();
     this.parent = parent;
 }
Exemple #26
0
 public ItemManager(P2pProxyDevice TVProxyDevice)
 {
     this.P2pProxyDevice = P2pProxyDevice;
     _rootItems = new ItemRootContainer(null, TVProxyDevice);
 }
 public EpgContentProvider(P2pProxyDevice device)
 {
     _device = device;
     _device.Web.AddRouteUrl("/epg/", SendResponse, HttpMethod.Get);
 }
Exemple #28
0
 public RecordItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     Id = "records";
     Title = "Локальные записи";
     Type = MediaType.Video;
 }
Exemple #29
0
 public ItemStream(ItemContainer parent, MediaType type, P2pProxyDevice device, string file_ext = ".m2ts") : base(parent, device)
 {
     Type  = type;
     _info = device.UpnpSettings.Profile.Live.Info.FirstOrDefault(info => info.FileExt.Equals(file_ext, StringComparison.OrdinalIgnoreCase)) ??
             device.UpnpSettings.Profile.Live.Info[0];
 }
Exemple #30
0
 public ItemContainer(ItemContainer parent, P2pProxyDevice device) : base(parent, device)
 {
     _childItems = new List <Item>();
 }