security: Fix security bugs, now ChronoChat should work with security

Change-Id: I81e7687bb4b02798ad9de3da34b36b0f011ffd66
diff --git a/src/chat-dialog.h b/src/chat-dialog.h
index f136b82..0ddbc85 100644
--- a/src/chat-dialog.h
+++ b/src/chat-dialog.h
@@ -81,6 +81,9 @@
   void 
   closeEvent(QCloseEvent *e);
 
+  void
+  changeEvent(QEvent *e);
+
   void 
   resizeEvent(QResizeEvent *);
   
@@ -196,7 +199,7 @@
 
 signals:  
   void
-  processData(const ndn::Data& data, bool show, bool isHistory);
+  processData(const ndn::shared_ptr<const ndn::Data>& data, bool show, bool isHistory);
 
   void 
   processTreeUpdate(const std::vector<Sync::MissingDataInfo>);
@@ -211,17 +214,27 @@
   showChatMessage(const QString& chatroomName, const QString& from, const QString& data);
 
   void
-  reply(const ndn::Interest& interest, const ndn::Data& data, size_t routablePrefixOffset, bool isIntroducer);
+  resetIcon();
 
   void
-  replyTimeout(const ndn::Interest& interest, size_t routablePrefixOffset);
+  reply(const ndn::Interest& interest,
+        const ndn::shared_ptr<const ndn::Data>& data,
+        size_t routablePrefixOffset, bool isIntroducer);
 
   void
-  introCert(const ndn::Interest& interest, const ndn::Data& data);
+  replyTimeout(const ndn::Interest& interest, 
+               size_t routablePrefixOffset);
+
+  void
+  introCert(const ndn::Interest& interest,
+            const ndn::shared_ptr<const ndn::Data>& data);
   
   void
-  introCertTimeout(const ndn::Interest& interest, int retry, const QString& msg);
+  introCertTimeout(const ndn::Interest& interest,
+                   int retry, const QString& msg);
 
+  void
+  waitForContactList();
 
 public slots:
   void
@@ -238,7 +251,8 @@
   onTreeButtonPressed();
 
   void 
-  onProcessData(const ndn::Data& data, bool show, bool isHistory);
+  onProcessData(const ndn::shared_ptr<const ndn::Data>& data,
+                bool show, bool isHistory);
 
   void 
   onProcessTreeUpdate(const std::vector<Sync::MissingDataInfo>&);
@@ -271,16 +285,21 @@
   onSendInvitation(QString);
 
   void
-  onReply(const ndn::Interest& interest, const ndn::Data& data, size_t routablePrefixOffset, bool isIntroducer);
+  onReply(const ndn::Interest& interest,
+          const ndn::shared_ptr<const ndn::Data>& data,
+          size_t routablePrefixOffset, bool isIntroducer);
 
   void
-  onReplyTimeout(const ndn::Interest& interest, size_t routablePrefixOffset);
+  onReplyTimeout(const ndn::Interest& interest,
+                 size_t routablePrefixOffset);
 
   void
-  onIntroCert(const ndn::Interest& interest, const ndn::Data& data);
+  onIntroCert(const ndn::Interest& interest,
+              const ndn::shared_ptr<const ndn::Data>& data);
 
   void
-  onIntroCertTimeout(const ndn::Interest& interest, int retry, const QString& msg);
+  onIntroCertTimeout(const ndn::Interest& interest,
+                     int retry, const QString& msg);
 
 private:
   Ui::ChatDialog *ui;