Add functionality of endorsement
diff --git a/src/addcontactpanel.h b/src/addcontactpanel.h
index 1536464..3437e54 100644
--- a/src/addcontactpanel.h
+++ b/src/addcontactpanel.h
@@ -29,6 +29,8 @@
Q_DECLARE_METATYPE(EndorseCertificate)
+Q_DECLARE_METATYPE(ndn::Data)
+
class AddContactPanel : public QDialog
{
Q_OBJECT
@@ -39,6 +41,13 @@
~AddContactPanel();
+private:
+ void
+ displayContactInfo();
+
+ bool
+ isCorrectName(const ndn::Name& name);
+
private slots:
void
onCancelClicked();
@@ -55,6 +64,18 @@
void
selfEndorseCertificateFetchFailed(const ndn::Name& identity);
+ void
+ onContactKeyFetched(const EndorseCertificate& endorseCertificate);
+
+ void
+ onContactKeyFetchFailed(const ndn::Name& identity);
+
+ void
+ onCollectEndorseFetched(const ndn::Data& data);
+
+ void
+ onCollectEndorseFetchFailed(const ndn::Name& identity);
+
signals:
void
newContactAdded();
@@ -65,6 +86,9 @@
ndn::Ptr<ContactManager> m_contactManager;
WarningDialog* m_warningDialog;
ndn::Ptr<EndorseCertificate> m_currentEndorseCertificate;
+ ndn::Ptr<ndn::Data> m_currentCollectEndorse;
+ bool m_currentEndorseCertificateReady;
+ bool m_currentCollectEndorseReady;
};
#endif // ADDCONTACTPANEL_H