diff options
author | Ingela Anderton Andin <[email protected]> | 2011-12-01 12:53:04 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2011-12-01 12:53:04 +0100 |
commit | 2b8deca534abb8e329cefd354e351d6f05b1f933 (patch) | |
tree | 1957b81b6d8d74af46500b754d986d364fa8b12c /lib/ssl/src/ssl_session_cache_api.erl | |
parent | 40653b86e7812fcbcdc73f2becdfbcc43f8814e7 (diff) | |
download | otp-2b8deca534abb8e329cefd354e351d6f05b1f933.tar.gz otp-2b8deca534abb8e329cefd354e351d6f05b1f933.tar.bz2 otp-2b8deca534abb8e329cefd354e351d6f05b1f933.zip |
Callback specs now handled by -callback directive in the behaviour module.
Diffstat (limited to 'lib/ssl/src/ssl_session_cache_api.erl')
-rw-r--r-- | lib/ssl/src/ssl_session_cache_api.erl | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/ssl/src/ssl_session_cache_api.erl b/lib/ssl/src/ssl_session_cache_api.erl index f8416bf327..f2b22b0f1b 100644 --- a/lib/ssl/src/ssl_session_cache_api.erl +++ b/lib/ssl/src/ssl_session_cache_api.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2008-2010. All Rights Reserved. +%% Copyright Ericsson AB 2008-2011. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -20,18 +20,15 @@ %% -module(ssl_session_cache_api). +-include("ssl_handshake.hrl"). +-include("ssl_internal.hrl"). --export([behaviour_info/1]). +-type key() :: {{host(), inet:port_number()}, session_id()} | {inet:port_number(), session_id()}. -behaviour_info(callbacks) -> - [ - {init, 1}, - {terminate, 1}, - {lookup, 2}, - {update, 3}, - {delete, 2}, - {foldl, 3}, - {select_session, 2} - ]; -behaviour_info(_) -> - undefined. +-callback init(list()) -> db_handle(). +-callback terminate(db_handle()) -> any(). +-callback lookup(db_handle(), key()) -> #session{} | undefined. +-callback update(db_handle(), key(), #session{}) -> any(). +-callback delete(db_handle(), key()) -> any(). +-callback foldl(fun(), term(), db_handle()) -> term(). +-callback select_session(db_handle(), {host(), inet:port_number()} | inet:port_number()) -> [#session{}]. |