]> git.vomp.tv Git - vompclient.git/commitdiff
Two Windows compilation fixes, remove vremoteconfig class
authorChris Tallon <chris@vomp.tv>
Wed, 23 Oct 2019 16:42:38 +0000 (17:42 +0100)
committerChris Tallon <chris@vomp.tv>
Wed, 23 Oct 2019 16:42:38 +0000 (17:42 +0100)
tcp.cc
vdp6.cc
vremoteconfig.cc [deleted file]
vremoteconfig.h [deleted file]

diff --git a/tcp.cc b/tcp.cc
index fb66acede27f00aae5ace23799f6f4c9940d4023..f5c8e5b75a1981795bb08f4f75087be5ea764120 100644 (file)
--- a/tcp.cc
+++ b/tcp.cc
     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
 
+#ifdef WIN32
+#include <Iphlpapi.h>
+#else
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
-
-#ifdef WIN32
-#include <Iphlpapi.h>
 #endif
 
 #include "log.h"
diff --git a/vdp6.cc b/vdp6.cc
index 69d70d39da044876a16326f0d2f30d815e44a9b2..5fb4daa641a103c11c00b9fda2e93ee9670bf272 100644 (file)
--- a/vdp6.cc
+++ b/vdp6.cc
@@ -17,6 +17,8 @@
     along with VOMP.  If not, see <https://www.gnu.org/licenses/>.
 */
 
+#if IPV6
+
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
@@ -33,8 +35,6 @@
 #include "log.h"
 #include "vdp6.h"
 
-#if IPV6
-
 VDP6::VDP6()
 {
 }
diff --git a/vremoteconfig.cc b/vremoteconfig.cc
deleted file mode 100644 (file)
index 8630e6a..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
-    Copyright 2004-2007 Chris Tallon, Marten Richter
-
-    This file is part of VOMP.
-
-    VOMP is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    VOMP is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with VOMP; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*/
-
-#include "vremoteconfig.h"
-
-#include "remote.h"
-#include "wsymbol.h"
-#include "viewman.h"
-#include "vdr.h"
-#include "colour.h"
-#include "video.h"
-#include "i18n.h"
-#include "command.h"
-#include "message.h"
-
-VRemoteConfig::VRemoteConfig(void* tparent)
-{
-  parent = tparent;
-  viewman = ViewMan::getInstance();
-  remote = Remote::getInstance();
-  learnmode = false;
-
-  create(530, 320);
-  if (Video::getInstance()->getFormat() == Video::PAL)
-  {
-    setScreenPos(80, 70);
-  }
-  else
-  {
-    setScreenPos(70, 35);
-  }
-
-  setBackgroundColour(Colour::VIEWBACKGROUND);
-  setTitleBarOn(1);
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
-  setTitleText(tr("Remote control"));
-
-  
-  initSelectList(true);
-  sl.setShowSelOption(false);
-  
-
-
-}
-
-VRemoteConfig::~VRemoteConfig()
-{
-  
-}
-
-void VRemoteConfig::initSelectList(bool startup)
-{
-    ULONG selection=0;
-    ULONG top=0;
-    if (!startup)
-    {
-        selection=sl.getCurrentOption();
-        top=sl.getTopOption();
-        
-    }
-//    sl.setSurface(surface);
-//    sl.setSurfaceOffset(10,  40);
-//    sl.setDimensions(area.w - 20, area.h - 30 - 15 -30 );
-    sl.clear();
-    sl.addColumn(0);
-    sl.addColumn(150);
-    sl.addColumn(300);
-    ULONG i;
-    for (i = 0; i < 256;i++)
-    {
-      const char * name = remote->CommandDesc((UCHAR)i);
-      if (name != NULL)
-      {
-          char *line = remote->CommandTranslateStr((UCHAR)i);
-      //    char * desc=new char [strlen(line)+1];    // CJT memory leak and unneccessary?
-      //    strcpy(desc,line);
-          sl.addOption(line,i,0);
-      }
-    }
-    if (!startup)
-    {
-        sl.hintSetCurrent(selection);
-        sl.hintSetTop(top);
-    }
-}
-
-
-void VRemoteConfig::draw()
-{
-  View::draw();
-  
-  drawText(tr("Command"), 15, 15, Colour::LIGHTTEXT);
-  drawText(tr("Hard wired"), 165, 15, Colour::LIGHTTEXT);
-  drawText(tr("User assignable"), 315, 15, Colour::LIGHTTEXT);
-  sl.draw();
-  if (learnmode)
-  {
-      drawText(tr("Learning! Press any hardwired key to exit."), 15, area.h - 30, Colour::SELECTHIGHLIGHT);
-  }
-  else
-  {
-      drawText(tr("Press [ok] for learning or MENU to reset to defaults."), 15, area.h - 30, Colour::LIGHTTEXT);
-  }
-
-  
-
-  
-}
-
-
-void VRemoteConfig::processMessage(Message* m)
-{
-  Log::getInstance()->log("VRecordingList", Log::DEBUG, "Got message value %lu", m->message);
-
-  if (m->message == Message::MOUSE_MOVE)
-  {
-    if (sl.mouseMove((m->parameter>>16)-getScreenX(),(m->parameter&0xFFFF)-getScreenY()))
-    {
-      sl.setShowSelOption(true);
-      sl.draw();
-      viewman->updateView(this);
-    }
-  }
-  else if (m->message == Message::MOUSE_LBDOWN)
-  {
-    if (sl.mouseLBDOWN((m->parameter>>16)-getScreenX(),(m->parameter&0xFFFF)-getScreenY()))
-    {
-      ViewMan::getInstance()->handleCommand(Remote::OK); //simulate OK press
-    }
-    else
-    {
-      //check if press is outside this view! then simulate cancel
-      int x=(m->parameter>>16)-getScreenX();
-      int y=(m->parameter&0xFFFF)-getScreenY();
-      if (x<0 || y <0 || x>getWidth() || y>getHeight())
-      {
-        ViewMan::getInstance()->handleCommand(Remote::BACK); //simulate cancel press
-      }
-    }
-  }
-}
-
-void VRemoteConfig::doSave()
-{
-  Message* m = new Message();
-  m->message = Message::CHANGED_REMOTECONTROL;
-  m->to = parent;
-  m->parameter = 0;
-  Command::getInstance()->postMessageNoLock(m);
-}
-
-int VRemoteConfig::handleCommand(int command)
-{
-  if (learnmode)
-  {
-    learnmode = false;
-    if (command == Remote::NA_LEARN)
-    {
-      initSelectList(false);
-    }
-    draw();
-    viewman->updateView(this);
-    return 2;
-  }
-  switch(command)
-  {
-    case Remote::DF_UP:
-    case Remote::UP:
-    {
-      if (sl.getCurrentOption() != 0)
-      {
-        sl.up();
-        sl.setShowSelOption(true);
-        draw();
-        viewman->updateView(this);
-        return 2;
-      }
-      else
-      {
-        sl.setShowSelOption(false);
-        return 0; //Control to tab control
-      }
-    }
-    case Remote::DF_DOWN:
-    case Remote::DOWN:
-    {
-      sl.down();
-      sl.setShowSelOption(true);
-      draw();
-      viewman->updateView(this);
-      return 2;
-    }
-    case Remote::SKIPBACK:
-    {
-      sl.pageUp();
-      sl.draw();
-
-      
-      viewman->updateView(this);
-      return 2;
-    }
-    case Remote::SKIPFORWARD:
-    {
-      sl.pageDown();
-      sl.draw();
-
-      
-      viewman->updateView(this);
-      return 2;
-    }
-    case Remote::OK:
-    {
-      learnmode = true;
-      draw();
-      remote->EnterLearningMode(sl.getCurrentOptionData());
-      viewman->updateView(this);
-      return 2;
-    }
-    case Remote::BACK:
-    {
-      doSave();
-
-      // Instead of returning 4 here which would delete this view
-      // before the doSave message is processed, let the message queue
-      // do the doSave then this close message. That will make the options menu
-      // disappear before this view
-
-      Message* m = new Message();
-      m->message = Message::CLOSE_ME;
-      m->from = this;
-      m->to = viewman;
-      Command::getInstance()->postMessageNoLock(m);
-      return 2;
-      
-    }
-    case Remote::MENU:
-        {
-            remote->ResetToDefault();
-            initSelectList(false);
-            draw();
-            viewman->updateView(this);
-            return 2;
-        }
-
-    
-  }
-  // stop command getting to any more views
-  return 1;
-}
-
-
diff --git a/vremoteconfig.h b/vremoteconfig.h
deleted file mode 100644 (file)
index 9c9cc80..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-    Copyright 2004-2005 Chris Tallon
-
-    This file is part of VOMP.
-
-    VOMP is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    VOMP is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with VOMP; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*/
-
-#ifndef VREMOTECONFIG_H
-#define VREMOTECONFIG_H
-
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <vector>
-#include <stack>
-
-#include "view.h"
-#include "wselectlist.h"
-
-class Remote;
-class Message;
-
-class VRemoteConfig : public View
-{
-  public:
-    VRemoteConfig (void* tparent);
-    ~VRemoteConfig ();
-
-    int handleCommand(int command);
-    void processMessage(Message* m);
-    void draw();
-    
-
-  private:
-      WSelectList sl;
-      Remote *remote;
-      bool learnmode;
-      void initSelectList(bool startup);
-      void doSave();
-      void* parent;
-   
-};
-
-#endif
-