1 /* 2 * Copyright 2018 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "fcp/secagg/client/secagg_client_completed_state.h" 18 19 #include <memory> 20 #include <string> 21 #include <utility> 22 23 #include "fcp/secagg/client/secagg_client_state.h" 24 #include "fcp/secagg/client/state_transition_listener_interface.h" 25 26 namespace fcp { 27 namespace secagg { 28 SecAggClientCompletedState(std::unique_ptr<SendToServerInterface> sender,std::unique_ptr<StateTransitionListenerInterface> transition_listener)29SecAggClientCompletedState::SecAggClientCompletedState( 30 std::unique_ptr<SendToServerInterface> sender, 31 std::unique_ptr<StateTransitionListenerInterface> transition_listener) 32 : SecAggClientState(std::move(sender), std::move(transition_listener), 33 ClientState::COMPLETED) {} 34 35 SecAggClientCompletedState::~SecAggClientCompletedState() = default; 36 IsCompletedSuccessfully() const37bool SecAggClientCompletedState::IsCompletedSuccessfully() const { 38 return true; 39 } 40 StateName() const41std::string SecAggClientCompletedState::StateName() const { 42 return "COMPLETED"; 43 } 44 45 } // namespace secagg 46 } // namespace fcp 47