blob: 2e01fd96fbede073edbd4c9c575a8e5355ecbcd5 [file] [log] [blame]
Yingdi Yu24ca96f2013-10-22 23:42:16 -07001/* -*- 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 Yu978b3ae2013-10-23 11:50:51 -070016#ifndef Q_MOC_RUN
Yingdi Yub6fb0302014-01-21 11:05:11 -080017#include <ndn-cpp-dev/data.hpp>
18#include <ndn-cpp-dev/security/identity-certificate.hpp>
Yingdi Yu7989eb22013-10-31 17:38:22 -070019#include "chronos-invitation.h"
Yingdi Yu978b3ae2013-10-23 11:50:51 -070020#endif
21
Yingdi Yu24ca96f2013-10-22 23:42:16 -070022namespace Ui {
23class InvitationDialog;
24}
25
26class InvitationDialog : public QDialog
27{
28 Q_OBJECT
29
30public:
31 explicit InvitationDialog(QWidget *parent = 0);
32 ~InvitationDialog();
33
34 void
Yingdi Yu7989eb22013-10-31 17:38:22 -070035 setInvitation(const std::string& alias,
Yingdi Yu76dd8002013-12-24 11:16:32 +080036 ndn::ptr_lib::shared_ptr<ChronosInvitation> invitation,
37 ndn::ptr_lib::shared_ptr<ndn::IdentityCertificate> identityCertificate);
Yingdi Yu978b3ae2013-10-23 11:50:51 -070038
Yingdi Yu24ca96f2013-10-22 23:42:16 -070039signals:
40 void
Yingdi Yu7989eb22013-10-31 17:38:22 -070041 invitationAccepted(const ChronosInvitation& invitation,
Yingdi Yu76dd8002013-12-24 11:16:32 +080042 const ndn::IdentityCertificate& identityCertificate);
Yingdi Yu24ca96f2013-10-22 23:42:16 -070043
44 void
Yingdi Yu7989eb22013-10-31 17:38:22 -070045 invitationRejected(const ChronosInvitation& invitation);
Yingdi Yu24ca96f2013-10-22 23:42:16 -070046
47private slots:
48 void
49 onOkClicked();
50
51 void
52 onCancelClicked();
53
54
55private:
56 Ui::InvitationDialog *ui;
Yingdi Yu7989eb22013-10-31 17:38:22 -070057 std::string m_inviterAlias;
Yingdi Yu76dd8002013-12-24 11:16:32 +080058 ndn::ptr_lib::shared_ptr<ChronosInvitation> m_invitation;
59 ndn::ptr_lib::shared_ptr<ndn::IdentityCertificate> m_identityCertificate;
Yingdi Yu24ca96f2013-10-22 23:42:16 -070060};
61
62#endif // INVITATIONDIALOG_H