m4

package
v0.0.0-...-e9375c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: GPL-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PerformHttpAction

func PerformHttpAction(req *http.Request) error

func UniversalBase

func UniversalBase(filePath string) string

Types

type M4Client

type M4Client struct {
	IPClient string
	// contains filtered or unexported fields
}

M4Client M4 http client with action, address ip client and Cpc file path

func (*M4Client) ChangeDirectory

func (m *M4Client) ChangeDirectory(remotedirectory string) error

func (*M4Client) CurrentDirectory

func (m *M4Client) CurrentDirectory() (string, error)

func (*M4Client) DeleteRom

func (m *M4Client) DeleteRom(romNumber int) error

func (*M4Client) Download

func (m *M4Client) Download(remotePath string) error

func (*M4Client) DownloadContent

func (m *M4Client) DownloadContent(remotepath string) ([]byte, error)

func (*M4Client) Execute

func (m *M4Client) Execute(cpcfile string) error

func (*M4Client) ExecuteCmd

func (m *M4Client) ExecuteCmd(cmd, cpcfile string) error

func (*M4Client) GetCache

func (m *M4Client) GetCache(remotePath string) (string, error)

func (*M4Client) GetDir

func (m *M4Client) GetDir(remotepath string) (*M4Dir, error)

func (*M4Client) Ls

func (m *M4Client) Ls(remoteDirectory string) (string, error)

./m4client -host 192.168.1.20 -ls Jeux Remote path (Jeux/ Ishido.dsk,1,190K Doomsday_Lost_Echoes_v1.0,0,0 GalacticTomb_128K,0,0 ImperialMahjong,0,0 Orion Prime (FR) (Cargosoft),0,0 The Shadows Of Sergoth v1.0 (F,UK,S) (128K) (Face A) (2018) [Original].dsk,1,190K The Shadows Of Sergoth v1.0 (F,UK,S) (128K) (Face B) (2018) [Original].dsk,1,190K Ishido,0,0 ) host (192.168.1.20)

func (*M4Client) MakeDirectory

func (m *M4Client) MakeDirectory(remotedirectory string) error

func (*M4Client) PauseCpc

func (m *M4Client) PauseCpc() error

func (*M4Client) Remove

func (m *M4Client) Remove(cpcfile string) error

func (*M4Client) ResetCpc

func (m *M4Client) ResetCpc() error

func (*M4Client) ResetM4

func (m *M4Client) ResetM4() error

func (*M4Client) Run

func (m *M4Client) Run(cpcfile string) error

func (*M4Client) Start

func (m *M4Client) Start() error

func (*M4Client) Upload

func (m *M4Client) Upload(remotePath, localPath string) error

func (*M4Client) UploadDirectoryContent

func (m *M4Client) UploadDirectoryContent(remotePath, localDirectoryPath string) error

func (*M4Client) UploadRom

func (m *M4Client) UploadRom(romFilpath, romName string, romId int) error

func (*M4Client) Url

func (m *M4Client) Url() string

type M4Dir

type M4Dir struct {
	CurrentPath string
	Nodes       []M4Node
}

func NewM4Dir

func NewM4Dir(content string) *M4Dir

type M4HttpAction

type M4HttpAction string

M4HttpAction is struct for url complement according to the action

const (
	M4Reset  M4HttpAction = "config.cgi?mres"
	CpcReset M4HttpAction = "config.cgi?cres"
	Start    M4HttpAction = "config.cgi?cctr"
	Mkdir    M4HttpAction = "config.cgi?mkdir="
	Ls       M4HttpAction = "config.cgi?ls="
	Cd       M4HttpAction = "config.cgi?cd="
	Rm       M4HttpAction = "config.cgi?rm="
	Execute  M4HttpAction = "config.cgi?run2="
	Run      M4HttpAction = "config.cgi?run="
	Pause    M4HttpAction = "config.cgi?chlt"
	Upload   M4HttpAction = "upload.html"
	Download M4HttpAction = "sd/"
	Rom      M4HttpAction = "roms.shtml"
)

M4 Wifi card http possibles actions

type M4Node

type M4Node struct {
	Name        string
	IsDirectory bool
	Size        string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL