-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_meeting_controller.cc
34 lines (27 loc) · 1.04 KB
/
pre_meeting_controller.cc
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
31
32
33
34
#include "pre_meeting_controller.hh"
#include <spdlog/spdlog.h>
#include <QTimer>
#include "window_manager.hh"
PreMeetingController::PreMeetingController(PreMeetingView* view)
: view_(view) {
MeetingModel::getInstance().Register(this);
}
PreMeetingController::~PreMeetingController() {
MeetingModel::getInstance().UnRegister(this);
}
void PreMeetingController::HandleUpdateUserId() {
view_->UpdateUserId(MeetingModel::getInstance().GetSelfUserId());
}
void PreMeetingController::HandleQuickMeeting(const std::string& user_id) {
MeetingModel::getInstance().QuickMeeting(user_id);
}
void PreMeetingController::HandleJoinMeeting(const std::string& user_id, const std::string& meeting_id) {
MeetingModel::getInstance().JoinMeeting(user_id, meeting_id);
}
void PreMeetingController::JoinMeetingComplete(JoinMeetingResult result, const std::string& msg) {
view_->ShowToast(msg);
if (result == JoinMeetingResult::kJoinMeetingResultSuccess) {
WindowManager::getInstance().PopPremeetingView();
WindowManager::getInstance().PushInmeetingView();
}
}