Remove mysterious unused main/enigma-*.cpp files
authorMike Looijmans <milo-software@users.sourceforge.net>
Mon, 26 Oct 2015 18:25:38 +0000 (19:25 +0100)
committerMike Looijmans <milo-software@users.sourceforge.net>
Mon, 26 Oct 2015 18:25:38 +0000 (19:25 +0100)
No idea what purpose they serve, and some of them won't even compile (missing quotes).
Just remove them.

main/Makefile.am
main/enigma-dvbtest.cpp [deleted file]
main/enigma-gdi.cpp [deleted file]
main/enigma-gui.cpp [deleted file]
main/enigma-playlist.cpp [deleted file]
main/enigma-scan.cpp [deleted file]

index 8d9923b..eb0cf36 100644 (file)
@@ -19,13 +19,6 @@ enigma2_SOURCES = \
        version_info.h \
        version.h
 
-EXTRA_DIST = \
-       enigma-dvbtest.cpp \
-       enigma-gdi.cpp \
-       enigma-gui.cpp \
-       enigma-playlist.cpp \
-       enigma-scan.cpp
-
 enigma2_LDADD_WHOLE = \
        $(top_builddir)/lib/actions/libenigma_actions.a \
        $(top_builddir)/lib/base/libenigma_base.a \
