]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Adapt to MSP library changes
[netvis.git] / source / netvis.h
index eb8c0a8e9d66fab276be8e6cd93687302a11db78..46b96a58a85d3779d00e80c5010d7af5ff9e5733 100644 (file)
@@ -13,19 +13,20 @@ Distributed unter the GPL
 #include <pcap.h>
 #include <msp/core/application.h>
 #include <msp/debug/profiler.h>
-#include <msp/gbase/display.h>
-#include <msp/gbase/glcontext.h>
-#include <msp/gbase/simplewindow.h>
+#include <msp/graphics/display.h>
+#include <msp/graphics/glcontext.h>
+#include <msp/graphics/simplewindow.h>
 #include <msp/gl/color.h>
 #include <msp/gl/font.h>
 #include <msp/time/timestamp.h>
 
+class History;
 class Host;
 class Packet;
 class Port;
 class Resolver;
 
-class NetVis: public Msp::Application
+class NetVis: public Msp::RegisteredApplication<NetVis>
 {
 private:
        std::string iface;
@@ -43,6 +44,7 @@ private:
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
        std::map<unsigned, Port *> ports;
+       History *history;
 
        Msp::Time::TimeStamp tick_t;
        Msp::Time::TimeStamp fps_t;
@@ -61,13 +63,12 @@ private:
        void render();
        Host &get_host(unsigned);
        Msp::GL::Color generate_color(bool) const;
-       const Port &get_port(unsigned);
+       Port &get_port(unsigned);
+       void create_history_texture();
 
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);
 
        void sighandler(int);
-
-       static Application::RegApp<NetVis> reg;
 };
 
 #endif