Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarJoinRequestDialog.hpp
blob: a228b3d3bca784b522243b354e8e10b471ed08a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef STAR_JOIN_REQUEST_DIALOG_HPP
#define STAR_JOIN_REQUEST_DIALOG_HPP

#include "StarPane.hpp"
#include "StarRpcPromise.hpp"

namespace Star {

STAR_CLASS(JoinRequestDialog);

class JoinRequestDialog : public Pane {
public:
  JoinRequestDialog();

  virtual ~JoinRequestDialog() {}

  void displayRequest(String const& userName, function<void(P2PJoinRequestReply)> callback);

  void dismissed() override;

private:
  void reply(P2PJoinRequestReply reply);

  function<void(P2PJoinRequestReply)> m_callback;
  bool m_confirmed;
};

}

#endif