Android-cuttlefish cvd tool
|
#include <session.h>
Public Member Functions | |
Session (const std::string &session_name, const std::uint32_t display_num, ConfUiRenderer &host_renderer, HostModeCtrl &host_mode_ctrl, const std::string &locale="en") | |
std::string | GetId () |
MainLoopState | GetState () |
MainLoopState | Transition (SharedFD &hal_cli, const FsmInput fsm_input, const ConfUiMessage &conf_ui_message) |
bool | Suspend (SharedFD hal_cli) |
bool | Restore (SharedFD hal_cli) |
void | Abort () |
void | UserAbort (SharedFD hal_cli) |
bool | IsSuspended () const |
void | CleanUp () |
bool | IsConfirm (const int x, const int y) |
bool | IsCancel (const int x, const int y) |
bool | IsReadyForUserInput () const |
Private Types | |
using | Clock = std::chrono::steady_clock |
using | TimePoint = std::chrono::time_point< Clock > |
Private Member Functions | |
bool | IsUserInput (const FsmInput fsm_input) |
bool | RenderDialog () |
bool | HandleInit (SharedFD hal_cli, const FsmInput fsm_input, const ConfUiMessage &conf_ui_message) |
bool | HandleWaitStop (SharedFD hal_cli, const FsmInput fsm_input) |
bool | HandleInSession (SharedFD hal_cli, const FsmInput fsm_input, const ConfUiMessage &conf_ui_msg) |
bool | ReportErrorToHal (SharedFD hal_cli, const std::string &msg) |
void | ScheduleToTerminate () |
Private Attributes | |
const std::string | session_id_ |
const std::uint32_t | display_num_ |
ConfUiRenderer & | renderer_ |
HostModeCtrl & | host_mode_ctrl_ |
std::string | prompt_text_ |
std::string | locale_ |
std::vector< teeui::UIOption > | ui_options_ |
std::vector< std::uint8_t > | extra_data_ |
std::vector< std::uint8_t > | signed_confirmation_ |
std::vector< std::uint8_t > | message_ |
std::unique_ptr< Cbor > | cbor_ |
std::atomic< MainLoopState > | state_ |
MainLoopState | saved_state_ |
std::unique_ptr< TimePoint > | start_time_ |
Confirmation UI Session
E.g. Two guest apps could drive confirmation UI respectively, and both are alive at the moment. Each needs one session
|
private |
|
private |
cuttlefish::confui::Session::Session | ( | const std::string & | session_name, |
const std::uint32_t | display_num, | ||
ConfUiRenderer & | host_renderer, | ||
HostModeCtrl & | host_mode_ctrl, | ||
const std::string & | locale = "en" |
||
) |
void cuttlefish::confui::Session::Abort | ( | ) |
void cuttlefish::confui::Session::CleanUp | ( | ) |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
inline |
|
inline |
bool cuttlefish::confui::Session::IsReadyForUserInput | ( | ) | const |
bool cuttlefish::confui::Session::IsSuspended | ( | ) | const |
|
inlineprivate |
|
private |
create a frame, and render it on the webRTC client
note that this does not check host_ctrl_mode_
|
private |
bool cuttlefish::confui::Session::Restore | ( | SharedFD | hal_cli | ) |
this make a transition from kRestore to the saved state
|
private |
bool cuttlefish::confui::Session::Suspend | ( | SharedFD | hal_cli | ) |
this make a transition from kWaitStop or kInSession to kSuspend
MainLoopState cuttlefish::confui::Session::Transition | ( | SharedFD & | hal_cli, |
const FsmInput | fsm_input, | ||
const ConfUiMessage & | conf_ui_message | ||
) |
void cuttlefish::confui::Session::UserAbort | ( | SharedFD | hal_cli | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |