Program Listing for File target-controller.h
↰ Return to documentation for file (include\injector\target-controller.h
)
/******************************************************************************
Copyright 2019 - 2020 Intel Corporation.
This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.
This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.
******************************************************************************/
#pragma once
#include "injector/types.h"
#include <cstdint>
namespace gpa {
namespace system {
class Environment;
} // namespace system
namespace injector {
class TargetController
{
public:
TargetController();
virtual ~TargetController();
virtual bool Launch(TargetLaunchProperties const& launchProperties) = 0;
virtual void WaitUntilComplete() = 0;
virtual void Terminate() = 0;
virtual uint32_t Pid() const;
virtual int32_t Code() const;
virtual InjectionResult Result() const;
virtual InjectionStatus Status() const;
virtual char const* const* Errors() const = 0;
virtual char const* const* Warnings() const = 0;
static TargetController* Create();
static void Destroy(TargetController* controller);
protected:
uint32_t mPid;
int32_t mCode;
InjectionResult mResult;
InjectionStatus mStatus;
system::Environment* mEnvironment;
private:
TargetController(TargetController const&) = delete;
TargetController& operator=(TargetController const&) = delete;
};
} // namespace injector
} // namespace gpa