Commit dbfb070f52b53d1b3461e581b72a05b71c509e22
1 parent
2ecaadbe
Exists in
master
and in
1 other branch
Adding get/set methods for session timeout attribute.
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
client/src/include/lib3270/ipc.h
@@ -734,6 +734,10 @@ | @@ -734,6 +734,10 @@ | ||
734 | Attribute getAttribute(const char *name) const; | 734 | Attribute getAttribute(const char *name) const; |
735 | std::vector<Attribute> getAttributes() const; | 735 | std::vector<Attribute> getAttributes() const; |
736 | 736 | ||
737 | + inline time_t getTimeout() const noexcept { | ||
738 | + return this->timeout; | ||
739 | + } | ||
740 | + | ||
737 | inline Attribute operator[](const char *name) const { | 741 | inline Attribute operator[](const char *name) const { |
738 | return getAttribute(name); | 742 | return getAttribute(name); |
739 | } | 743 | } |
@@ -778,6 +782,10 @@ | @@ -778,6 +782,10 @@ | ||
778 | } | 782 | } |
779 | 783 | ||
780 | // Set properties | 784 | // Set properties |
785 | + inline void setTimeout(time_t timeout = DEFAULT_TIMEOUT) noexcept { | ||
786 | + this->timeout = timeout; | ||
787 | + } | ||
788 | + | ||
781 | inline void setUnlockDelay(unsigned short delay = 350) { | 789 | inline void setUnlockDelay(unsigned short delay = 350) { |
782 | session->setUnlockDelay(delay); | 790 | session->setUnlockDelay(delay); |
783 | } | 791 | } |