diff --git a/main/enigma-dvbtest.cpp b/main/enigma-dvbtest.cpp
deleted file mode 100644 (file)
index 592f5a7..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-#include <stdio.h>
-#include <libsig_comp.h>
-#include <lib/base/ebase.h>
-#include <lib/base/eerror.h>
-
-#include <lib/dvb/dvb.h>
-#include <lib/dvb/db.h>
-#include <lib/dvb/isection.h>
-#include <lib/dvb/esection.h>
-#include <dvbsi++/program_map_section.h>
-#include <lib/dvb/specs.h>
-#include <unistd.h>
-
-class eMain: public eApplication, public Object
-{
-       ePtr<eDVBResourceManager> m_mgr;
-       ePtr<iDVBChannel> m_channel;
-       ePtr<iDVBDemux> m_demux;
-       eAUTable<eTable<ProgramMapSection> > m_table;
-
-       ePtr<eDVBDB> m_dvbdb;
-
-       ePtr<eConnection> m_state_change_connection;
-       int m_last_channel_state;
-public:
-       eMain()
-       {
-               eDebug("[eMain dvbtest] eMain");
-
-                       /* Resourcemanager erstellen */
-               m_mgr = new eDVBResourceManager();
-
-               /* Dummy DVB-Channellist anlegen.. */
-
-                       /* Datenbank erstellen */
-               m_dvbdb = new eDVBDB();
-                       /* als Primary datenbank setzen */
-               m_mgr->setChannelList(m_dvbdb);
-
-                       /* testtransponder adden */
-               eDVBChannelID chid(1,2,3);
-
-                       /* frontenddaten... */
-               eDVBFrontendParametersSatellite fesat;
-
-               fesat.frequency = 12070000;
-               fesat.symbol_rate = 27500000;
-               fesat.polarisation = eDVBFrontendParametersSatellite::Polarisation_Horizontal;
-               fesat.fec = eDVBFrontendParametersSatellite::FEC_3_4;
-               fesat.inversion = eDVBFrontendParametersSatellite::Inversion_Off;
-               fesat.orbital_position = 192;
-
-               eDVBFrontendParameters *fe = new eDVBFrontendParameters();
-
-               fe->setDVBS(fesat);
-                       /* Zur Kanalliste hinzufuegen.. */
-               m_dvbdb->addChannelToList(chid, fe);
-
-                       /* Channel allokieren... tunen startet hier, sofern noetig */
-               if (m_mgr->allocateChannel(chid, m_channel))
-                       eDebug("[eMain dvbtest] shit it failed!");
-
-               if (m_channel)
-               {
-                               /* Auf State-Change listenen */
-                       m_channel->connectStateChange(slot(*this, &eMain::channelStateChanged), m_state_change_connection);
-                               /* Initial provozieren */
-                       channelStateChanged(m_channel);
-               }
-       }
-
-       void channelStateChanged(iDVBChannel *channel)
-       {
-               int state;
-                       /* Channelstate holen */
-               channel->getState(state);
-               eDebug("[eMain dvbtest] channel state is now %d", state);
-
-                       /* Wenn Wechsel von nicht-ok auf ok (das erste mal) */
-               if ((m_last_channel_state != iDVBChannel::state_ok)
-                        && (state == iDVBChannel::state_ok) && (!m_demux))
-               {
-                       eDebug("[eMain dvbtest] we'll start tuning!");
-                               /* Demux holen */
-                       if (m_channel)
-                               if (m_channel->getDemux(m_demux))
-                                       eDebug("[eMain dvbtest] shit it failed.. again.");
-
-                       if (m_demux)
-                       {
-                                       /* auf table ready connecten */
-                               CONNECT(m_table.tableReady, eMain::tableReady);
-                                       /* und section lesen beginnen */
-                               m_table.begin(this, eDVBPMTSpec(0x20, 0x33f6), m_demux);
-                       }
-               }
-
-               m_last_channel_state = state;
-       }
-
-       void tableReady(int)
-       {
-                       /* table "fertig" (wie auch immer) */
-               ePtr<eTable<ProgramMapSection> > ptr;
-                               /* erfolgreich? */
-               if (!m_table.getCurrent(ptr))
-               {
-                               /* dumpen ... */
-                       ProgramMapSectionConstIterator i;
-                       for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i)
-                       {
-                               const ProgramMapSection &pmt = **i;
-                               eDebug("[eMain dvbtest] pcr pid: %x", pmt.getPcrPid());
-                       }
-                       eDebug("[eMain dvbtest] program map ...");
-                               /* und raus */
-                       quit(0);
-               }
-               eDebug("[eMain dvbtest] table ready.");
-       }
-
-       ~eMain()
-       {
-               eDebug("[eMain dvbtest] ... done.");
-       }
-};
-
-#ifdef OBJECT_DEBUG
-int object_total_remaining;
-
-void object_dump()
-{
-       printf("%d items left\n", object_total_remaining);
-}
-#endif
-
-int main()
-{
-#ifdef OBJECT_DEBUG
-       atexit(object_dump);
-#endif
-       eMain app;
-       return app.exec();
-}
diff --git a/main/enigma-gdi.cpp b/main/enigma-gdi.cpp
deleted file mode 100644 (file)
index ef9a3d1..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#include <stdio.h>
-#include <libsig_comp.h>
-#include <lib/base/ebase.h>
-#include <lib/base/eenv.h>
-#include <lib/base/eerror.h>
-#include <lib/base/init.h>
-#include <lib/base/init_num.h>
-
-#include <unistd.h>
-
-#include <lib/gdi/grc.h>
-#include <lib/gdi/gmaindc.h>
-#include <lib/gdi/font.h>
-
-#include <lib/gui/ewidget.h>
-#include <lib/gui/ewidgetdesktop.h>
-#include <lib/gui/elabel.h>
-
-#ifdef OBJECT_DEBUG
-int object_total_remaining;
-
-void object_dump()
-{
-       printf("%d items left\n", object_total_remaining);
-}
-#endif
-
-void dumpRegion(const gRegion &region)
-{
-       fprintf(stderr, "extends: %d %d -> %d %d\n",
-               region.extends.left(), region.extends.top(),
-               region.extends.right(), region.extends.bottom());
-       for (int y=0; y<region.extends.bottom(); ++y)
-       {
-               for (int x=0; x<region.extends.right(); ++x)
-               {
-                       unsigned char res = ' ';
-                       for (unsigned int i=0; i < region.rects.size(); ++i)
-                               if (region.rects[i].contains(ePoint(x, y)))
-                                       res = '0' + i;
-                       fprintf(stderr, "%c", res);
-               }
-               fprintf(stderr, "\n");
-       }
-}
-
-int main()
-{
-#ifdef OBJECT_DEBUG
-       atexit(object_dump);
-#endif
-
-       eInit init;
-
-       init.setRunlevel(eAutoInitNumbers::main);
-       ePtr<gMainDC> my_dc;
-       gMainDC::getInstance(my_dc);
-
-       gPainter p(my_dc);
-
-       gRGB pal[256];
-       pal[0] = 0;
-       pal[1] = 0xff00ff;
-       pal[2] = 0xffFFff;
-       pal[3] = 0x00ff00;
-
-       for (int a=0; a<0x10; ++a)
-               pal[a | 0x10] = (0x111111 * a) | 0xFF;
-       p.setPalette(pal, 0, 256);
-
-       fontRenderClass::getInstance()->AddFont(eEnv::resolve("${datadir}/fonts/arial.ttf"), "Regular", 100);
-
-       p.resetClip(gRegion(eRect(0, 0, 720, 576)));
-
-
-       gRegion c;
-       eDebug("[MAIN gdi] 0");
-       int i;
-
-       c |= eRect(0, 20, 100, 10);
-       c |= eRect(0, 50, 100, 10);
-       c |= eRect(10, 10, 80, 100);
-
-       c -= eRect(20, 20, 40, 40);
-
-       p.setForegroundColor(gColor(3));
-       p.fill(eRect(0, 0, 100, 100));
-       p.fill(eRect(200, 0, 100, 100));
-
-       for (int a=0; a<c.rects.size(); ++a)
-               eDebug("[MAIN gdi] %d %d -> %d %d", c.rects[a].left(), c.rects[a].top(), c.rects[a].right(), c.rects[a].bottom());
-       eDebug("[MAIN gdi] extends: %d %d %d %d", c.extends.left(), c.extends.top(), c.extends.right(), c.extends.bottom());
-       p.setOffset(ePoint(100, 100));
-       p.clip(c);
-
-       p.setBackgroundColor(gColor(1));
-       p.clear();
-       p.setForegroundColor(gColor(2));
-       p.line(ePoint(0, 0), ePoint(220, 190));
-       p.clippop();
-
-       p.setBackgroundColor(gColor(0x1f));
-       p.setForegroundColor(gColor(0x10));
-
-       ePtr<gFont> fnt = new gFont("Regular", 70);
-       p.setFont(fnt);
-       p.renderText(eRect(100, 100, 500, 200), "Hello World!");
-
-       sleep(1);
-       return 0;
-}
diff --git a/main/enigma-gui.cpp b/main/enigma-gui.cpp
deleted file mode 100644 (file)
index a8a9061..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#include <stdio.h>
-#include <libsig_comp.h>
-#include <lib/base/ebase.h>
-#include <lib/base/eerror.h>
-#include <lib/base/init.h>
-#include <lib/base/init_num.h>
-
-#include <unistd.h>
-
-#include <lib/gdi/grc.h>
-#include <lib/gdi/gmaindc.h>
-#include <lib/gdi/font.h>
-
-#include <lib/gui/ewidget.h>
-#include <lib/gui/ewidgetdesktop.h>
-#include <lib/gui/elabel.h>
-
-#ifdef OBJECT_DEBUG
-int object_total_remaining;
-
-void object_dump()
-{
-       printf("%d items left\n", object_total_remaining);
-}
-#endif
-
-void dumpRegion(const gRegion &region)
-{
-       fprintf(stderr, "extends: %d %d -> %d %d\n",
-               region.extends.left(), region.extends.top(),
-               region.extends.right(), region.extends.bottom());
-       for (int y=0; y<region.extends.bottom(); ++y)
-       {
-               for (int x=0; x<region.extends.right(); ++x)
-               {
-                       unsigned char res = ' ';
-                       for (unsigned int i=0; i < region.rects.size(); ++i)
-                               if (region.rects[i].contains(ePoint(x, y)))
-                                       res = '0' + i;
-                       fprintf(stderr, "%c", res);
-               }
-               fprintf(stderr, "\n");
-       }
-}
-
-int main()
-{
-#ifdef OBJECT_DEBUG
-       atexit(object_dump);
-#endif
-
-       eInit init;
-
-       init.setRunlevel(eAutoInitNumbers::main);
-       ePtr<gMainDC> my_dc;
-       gMainDC::getInstance(my_dc);
-
-       gPainter p(my_dc);
-
-       gRGB pal[256];
-       pal[0] = 0;
-       pal[1] = 0xff00ff;
-       pal[2] = 0xffFFff;
-       pal[3] = 0x00ff00;
-
-       for (int a=0; a<0x10; ++a)
-               pal[a | 0x10] = (0x111111 * a) | 0xFF;
-       p.setPalette(pal, 0, 256);
-
-       fontRenderClass::getInstance()->AddFont(eEnv::resolve("${datadir}/fonts/arial.ttf"), "Regular", 100);
-
-       eWidgetDesktop dsk(eSize(720, 576));
-       dsk.setDC(my_dc);
-
-       eWidget *bla = new eWidget(0);
-       dsk.addRootWidget(bla, 0);
-
-       bla->move(ePoint(100, 100));
-       bla->resize(eSize(200, 200));
-       bla->show();
-
-       eWidget *blablub = new eLabel(bla);
-       blablub->move(ePoint(40, 40));
-       blablub->resize(eSize(100, 100));
-
-       eWidget *bla2 = new eWidget(0);
-       dsk.addRootWidget(bla2, 0);
-
-       bla2->move(ePoint(160, 160));
-       bla2->resize(eSize(200, 200));
-       bla2->show();
-
-       dsk.recalcClipRegions();
-
-       dumpRegion(bla->m_visible_region);
-//     dumpRegion(bla2->m_visible_region);
-//     dumpRegion(blablub->m_visible_region);
-
-       eDebug([pMAIN gui] painting!");
-
-       dsk.invalidate(gRegion(eRect(0, 0, 720, 576)));
-       dsk.paint();
-
-       sleep(1);
-       return 0;
-}
diff --git a/main/enigma-playlist.cpp b/main/enigma-playlist.cpp
deleted file mode 100644 (file)
index cfdc4d0..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#include <stdio.h>
-#include <libsig_comp.h>
-#include <lib/base/ebase.h>
-#include <lib/base/eerror.h>
-#include <lib/base/init.h>
-#include <lib/base/init_num.h>
-
-#include <lib/dvb/dvb.h>
-#include <lib/dvb/db.h>
-#include <lib/dvb/isection.h>
-#include <lib/dvb/esection.h>
-#include <dvbsi++/program_map_section.h>
-#include <lib/dvb/scan.h>
-#include <unistd.h>
-
-#include <lib/service/iservice.h>
-#include <lib/nav/core.h>
-
-class eMain: public eApplication, public Object
-{
-       eInit init;
-
-       ePtr<eDVBResourceManager> m_mgr;
-       ePtr<iDVBChannel> m_channel;
-       ePtr<eDVBDB> m_dvbdb;
-
-       ePtr<iPlayableService> m_playservice;
-       ePtr<eNavigation> m_nav;
-       ePtr<eConnection> m_conn_event;
-       ePtr<iServiceInformation> m_serviceInformation;
-public:
-       eMain()
-       {
-               init.setRunlevel(eAutoInitNumbers::main);
-               m_dvbdb = new eDVBDB();
-               m_mgr = new eDVBResourceManager();
-               m_mgr->setChannelList(m_dvbdb);
-
-               ePtr<eServiceCenter> service_center;
-               eServiceCenter::getInstance(service_center);
-
-               assert(service_center);
-               m_nav = new eNavigation(service_center);
-#if 0
-               if (service_center)
-               {
-                       eServiceReference ref("2:0:1:0:0:0:0:0:0:0:/");
-                       ePtr<iListableService> lst;
-                       if (service_center->list(ref, lst))
-                               eDebug("[eMain playlist] no list available!");
-                       else
-                       {
-                               std::list<eServiceReference> list;
-                               if (lst->getContent(list))
-                                       eDebug("[eMain playlist] list itself SUCKED AROUND!!!");
-                               else
-                                       for (std::list<eServiceReference>::const_iterator i(list.begin());
-                                               i != list.end(); ++i)
-                                               eDebug("[eMain playlist] %s", i->toString().c_str());
-                       }
-               }
-#endif
-               m_nav->connectEvent(slot(*this, &eMain::event), m_conn_event);
-
-//             eServiceReference ref("1:0:1:6de2:44d:1:c00000:0:0:0:");
-               eServiceReference ref("4097:47:0:0:0:0:0:0:0:0:/sine_60s_100.mp3");
-               eServiceReference ref1("4097:47:0:0:0:0:0:0:0:0:/sine_60s_100.mp31");
-               eServiceReference ref2("4097:47:0:0:0:0:0:0:0:0:/sine_60s_100.mp32");
-
-               if (m_nav->enqueueService(ref))
-                       eDebug("[eMain playlist] play sucked around!");
-               else
-                       eDebug("[eMain playlist] play r00lz!");
-
-               m_nav->enqueueService(ref1);
-               m_nav->enqueueService(ref2);
-               m_nav->enqueueService(ref1);
-       }
-
-       void event(eNavigation *nav, int ev)
-       {
-               assert(nav);
-
-               ePtr<ePlaylist> playlist;
-               nav->getPlaylist(playlist);
-               if (playlist)
-               {
-                       eDebug("[eMain playlist] PLAYLIST:");
-                       ePlaylist::iterator i;
-                       for (i=playlist->begin(); i != playlist->end(); ++i)
-                               eDebug("[eMain playlist] %s %s", i == playlist->m_current ? "-->" : "   ", i->toString().c_str());
-               }
-
-               switch (ev)
-               {
-               case eNavigation::evStopService:
-                               /* very important: the old service should be deallocated, so clear *all* references to it */
-                       m_serviceInformation = 0;
-                       eDebug("[eMain playlist] STOP service!");
-                       break;
-               case eNavigation::evNewService:
-               {
-                       ePtr<iPlayableService> service;
-                       nav->getCurrentService(service);
-                       if (!service)
-                       {
-                               eDebug("[eMain playlist] no running service!");
-                               break;
-                       }
-                       if (service->getIServiceInformation(m_serviceInformation))
-                       {
-                               eDebug("[eMain playlist] failed to get iserviceinformation");
-                               break;
-                       }
-                       std::string name;
-                       m_serviceInformation->getName(name);
-                       eDebug("[eMain playlist] NEW running service: %s", name.c_str());
-                       break;
-               }
-               case eNavigation::evPlayFailed:
-                       eDebug("[eMain playlist] play failed!");
-                       break;
-               case eNavigation::evPlaylistDone:
-                       eDebug("[eMain playlist] playlist done");
-                       quit();
-                       break;
-               default:
-                       eDebug("[eMain playlist] Navigation event %d", ev);
-                       break;
-               }
-       }
-
-       ~eMain()
-       {
-       }
-};
-
-#ifdef OBJECT_DEBUG
-int object_total_remaining;
-
-void object_dump()
-{
-       printf("%d items left\n", object_total_remaining);
-}
-#endif
-
-int main()
-{
-#ifdef OBJECT_DEBUG
-       atexit(object_dump);
-#endif
-
-       eMain app;
-       int res = app.exec();
-       eDebug("[MAIN playlist] after exec");
-       return res;
-}
-
diff --git a/main/enigma-scan.cpp b/main/enigma-scan.cpp
deleted file mode 100644 (file)
index 286547d..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#include <stdio.h>
-#include <libsig_comp.h>
-#include <lib/base/ebase.h>
-#include <lib/base/eerror.h>
-#include <lib/base/init.h>
-#include <lib/base/init_num.h>
-
-#include <lib/dvb/dvb.h>
-#include <lib/dvb/db.h>
-#include <lib/dvb/isection.h>
-#include <lib/dvb/esection.h>
-#include <dvbsi++/program_map_section.h>
-#include <lib/dvb/scan.h>
-#include <unistd.h>
-
-class eMain: public eApplication, public Object
-{
-       eInit init;
-
-       eDVBScan *m_scan;
-
-       ePtr<eDVBResourceManager> m_mgr;
-       ePtr<iDVBChannel> m_channel;
-       ePtr<eDVBDB> m_dvbdb;
-
-       void scanEvent(int evt)
-       {
-               eDebug("[eMain scan] scan event %d!", evt);
-               if (evt == eDVBScan::evtFinish)
-               {
-                       m_scan->insertInto(m_dvbdb);
-                       quit(0);
-               }
-       }
-       ePtr<eConnection> m_scan_event_connection;
-public:
-       eMain()
-       {
-               m_dvbdb = new eDVBDB();
-               m_mgr = new eDVBResourceManager();
-
-               eDVBFrontendParametersSatellite fesat;
-
-               fesat.frequency = 11817000; // 12070000;
-               fesat.symbol_rate = 27500000;
-               fesat.polarisation = eDVBFrontendParametersSatellite::Polarisation_Vertical;
-               fesat.fec = eDVBFrontendParametersSatellite::FEC_3_4;
-               fesat.inversion = eDVBFrontendParametersSatellite::Inversion_Off;
-               fesat.orbital_position = 192;
-
-               eDVBFrontendParameters *fe = new eDVBFrontendParameters();
-
-               fe->setDVBS(fesat);
-
-               if (m_mgr->allocateRawChannel(m_channel))
-                       eDebug("[eMain scan] shit it failed!");
-
-//             init.setRunlevel(eAutoInitNumbers::main);
-               eDebug("[eMain scan] starting scan...");
-
-               std::list<ePtr<iDVBFrontendParameters> > list;
-
-               list.push_back(fe);
-
-               m_scan = new eDVBScan(m_channel);
-               m_scan->start(list);
-
-               m_scan->connectEvent(slot(*this, &eMain::scanEvent), m_scan_event_connection);
-       }
-
-       ~eMain()
-       {
-               delete m_scan;
-               eDebug("[eMain scan] done.");
-       }
-};
-
-#ifdef OBJECT_DEBUG
-int object_total_remaining;
-
-void object_dump()
-{
-       printf("%d items left\n", object_total_remaining);
-}
-#endif
-
-int main()
-{
-#ifdef OBJECT_DEBUG
-       atexit(object_dump);
-#endif
-       eMain app;
-       return app.exec();
-}