blob: 0dab90fc07f8e59680c1f13af91b03877572b57c [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
Yingdi Yu0b0a7362014-08-05 16:31:30 -070011#ifndef CHRONOS_INVITATION_DIALOG_HPP
12#define CHRONOS_INVITATION_DIALOG_HPP
Yingdi Yu24ca96f2013-10-22 23:42:16 -070013
14#include <QDialog>
15
Yingdi Yu978b3ae2013-10-23 11:50:51 -070016#ifndef Q_MOC_RUN
Yingdi Yu0b0a7362014-08-05 16:31:30 -070017#include "common.hpp"
Yingdi Yu978b3ae2013-10-23 11:50:51 -070018#endif
19
Yingdi Yu24ca96f2013-10-22 23:42:16 -070020namespace Ui {
21class InvitationDialog;
22}
23
Yingdi Yu0b0a7362014-08-05 16:31:30 -070024namespace chronos{
25
Yingdi Yu24ca96f2013-10-22 23:42:16 -070026class InvitationDialog : public QDialog
27{
28 Q_OBJECT
29
30public:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070031 explicit
32 InvitationDialog(QWidget* parent = 0);
33
Yingdi Yu24ca96f2013-10-22 23:42:16 -070034 ~InvitationDialog();
35
36 void
Yingdi Yu7989eb22013-10-31 17:38:22 -070037 setInvitation(const std::string& alias,
Yingdi Yu348f5ea2014-03-01 14:47:25 -080038 const std::string& chatroom,
Yingdi Yufa4ce792014-02-06 18:09:22 -080039 const ndn::Name& invitationInterest);
Yingdi Yu978b3ae2013-10-23 11:50:51 -070040
Yingdi Yu24ca96f2013-10-22 23:42:16 -070041signals:
42 void
Yingdi Yu348f5ea2014-03-01 14:47:25 -080043 invitationResponded(const ndn::Name& invitationName, bool accepted);
Yingdi Yu24ca96f2013-10-22 23:42:16 -070044
45private slots:
46 void
47 onOkClicked();
Yingdi Yufa0b6a02014-04-30 14:26:42 -070048
Yingdi Yu24ca96f2013-10-22 23:42:16 -070049 void
50 onCancelClicked();
51
52
53private:
Yingdi Yu0b0a7362014-08-05 16:31:30 -070054 Ui::InvitationDialog* ui;
Yingdi Yufa4ce792014-02-06 18:09:22 -080055 ndn::Name m_invitationInterest;
Yingdi Yu24ca96f2013-10-22 23:42:16 -070056};
57
Yingdi Yu0b0a7362014-08-05 16:31:30 -070058} // namespace chronos
59
60#endif // CHRONOS_INVITATION_DIALOG_HPP