util

package
v1.3.18 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Overview

* sonic-ios-bridge Connect to your iOS Devices. * Copyright (C) 2022 SonicCloudOrg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

* sonic-ios-bridge Connect to your iOS Devices. * Copyright (C) 2022 SonicCloudOrg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

* sonic-ios-bridge Connect to your iOS Devices. * Copyright (C) 2022 SonicCloudOrg * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

View Source
const (
	DownLoadTimeOut = 30 * time.Second

	RemoteInfoFilePath = baseDir + string(filepath.Separator) + "connect.txt"
)
View Source
const (
	ErrConnect     = "failed connecting to"
	ErrReadingMsg  = "failed reading msg"
	ErrSendCommand = "failed send the command"
	ErrMissingArgs = "missing arg(s)"
	ErrUnknown     = "unknown error"
	MountTips      = "you can use [sib mount] command to fix it and retry"
)

Variables

This section is empty.

Functions

func CheckMount added in v1.0.3

func CheckMount(device giDevice.Device)

func CheckRemoteConnect added in v1.3.0

func CheckRemoteConnect(ip string, port int, timeout int) (dev giDevice.Device, version interface{}, err error)

func Format

func Format(d ResultData, isFormat, isJson bool) string

func GetApplicationPID added in v1.1.9

func GetApplicationPID(device giDevice.Device, appName string) (pid int, err error)

func GetDeviceByUdId added in v1.0.7

func GetDeviceByUdId(udId string) (device giDevice.Device)

func GetDeviceVersion added in v1.2.1

func GetDeviceVersion(device giDevice.Device) string

func InitLogger added in v1.3.16

func InitLogger(strIntLevel string)

func NewErrorPrint

func NewErrorPrint(t string, msg string, err error) error

func ReadRemote added in v1.3.0

func ReadRemote() (remoteDevList map[string]giDevice.Device, err error)

func SetLogLevel added in v1.3.18

func SetLogLevel(strIntLevel string)

func StartProxy added in v1.3.0

func StartProxy() func(listener net.Listener, port int, device giDevice.Device)

func UsbmuxListen added in v1.3.16

func UsbmuxListen(cb func(gidevice *giDevice.Device, device *entity.Device, e error, cancelFunc func())) (func(), error)

Types

type LogrusWriter added in v1.3.18

type LogrusWriter int

********* work around to this problem ********* https://github.com/google/gousb/issues/87#issuecomment-1100956460

func (LogrusWriter) Write added in v1.3.18

func (LogrusWriter) Write(data []byte) (int, error)

type ResultData

type ResultData interface {
	ToJson() string
	ToString() string
	ToFormat() string
}

Jump to

Keyboard shortcuts

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