Ejemplo n.º 1
0
        public P2pProxyDevice(WebServer webServer, P2pProxyApp proxy) : base(webServer)
        {

            udn = Guid.NewGuid();
            friendlyName = "P2pProxy DLNA (" + Environment.MachineName + ")";
            deviceType = "urn:schemas-upnp-org:device:MediaServer:1";
            manufacturer = "BeGoodSoft";
            modelName = "P2pProxy DLNA Server";
            modelNumber = P2pProxyApp.Version;
            serialNumber = udn.ToString();
            modelUrl = "*****@*****.**";

            
            Web.AddRouteUrl("/login", LoginRequest, HttpMethod.Get);
            Web.AddRouteUrl("/stat", StatRequest, HttpMethod.Get);
            Web.AddRouteUrl("/clear_broadcast", ClearBroadcast, HttpMethod.Get);

            if (P2pProxyApp.MySettings.GetSetting("dlna", "enable", true))
            {
                Web.AddRouteUrl("/dlna/description.xml", SendDescription, HttpMethod.Get);
                Web.AddRouteUrl("/dlna/logo48.png", SendFile, HttpMethod.Get);
                services.Add(new ConnectionManagerService(server, this));
                services.Add(new ContentDirectoryService(server, this));
                services.Add(new MediaReceiverRegistrarService(server, this));
            }
            
            Proxy = proxy;
            Filter = new ContentFilter("root");
        }
Ejemplo n.º 2
0
        public P2pProxyDevice(WebServer webServer, P2pProxyApp proxy) : base(webServer)
        {
            udn          = Guid.NewGuid();
            friendlyName = "P2pProxy DLNA (" + Environment.MachineName + ")";
            deviceType   = "urn:schemas-upnp-org:device:MediaServer:1";
            manufacturer = "BeGoodSoft";
            modelName    = "P2pProxy DLNA Server";
            modelNumber  = P2pProxyApp.Version;
            serialNumber = udn.ToString();
            modelUrl     = "*****@*****.**";


            Web.AddRouteUrl("/login", LoginRequest, HttpMethod.Get);
            Web.AddRouteUrl("/stat", StatRequest, HttpMethod.Get);
            Web.AddRouteUrl("/clear_broadcast", ClearBroadcast, HttpMethod.Get);

            if (P2pProxyApp.MySettings.GetSetting("dlna", "enable", true))
            {
                Web.AddRouteUrl("/dlna/description.xml", SendDescription, HttpMethod.Get);
                Web.AddRouteUrl("/dlna/logo48.png", SendFile, HttpMethod.Get);
                services.Add(new ConnectionManagerService(server, this));
                services.Add(new ContentDirectoryService(server, this));
                services.Add(new MediaReceiverRegistrarService(server, this));
            }

            Proxy  = proxy;
            Filter = new ContentFilter("root");
        }
Ejemplo n.º 3
0
 public FormAbout(P2pProxyApp app, Auth state)
 {
     InitializeComponent();
     _app = app;
     labelVersion.Text = labelVersion.Text + Application.ProductVersion;
     labelUser.Text = labelUser.Text + state.Login;
     labelBalance.Text = labelBalance.Text + state.balance + "р.";
     textUdn.Text = _app.Device.Udn.ToString();
 }
Ejemplo n.º 4
0
 static void Main (string[] args)
 {
     //
     app = new P2pProxyApp(true, args.Contains("--debug"));
     app.Start();
     while (true)
     {
         System.Threading.Thread.Sleep(1000);
     }
     app.Notifyed -= AppOnNotifyed;
     app.Close();
 }
Ejemplo n.º 5
0
        public FormRecords(P2pProxyApp app)
        {
            InitializeComponent();
            this._app = app;
            Icon = Properties.Resources.recsystem;
            buttonAdd.BackgroundImage = Properties.Resources.addrec.ToBitmap();
            buttonDel.BackgroundImage = Properties.Resources.remrec.ToBitmap();
            btnOnRecord.Image = Properties.Resources.waitrec;
            btnPauseRecord.Image = Properties.Resources.pause;
            btnStartRecord.Image = Properties.Resources.record;
            btnStopRecord.Image = Properties.Resources.finished;
            AddRecToolStripMenuItem.Image = Properties.Resources.addrec.ToBitmap();
            delRecToolStripMenuItem.Image = Properties.Resources.remrec.ToBitmap();
            OnRecToolStripMenuItem.Image = Properties.Resources.waitrec;
            StopRecToolStripMenuItem.Image = Properties.Resources.finished;
            PauseRecToolStripMenuItem.Image = Properties.Resources.pause;
            StartRecToolStripMenuItem.Image = Properties.Resources.record;

            btnOnRecord.Text = "Включить";
            btnPauseRecord.Text = "Пауза";
            btnStartRecord.Text = "Запись";
            btnStopRecord.Text = "Остановить";
            AddRecToolStripMenuItem.Text = "Добавить";
            delRecToolStripMenuItem.Text = "Удалить";
            OnRecToolStripMenuItem.Text = "Включить";
            StopRecToolStripMenuItem.Text = "Остановить";
            PauseRecToolStripMenuItem.Text = "Пауза";
            StartRecToolStripMenuItem.Text = "Запись";

            ColStatus.HeaderText = "";
            ColName.HeaderText = "Имя";
            ColStartTime.HeaderText = "Начало";
            ColEndTime.HeaderText = "Конец";

            _rectm = new Timer { Interval = 1273, Enabled = true };
            _rectm.Tick += RectmOnTick;
            _rectm.Start();
        }
Ejemplo n.º 6
0
 public FormChannels(P2pProxyApp app)
 {
     _proxy = app;
     InitializeComponent();
 }
Ejemplo n.º 7
0
 public FormContentFilter(P2pProxyApp proxy)
 {
     this.proxy = proxy;
     InitializeComponent();
 }
Ejemplo n.º 8
0
 public FormOption(P2pProxyApp app)
 {
     InitializeComponent();
     _app = app;
     Icon = Icon.FromHandle(Properties.Resources.biglogo.GetHicon());
 }