add include directory
diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index 9dac70b..0163df9 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -13,6 +13,11 @@
m_nick = "Tester";
m_chatroom = "Test";
+ DigestTreeScene *scene = new DigestTreeScene();
+
+ treeViewer->setScene(scene);
+ scene->plot();
+
connect(lineEdit, SIGNAL(returnPressed()), this, SLOT(returnPressed()));
}
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index 4c24335..b4c4b24 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -1,5 +1,8 @@
#ifndef CHATDIALOG_H
#define CHATDIALOG_H
+#include <boost/function.hpp>
+#include <vector>
+#include "digesttreescene.h"
#include "ui_chatdialog.h"
#include "chatbuf.pb.h"
@@ -9,17 +12,19 @@
public:
ChatDialog(QWidget *parent = 0);
-
-public slots:
void appendMessage(const SyncDemo::ChatMessage &msg);
- void updateTreeView();
+ void processData(const std::vector<MisingDataInfo> &, SyncAppSocket *);
+
+private:
+ void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
private slots:
void returnPressed();
- void formChatMessage(const QString &text, SyncDemo::ChatMessage &msg);
private:
QString m_nick;
QString m_chatroom;
+ QString m_prefix;
+ Sync::SyncAppSocket *m_sock;
};
#endif
diff --git a/demo/chatdialog.ui b/demo/chatdialog.ui
index 072d139..b7a6747 100644
--- a/demo/chatdialog.ui
+++ b/demo/chatdialog.ui
@@ -25,7 +25,7 @@
<number>6</number>
</property>
<item>
- <widget class="DigestTreeViewer" name="treeViewer">
+ <widget class="QGraphicsView" name="treeViewer">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
diff --git a/demo/digesttreeviewer.cpp b/demo/digesttreeviewer.cpp
deleted file mode 100644
index 631ab92..0000000
--- a/demo/digesttreeviewer.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "digesttreeviewer.h"
-#include "digesttreescene.h"
-#include <QtGui>
-
-DigestTreeViewer::DigestTreeViewer(QWidget *parent)
- : QGraphicsView(parent)
-{
- DigestTreeScene *scene = new DigestTreeScene(this);
- setScene(scene);
- scene->plot();
- scene->plot();
-}
diff --git a/demo/digesttreeviewer.h b/demo/digesttreeviewer.h
deleted file mode 100644
index 0f09f67..0000000
--- a/demo/digesttreeviewer.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef DIGESTTREEVIEWER_H
-#define DIGESTTREEVIEWER_H
-#include <QtGui/QGraphicsView>
-
-class DigestTreeViewer : public QGraphicsView
-{
- Q_OBJECT
-
-public:
- DigestTreeViewer(QWidget *parent = 0);
-};
-
-#endif
diff --git a/demo/sync-demo.pro b/demo/sync-demo.pro
index ce3ac5a..402fee2 100644
--- a/demo/sync-demo.pro
+++ b/demo/sync-demo.pro
@@ -1,12 +1,10 @@
TEMPLATE = app
TARGET = sync-demo
HEADERS = chatdialog.h \
- digesttreeviewer.h \
digesttreescene.h
SOURCES = main.cpp \
chatdialog.cpp \
- digesttreeviewer.cpp \
digesttreescene.cpp
FORMS = chatdialog.ui
diff --git a/ns3/sync-ccnx-wrapper.h b/include/ns3/sync-ccnx-wrapper.h
similarity index 100%
rename from ns3/sync-ccnx-wrapper.h
rename to include/ns3/sync-ccnx-wrapper.h
diff --git a/ns3/sync-log.h b/include/ns3/sync-log.h
similarity index 100%
rename from ns3/sync-log.h
rename to include/ns3/sync-log.h
diff --git a/ns3/sync-logic-helper.h b/include/ns3/sync-logic-helper.h
similarity index 100%
rename from ns3/sync-logic-helper.h
rename to include/ns3/sync-logic-helper.h
diff --git a/ns3/sync-ns3-name-info.h b/include/ns3/sync-ns3-name-info.h
similarity index 100%
rename from ns3/sync-ns3-name-info.h
rename to include/ns3/sync-ns3-name-info.h
diff --git a/ns3/sync-scheduler.h b/include/ns3/sync-scheduler.h
similarity index 100%
rename from ns3/sync-scheduler.h
rename to include/ns3/sync-scheduler.h
diff --git a/ccnx/sync-app-socket-c.h b/include/sync-app-socket-c.h
similarity index 100%
rename from ccnx/sync-app-socket-c.h
rename to include/sync-app-socket-c.h
diff --git a/ccnx/sync-app-socket.h b/include/sync-app-socket.h
similarity index 100%
rename from ccnx/sync-app-socket.h
rename to include/sync-app-socket.h
diff --git a/ccnx/sync-ccnx-wrapper.h b/include/sync-ccnx-wrapper.h
similarity index 100%
rename from ccnx/sync-ccnx-wrapper.h
rename to include/sync-ccnx-wrapper.h
diff --git a/model/sync-diff-leaf.h b/include/sync-diff-leaf.h
similarity index 100%
rename from model/sync-diff-leaf.h
rename to include/sync-diff-leaf.h
diff --git a/model/sync-diff-state-container.h b/include/sync-diff-state-container.h
similarity index 100%
rename from model/sync-diff-state-container.h
rename to include/sync-diff-state-container.h
diff --git a/model/sync-diff-state.h b/include/sync-diff-state.h
similarity index 100%
rename from model/sync-diff-state.h
rename to include/sync-diff-state.h
diff --git a/model/sync-digest.h b/include/sync-digest.h
similarity index 100%
rename from model/sync-digest.h
rename to include/sync-digest.h
diff --git a/model/sync-event.h b/include/sync-event.h
similarity index 100%
rename from model/sync-event.h
rename to include/sync-event.h
diff --git a/model/sync-full-leaf.h b/include/sync-full-leaf.h
similarity index 100%
rename from model/sync-full-leaf.h
rename to include/sync-full-leaf.h
diff --git a/model/sync-full-state.h b/include/sync-full-state.h
similarity index 100%
rename from model/sync-full-state.h
rename to include/sync-full-state.h
diff --git a/model/sync-interest-container.h b/include/sync-interest-container.h
similarity index 100%
rename from model/sync-interest-container.h
rename to include/sync-interest-container.h
diff --git a/model/sync-interest-table.h b/include/sync-interest-table.h
similarity index 100%
rename from model/sync-interest-table.h
rename to include/sync-interest-table.h
diff --git a/model/sync-leaf.h b/include/sync-leaf.h
similarity index 100%
rename from model/sync-leaf.h
rename to include/sync-leaf.h
diff --git a/ccnx/sync-log.h b/include/sync-log.h
similarity index 100%
rename from ccnx/sync-log.h
rename to include/sync-log.h
diff --git a/ccnx/sync-logic-event-container.h b/include/sync-logic-event-container.h
similarity index 100%
rename from ccnx/sync-logic-event-container.h
rename to include/sync-logic-event-container.h
diff --git a/model/sync-logic.h b/include/sync-logic.h
similarity index 100%
rename from model/sync-logic.h
rename to include/sync-logic.h
diff --git a/model/sync-name-info.h b/include/sync-name-info.h
similarity index 100%
rename from model/sync-name-info.h
rename to include/sync-name-info.h
diff --git a/ccnx/sync-scheduler.h b/include/sync-scheduler.h
similarity index 100%
rename from ccnx/sync-scheduler.h
rename to include/sync-scheduler.h
diff --git a/model/sync-seq-no.h b/include/sync-seq-no.h
similarity index 100%
rename from model/sync-seq-no.h
rename to include/sync-seq-no.h
diff --git a/model/sync-state-leaf-container.h b/include/sync-state-leaf-container.h
similarity index 100%
rename from model/sync-state-leaf-container.h
rename to include/sync-state-leaf-container.h
diff --git a/model/sync-state.h b/include/sync-state.h
similarity index 100%
rename from model/sync-state.h
rename to include/sync-state.h
diff --git a/model/sync-std-name-info.h b/include/sync-std-name-info.h
similarity index 100%
rename from model/sync-std-name-info.h
rename to include/sync-std-name-info.h
diff --git a/wscript b/wscript
index 314327e..e2f05b7 100644
--- a/wscript
+++ b/wscript
@@ -94,7 +94,7 @@
'model/sync-std-name-info.cc',
],
use = 'BOOST BOOST_IOSTREAMS SSL TINYXML ' + ' '.join (['ns3_'+dep for dep in ['core', 'network', 'internet', 'NDNabstraction']]).upper (),
- includes = ['model', 'ns3', 'helper'],
+ includes = ['include', 'include/ns3', 'helper'],
)
example = bld.program (
@@ -102,7 +102,7 @@
features=['cxx', 'cxxprogram'],
source = ['examples/sync-example.cc'],
use = 'sync-ns3',
- includes = ['model', 'ns3', 'helper'],
+ includes = ['include', 'include/ns3', 'helper'],
)
sync_eval = bld.program (
@@ -113,7 +113,7 @@
'evaluation/sync-muc.cc',
],
use = 'sync-ns3',
- includes = ['model', 'ns3', 'helper'],
+ includes = ['include', 'include/ns3', 'helper'],
)
# from waflib import Utils,Logs,Errors
# Logs.pprint ('CYAN', program.use)
@@ -126,11 +126,8 @@
'ccnx/sync-ccnx-wrapper.cc',
'ccnx/sync-scheduler.cc',
'ccnx/sync-log.cc',
- #'ccnx/sync-app-data-fetch.cc',
- #'ccnx/sync-app-data-publish.cc',
#'ccnx/sync-app-socket-c.cc',
'ccnx/sync-app-socket.cc',
-
'model/sync-diff-leaf.cc',
'model/sync-diff-state.cc',
'model/sync-digest.cc',
@@ -145,7 +142,7 @@
'model/sync-std-name-info.cc',
],
use = 'BOOST BOOST_IOSTREAMS BOOST_THREAD SSL TINYXML CCNX',
- includes = ['model', 'ccnx', 'helper'],
+ includes = ['include', 'helper'],
)
# Unit tests
@@ -155,7 +152,7 @@
source = bld.path.ant_glob(['test/**/*.cc']),
features=['cxx', 'cxxprogram'],
use = 'BOOST_TEST sync',
- includes = ['model', 'ccnx', 'helper'],
+ includes = ['include', 'helper'],
)
if bld.get_define ("HAVE_LOG4CXX"):