blob: 3826ad4d5f79e288be5d29f0d1e6e685ff4c45e7 [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
17#include <ndn.cxx/data.h>
18#include <ndn.cxx/security/certificate/identity-certificate.h>
19#endif
20
Yingdi Yu24ca96f2013-10-22 23:42:16 -070021namespace Ui {
22class InvitationDialog;
23}
24
25class InvitationDialog : public QDialog
26{
27 Q_OBJECT
28
29public:
30 explicit InvitationDialog(QWidget *parent = 0);
31 ~InvitationDialog();
32
33 void
34 setMsg(const std::string& inviter, const std::string& chatroom);
35
36 inline void
37 setInterestName(const ndn::Name& interestName)
38 { m_interestName = interestName; }
39
Yingdi Yu978b3ae2013-10-23 11:50:51 -070040 inline void
41 setIdentityCertificate(const ndn::Ptr<ndn::security::IdentityCertificate> identityCertificate)
42 { m_identityCertificate = identityCertificate; }
43
Yingdi Yu24ca96f2013-10-22 23:42:16 -070044signals:
45 void
Yingdi Yu978b3ae2013-10-23 11:50:51 -070046 invitationAccepted(const ndn::Name& interestName,
47 const ndn::security::IdentityCertificate& identityCertificate,
48 QString inviter,
49 QString chatroom);
Yingdi Yu24ca96f2013-10-22 23:42:16 -070050
51 void
52 invitationRejected(const ndn::Name& interestName);
53
54private slots:
55 void
56 onOkClicked();
57
58 void
59 onCancelClicked();
60
61
62private:
63 Ui::InvitationDialog *ui;
Yingdi Yu978b3ae2013-10-23 11:50:51 -070064 std::string m_inviter;
65 std::string m_chatroom;
Yingdi Yu24ca96f2013-10-22 23:42:16 -070066 ndn::Name m_interestName;
Yingdi Yu978b3ae2013-10-23 11:50:51 -070067 ndn::Ptr<ndn::security::IdentityCertificate> m_identityCertificate;
Yingdi Yu24ca96f2013-10-22 23:42:16 -070068};
69
70#endif // INVITATIONDIALOG_H