proxygen
Actions.h
Go to the documentation of this file.
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 <boost/variant.hpp>
12 #include <fizz/client/PskCache.h>
13 #include <fizz/protocol/Actions.h>
14 #include <fizz/protocol/Params.h>
15 
16 namespace fizz {
17 namespace client {
18 
19 class State;
20 
25 
35 };
36 
45  bool earlyDataAccepted{false};
46 };
47 
59 };
60 
66 struct NewCachedPsk {
68 };
69 
70 using Action = boost::variant<
80 // TODO use small_vector once we are sure it is portable.
81 using Actions = std::vector<Action>;
82 
83 namespace detail {
84 
85 template <typename... Args>
86 Actions actions(Args&&... act) {
87  Actions acts;
88  fizz::detail::addAction(acts, std::forward<Args>(act)...);
89  return acts;
90 }
91 } // namespace detail
92 } // namespace client
93 } // namespace fizz
Actions actions(Args &&...act)
Definition: Actions.h:57
folly::Function< void(State &)> MutateState
Definition: Actions.h:24
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
boost::variant< DeliverAppData, WriteToSocket, ReportHandshakeSuccess, ReportEarlyHandshakeSuccess, ReportEarlyWriteFailed, ReportError, MutateState, WaitForData, NewCachedPsk > Action
Definition: Actions.h:79
std::vector< Action > Actions
Definition: Actions.h:81
void addAction(ActionsType &)
Definition: Actions.h:67
Definition: Actions.h:16