Revert D8932114: [sonar] Add state tracking plumbing
Differential Revision: D8932114 Original commit changeset: fb03babfe92b fbshipit-source-id: a6a372a4115d69b5419a8c9924b333e7c163497b
This commit is contained in:
committed by
Facebook Github Bot
parent
e82fd6371d
commit
410e6d14c8
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
class SonarStep;
|
||||
class SonarStateUpdateListener;
|
||||
|
||||
class SonarState {
|
||||
friend SonarStep;
|
||||
|
||||
public:
|
||||
SonarState();
|
||||
void setUpdateListener(std::shared_ptr<SonarStateUpdateListener>);
|
||||
std::string getState();
|
||||
|
||||
/* To record a state update, call start() with the name of the step to get a
|
||||
SonarStep object. Call complete on this to register it successful,
|
||||
the absense of the completion call when it is destructed will register as a
|
||||
step failure. */
|
||||
std::shared_ptr<SonarStep> start(std::string step);
|
||||
|
||||
private:
|
||||
void success(std::string);
|
||||
void failed(std::string, std::string);
|
||||
void started(std::string);
|
||||
std::shared_ptr<SonarStateUpdateListener> mListener = nullptr;
|
||||
std::string stateUpdates;
|
||||
};
|
||||
Reference in New Issue
Block a user