mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 12:02:47 -05:00
Add Interactor methods to get/set LogPolicy and Seat.
Nothing uses this yet, but the next commit will.
This commit is contained in:
@ -130,8 +130,29 @@ static char *raw_description(Interactor *itr)
|
||||
return dupstr(raw->description);
|
||||
}
|
||||
|
||||
static LogPolicy *raw_logpolicy(Interactor *itr)
|
||||
{
|
||||
Raw *raw = container_of(itr, Raw, interactor);
|
||||
return log_get_policy(raw->logctx);
|
||||
}
|
||||
|
||||
static Seat *raw_get_seat(Interactor *itr)
|
||||
{
|
||||
Raw *raw = container_of(itr, Raw, interactor);
|
||||
return raw->seat;
|
||||
}
|
||||
|
||||
static void raw_set_seat(Interactor *itr, Seat *seat)
|
||||
{
|
||||
Raw *raw = container_of(itr, Raw, interactor);
|
||||
raw->seat = seat;
|
||||
}
|
||||
|
||||
static const InteractorVtable Raw_interactorvt = {
|
||||
.description = raw_description,
|
||||
.logpolicy = raw_logpolicy,
|
||||
.get_seat = raw_get_seat,
|
||||
.set_seat = raw_set_seat,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -207,8 +207,29 @@ static char *rlogin_description(Interactor *itr)
|
||||
return dupstr(rlogin->description);
|
||||
}
|
||||
|
||||
static LogPolicy *rlogin_logpolicy(Interactor *itr)
|
||||
{
|
||||
Rlogin *rlogin = container_of(itr, Rlogin, interactor);
|
||||
return log_get_policy(rlogin->logctx);
|
||||
}
|
||||
|
||||
static Seat *rlogin_get_seat(Interactor *itr)
|
||||
{
|
||||
Rlogin *rlogin = container_of(itr, Rlogin, interactor);
|
||||
return rlogin->seat;
|
||||
}
|
||||
|
||||
static void rlogin_set_seat(Interactor *itr, Seat *seat)
|
||||
{
|
||||
Rlogin *rlogin = container_of(itr, Rlogin, interactor);
|
||||
rlogin->seat = seat;
|
||||
}
|
||||
|
||||
static const InteractorVtable Rlogin_interactorvt = {
|
||||
.description = rlogin_description,
|
||||
.logpolicy = rlogin_logpolicy,
|
||||
.get_seat = rlogin_get_seat,
|
||||
.set_seat = rlogin_set_seat,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -649,8 +649,29 @@ static char *supdup_description(Interactor *itr)
|
||||
return dupstr(supdup->description);
|
||||
}
|
||||
|
||||
static LogPolicy *supdup_logpolicy(Interactor *itr)
|
||||
{
|
||||
Supdup *supdup = container_of(itr, Supdup, interactor);
|
||||
return log_get_policy(supdup->logctx);
|
||||
}
|
||||
|
||||
static Seat *supdup_get_seat(Interactor *itr)
|
||||
{
|
||||
Supdup *supdup = container_of(itr, Supdup, interactor);
|
||||
return supdup->seat;
|
||||
}
|
||||
|
||||
static void supdup_set_seat(Interactor *itr, Seat *seat)
|
||||
{
|
||||
Supdup *supdup = container_of(itr, Supdup, interactor);
|
||||
supdup->seat = seat;
|
||||
}
|
||||
|
||||
static const InteractorVtable Supdup_interactorvt = {
|
||||
.description = supdup_description,
|
||||
.logpolicy = supdup_logpolicy,
|
||||
.get_seat = supdup_get_seat,
|
||||
.set_seat = supdup_set_seat,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -695,8 +695,29 @@ static char *telnet_description(Interactor *itr)
|
||||
return dupstr(telnet->description);
|
||||
}
|
||||
|
||||
static LogPolicy *telnet_logpolicy(Interactor *itr)
|
||||
{
|
||||
Telnet *telnet = container_of(itr, Telnet, interactor);
|
||||
return log_get_policy(telnet->logctx);
|
||||
}
|
||||
|
||||
static Seat *telnet_get_seat(Interactor *itr)
|
||||
{
|
||||
Telnet *telnet = container_of(itr, Telnet, interactor);
|
||||
return telnet->seat;
|
||||
}
|
||||
|
||||
static void telnet_set_seat(Interactor *itr, Seat *seat)
|
||||
{
|
||||
Telnet *telnet = container_of(itr, Telnet, interactor);
|
||||
telnet->seat = seat;
|
||||
}
|
||||
|
||||
static const InteractorVtable Telnet_interactorvt = {
|
||||
.description = telnet_description,
|
||||
.logpolicy = telnet_logpolicy,
|
||||
.get_seat = telnet_get_seat,
|
||||
.set_seat = telnet_set_seat,
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user