Invitation works
diff --git a/src/chatdialog.h b/src/chatdialog.h
index 77feea1..e482169 100644
--- a/src/chatdialog.h
+++ b/src/chatdialog.h
@@ -15,6 +15,10 @@
#ifndef Q_MOC_RUN
#include <ndn.cxx/data.h>
+#include <ndn.cxx/security/keychain.h>
+#include <ndn.cxx/wrapper/wrapper.h>
+#include "chatroom-policy-manager.h"
+#include "contact-item.h"
#endif
namespace Ui {
@@ -28,6 +32,7 @@
public:
explicit ChatDialog(const ndn::Name& chatroomPrefix,
const ndn::Name& localPrefix,
+ const ndn::Name& defaultIdentity,
QWidget *parent = 0);
~ChatDialog();
@@ -40,12 +45,39 @@
{ return m_localPrefix; }
void
- sendInvitation();
+ sendInvitation(ndn::Ptr<ContactItem> contact);
private:
+ void
+ setWrapper();
+
+ void
+ onInviteReplyVerified(ndn::Ptr<ndn::Data> data, const ndn::Name& identity);
+
+ void
+ onInviteTimeout(ndn::Ptr<ndn::Closure> closure,
+ ndn::Ptr<ndn::Interest> interest,
+ const ndn::Name& identity,
+ int retry);
+
+ void
+ invitationRejected(const ndn::Name& identity);
+
+ void
+ invitationAccepted(const ndn::Name& identity);
+
+ void
+ onUnverified(ndn::Ptr<ndn::Data> data);
+
+private:
Ui::ChatDialog *ui;
ndn::Name m_chatroomPrefix;
ndn::Name m_localPrefix;
+ ndn::Name m_defaultIdentity;
+ ndn::Ptr<ChatroomPolicyManager> m_policyManager;
+ ndn::Ptr<ndn::security::IdentityManager> m_identityManager;
+ ndn::Ptr<ndn::security::Keychain> m_keychain;
+ ndn::Ptr<ndn::Wrapper> m_handler;
};
#endif // ChatDIALOG_H