1 /*
2  *  Copyright (c) 2018-present, Facebook, Inc.
3  *  All rights reserved.
4  *
5  *  This source code is licensed under the BSD-style license found in the
6  *  LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <folly/Range.h>
12 
13 namespace fizz {
14 
15 enum class Event {
16   ClientHello,
17   ServerHello,
18   EndOfEarlyData,
19   HelloRetryRequest,
20   EncryptedExtensions,
21   CertificateRequest,
22   Certificate,
23   CompressedCertificate,
24   CertificateVerify,
25   Finished,
26   NewSessionTicket,
27   KeyUpdate,
28   Alert,
29   Accept,
30   Connect,
31   AppData,
32   EarlyAppWrite,
33   AppWrite,
34   AppClose,
35   WriteNewSessionTicket,
36   CloseNotify,
37   NUM_EVENTS
38 };
39 
40 template <Event e>
41 struct EventType {
42   static constexpr Event event = e;
43 };
44 
45 folly::StringPiece toString(Event event);
46 } // namespace fizz
47