Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /* |
| 3 | * Copyright (c) 2013, Regents of the University of California |
| 4 | * Yingdi Yu |
| 5 | * |
| 6 | * BSD license, See the LICENSE file for more information |
| 7 | * |
| 8 | * Author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 9 | */ |
| 10 | |
| 11 | #ifndef INVITATIONDIALOG_H |
| 12 | #define INVITATIONDIALOG_H |
| 13 | |
| 14 | #include <QDialog> |
| 15 | |
Yingdi Yu | 978b3ae | 2013-10-23 11:50:51 -0700 | [diff] [blame] | 16 | #ifndef Q_MOC_RUN |
| 17 | #include <ndn.cxx/data.h> |
| 18 | #include <ndn.cxx/security/certificate/identity-certificate.h> |
Yingdi Yu | 7989eb2 | 2013-10-31 17:38:22 -0700 | [diff] [blame^] | 19 | #include "chronos-invitation.h" |
Yingdi Yu | 978b3ae | 2013-10-23 11:50:51 -0700 | [diff] [blame] | 20 | #endif |
| 21 | |
Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 22 | namespace Ui { |
| 23 | class InvitationDialog; |
| 24 | } |
| 25 | |
| 26 | class InvitationDialog : public QDialog |
| 27 | { |
| 28 | Q_OBJECT |
| 29 | |
| 30 | public: |
| 31 | explicit InvitationDialog(QWidget *parent = 0); |
| 32 | ~InvitationDialog(); |
| 33 | |
| 34 | void |
Yingdi Yu | 7989eb2 | 2013-10-31 17:38:22 -0700 | [diff] [blame^] | 35 | setInvitation(const std::string& alias, |
| 36 | ndn::Ptr<ChronosInvitation> invitation, |
| 37 | ndn::Ptr<ndn::security::IdentityCertificate> identityCertificate); |
Yingdi Yu | 978b3ae | 2013-10-23 11:50:51 -0700 | [diff] [blame] | 38 | |
Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 39 | signals: |
| 40 | void |
Yingdi Yu | 7989eb2 | 2013-10-31 17:38:22 -0700 | [diff] [blame^] | 41 | invitationAccepted(const ChronosInvitation& invitation, |
| 42 | const ndn::security::IdentityCertificate& identityCertificate); |
Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 43 | |
| 44 | void |
Yingdi Yu | 7989eb2 | 2013-10-31 17:38:22 -0700 | [diff] [blame^] | 45 | invitationRejected(const ChronosInvitation& invitation); |
Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 46 | |
| 47 | private slots: |
| 48 | void |
| 49 | onOkClicked(); |
| 50 | |
| 51 | void |
| 52 | onCancelClicked(); |
| 53 | |
| 54 | |
| 55 | private: |
| 56 | Ui::InvitationDialog *ui; |
Yingdi Yu | 7989eb2 | 2013-10-31 17:38:22 -0700 | [diff] [blame^] | 57 | std::string m_inviterAlias; |
| 58 | ndn::Ptr<ChronosInvitation> m_invitation; |
Yingdi Yu | 978b3ae | 2013-10-23 11:50:51 -0700 | [diff] [blame] | 59 | ndn::Ptr<ndn::security::IdentityCertificate> m_identityCertificate; |
Yingdi Yu | 24ca96f | 2013-10-22 23:42:16 -0700 | [diff] [blame] | 60 | }; |
| 61 | |
| 62 | #endif // INVITATIONDIALOG_H |