2 * Stub methods usable by Seat implementations.
7 size_t nullseat_output(
8 Seat
*seat
, SeatOutputType type
, const void *data
, size_t len
) {return 0;}
9 bool nullseat_eof(Seat
*seat
) { return true; }
10 void nullseat_sent(Seat
*seat
, size_t bufsize
) {}
11 size_t nullseat_banner(Seat
*seat
, const void *data
, size_t len
) {return 0;}
12 size_t nullseat_banner_to_stderr(Seat
*seat
, const void *data
, size_t len
)
13 { return seat_output(seat
, SEAT_OUTPUT_STDERR
, data
, len
); }
14 SeatPromptResult
nullseat_get_userpass_input(Seat
*seat
, prompts_t
*p
)
15 { return SPR_SW_ABORT("this seat can't handle interactive prompts"); }
16 void nullseat_notify_session_started(Seat
*seat
) {}
17 void nullseat_notify_remote_exit(Seat
*seat
) {}
18 void nullseat_notify_remote_disconnect(Seat
*seat
) {}
19 void nullseat_connection_fatal(Seat
*seat
, const char *message
) {}
20 void nullseat_update_specials_menu(Seat
*seat
) {}
21 char *nullseat_get_ttymode(Seat
*seat
, const char *mode
) { return NULL
; }
22 void nullseat_set_busy_status(Seat
*seat
, BusyStatus status
) {}
23 SeatPromptResult
nullseat_confirm_ssh_host_key(
24 Seat
*seat
, const char *host
, int port
, const char *keytype
,
25 char *keystr
, const char *keydisp
, char **key_fingerprints
, bool mismatch
,
26 void (*callback
)(void *ctx
, SeatPromptResult result
), void *ctx
)
27 { return SPR_SW_ABORT("this seat can't handle interactive prompts"); }
28 SeatPromptResult
nullseat_confirm_weak_crypto_primitive(
29 Seat
*seat
, const char *algtype
, const char *algname
,
30 void (*callback
)(void *ctx
, SeatPromptResult result
), void *ctx
)
31 { return SPR_SW_ABORT("this seat can't handle interactive prompts"); }
32 SeatPromptResult
nullseat_confirm_weak_cached_hostkey(
33 Seat
*seat
, const char *algname
, const char *betteralgs
,
34 void (*callback
)(void *ctx
, SeatPromptResult result
), void *ctx
)
35 { return SPR_SW_ABORT("this seat can't handle interactive prompts"); }
36 bool nullseat_is_never_utf8(Seat
*seat
) { return false; }
37 bool nullseat_is_always_utf8(Seat
*seat
) { return true; }
38 void nullseat_echoedit_update(Seat
*seat
, bool echoing
, bool editing
) {}
39 const char *nullseat_get_x_display(Seat
*seat
) { return NULL
; }
40 bool nullseat_get_windowid(Seat
*seat
, long *id_out
) { return false; }
41 bool nullseat_get_window_pixel_size(
42 Seat
*seat
, int *width
, int *height
) { return false; }
43 StripCtrlChars
*nullseat_stripctrl_new(
44 Seat
*seat
, BinarySink
*bs_out
, SeatInteractionContext sic
) {return NULL
;}
45 void nullseat_set_trust_status(Seat
*seat
, bool trusted
) {}
46 bool nullseat_can_set_trust_status_yes(Seat
*seat
) { return true; }
47 bool nullseat_can_set_trust_status_no(Seat
*seat
) { return false; }
48 bool nullseat_has_mixed_input_stream_yes(Seat
*seat
) { return true; }
49 bool nullseat_has_mixed_input_stream_no(Seat
*seat
) { return false; }
50 bool nullseat_verbose_no(Seat
*seat
) { return false; }
51 bool nullseat_verbose_yes(Seat
*seat
) { return true; }
52 bool nullseat_interactive_no(Seat
*seat
) { return false; }
53 bool nullseat_interactive_yes(Seat
*seat
) { return true; }
54 bool nullseat_get_cursor_position(Seat
*seat
, int *x
, int *y
) { return false; }