]> git.ipfire.org Git - thirdparty/squid.git/blob - src/security/EncryptorAnswer.h
MemBuf implements Packable interface
[thirdparty/squid.git] / src / security / EncryptorAnswer.h
1 /*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_SECURITY_ENCRYPTORANSWER_H
10 #define SQUID_SECURITY_ENCRYPTORANSWER_H
11
12 #include "base/CbcPointer.h"
13 #include "comm/forward.h"
14
15 class ErrorState;
16
17 namespace Security {
18
19 /// Peer encrypted connection setup results (supplied via a callback).
20 /// The connection to peer was secured if and only if the error member is nil.
21 class EncryptorAnswer
22 {
23 public:
24 ~EncryptorAnswer(); ///< deletes error if it is still set
25 Comm::ConnectionPointer conn; ///< peer connection (secured on success)
26
27 /// answer recepients must clear the error member in order to keep its info
28 /// XXX: We should refcount ErrorState instead of cbdata-protecting it.
29 CbcPointer<ErrorState> error; ///< problem details (nil on success)
30 };
31
32 std::ostream &operator <<(std::ostream &, const Security::EncryptorAnswer &);
33
34 } // namepace Security
35
36 #endif /* SQUID_SECURITY_ENCRYPTORANSWER_H */
37