aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_channel.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-01-27 14:10:37 +0000
committerlloyd <[email protected]>2015-01-27 14:10:37 +0000
commitb8fa304ec981d273c45d7ef31705d65ccfb00cc1 (patch)
tree86a0c03ddcf3f6b331a73170167bbf1e429e3d79 /src/lib/tls/tls_channel.h
parent5ca89c642f19b747b965a22db87e7af2d13d0f35 (diff)
Add typedefs for function signatures/types used in TLS for easier reading
Diffstat (limited to 'src/lib/tls/tls_channel.h')
-rw-r--r--src/lib/tls/tls_channel.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/lib/tls/tls_channel.h b/src/lib/tls/tls_channel.h
index 5b5a5d530..713d4c1b9 100644
--- a/src/lib/tls/tls_channel.h
+++ b/src/lib/tls/tls_channel.h
@@ -31,10 +31,15 @@ class Handshake_State;
class BOTAN_DLL Channel
{
public:
- Channel(std::function<void (const byte[], size_t)> socket_output_fn,
- std::function<void (const byte[], size_t)> data_cb,
- std::function<void (Alert, const byte[], size_t)> alert_cb,
- std::function<bool (const Session&)> handshake_cb,
+ typedef std::function<void (const byte[], size_t)> output_fn;
+ typedef std::function<void (const byte[], size_t)> data_cb;
+ typedef std::function<void (Alert, const byte[], size_t)> alert_cb;
+ typedef std::function<bool (const Session&)> handshake_cb;
+
+ Channel(output_fn out,
+ data_cb app_data_cb,
+ alert_cb alert_cb,
+ handshake_cb hs_cb,
Session_Manager& session_manager,
RandomNumberGenerator& rng,
bool is_datagram,
@@ -240,10 +245,10 @@ class BOTAN_DLL Channel
bool m_is_datagram;
/* callbacks */
- std::function<bool (const Session&)> m_handshake_cb;
- std::function<void (const byte[], size_t)> m_data_cb;
- std::function<void (Alert, const byte[], size_t)> m_alert_cb;
- std::function<void (const byte[], size_t)> m_output_fn;
+ handshake_cb m_handshake_cb;
+ data_cb m_data_cb;
+ alert_cb m_alert_cb;
+ output_fn m_output_fn;
/* external state */
RandomNumberGenerator& m_rng;