Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2021-10-30 19:34:53 +0300
committerSimon Tatham <anakin@pobox.com>2021-10-30 20:19:56 +0300
commitaac5e096fa0579c754776167c1486bdb693c065d (patch)
tree659da4197e9284d5c4aa64e5c1b629403bf96e09 /otherbackends
parent44db74ec513d36b95d28bb718f85e594b18c49de (diff)
Add Interactor methods to get/set LogPolicy and Seat.
Nothing uses this yet, but the next commit will.
Diffstat (limited to 'otherbackends')
-rw-r--r--otherbackends/raw.c21
-rw-r--r--otherbackends/rlogin.c21
-rw-r--r--otherbackends/supdup.c21
-rw-r--r--otherbackends/telnet.c21
4 files changed, 84 insertions, 0 deletions
diff --git a/otherbackends/raw.c b/otherbackends/raw.c
index 9a391d94..7e80e42b 100644
--- a/otherbackends/raw.c
+++ b/otherbackends/raw.c
@@ -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,
};
/*
diff --git a/otherbackends/rlogin.c b/otherbackends/rlogin.c
index 3ab3c070..6da67070 100644
--- a/otherbackends/rlogin.c
+++ b/otherbackends/rlogin.c
@@ -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,
};
/*
diff --git a/otherbackends/supdup.c b/otherbackends/supdup.c
index 3588e9f3..f680c521 100644
--- a/otherbackends/supdup.c
+++ b/otherbackends/supdup.c
@@ -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,
};
/*
diff --git a/otherbackends/telnet.c b/otherbackends/telnet.c
index bbf539c9..fecee06c 100644
--- a/otherbackends/telnet.c
+++ b/otherbackends/telnet.c
@@ -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,
};
/*