mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-02 04:49:24 +00:00
08194af424
- Moved C++ code to cpp/ from src/raspberrypi - Related updates to Makefile, easyinstall.sh, and the github build rules - Removed the native X68k C code in src/x68k from the repo
66 lines
1.6 KiB
C++
66 lines
1.6 KiB
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator RaSCSI Reloaded
|
|
// for Raspberry Pi
|
|
//
|
|
// Copyright (C) 2021-2022 Uwe Seimet
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "protobuf_serializer.h"
|
|
#include "rascsi_interface.pb.h"
|
|
#include "rasctl_display.h"
|
|
#include <string>
|
|
|
|
using namespace rascsi_interface;
|
|
|
|
struct sockaddr_in;
|
|
|
|
class RasctlCommands
|
|
{
|
|
public:
|
|
|
|
RasctlCommands(PbCommand& command, const string& hostname, int port)
|
|
: command(command), hostname(hostname), port(port) {}
|
|
~RasctlCommands() = default;
|
|
|
|
bool Execute(const string&, const string&, const string&, const string&, const string&);
|
|
|
|
bool CommandDevicesInfo();
|
|
|
|
private:
|
|
|
|
bool CommandLogLevel(const string&);
|
|
bool CommandReserveIds(const string&);
|
|
bool CommandCreateImage(const string&);
|
|
bool CommandDeleteImage(const string&);
|
|
bool CommandRenameImage(const string&);
|
|
bool CommandCopyImage(const string&);
|
|
bool CommandDefaultImageFolder(const string&);
|
|
bool CommandDeviceInfo();
|
|
bool CommandDeviceTypesInfo();
|
|
bool CommandVersionInfo();
|
|
bool CommandServerInfo();
|
|
bool CommandDefaultImageFilesInfo();
|
|
bool CommandImageFileInfo(const string&);
|
|
bool CommandNetworkInterfacesInfo();
|
|
bool CommandLogLevelInfo();
|
|
bool CommandReservedIdsInfo();
|
|
bool CommandMappingInfo();
|
|
bool CommandOperationInfo();
|
|
bool SendCommand();
|
|
|
|
static bool ResolveHostName(const string&, sockaddr_in *);
|
|
|
|
ProtobufSerializer serializer;
|
|
PbCommand& command;
|
|
string hostname;
|
|
int port;
|
|
|
|
PbResult result;
|
|
|
|
RasctlDisplay rasctl_display;
|
|
};
|