entity

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: 6 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/>.

* 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/>.

* 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 (
	AUTOMATION          WebInspectorPageType = "WIRTypeAutomation"
	ITML                WebInspectorPageType = "WIRTypeITML"
	JAVASCRIPT          WebInspectorPageType = "WIRTypeJavaScript"
	PAGE                WebInspectorPageType = "WIRTypePage"
	SERVICE_WORKER      WebInspectorPageType = "WIRTypeServiceWorker"
	WEB                 WebInspectorPageType = "WIRTypeWeb"
	WEB_PAGE            WebInspectorPageType = "WIRTypeWebPage"
	AUTOMATICALLY_PAUSE WebInspectorPageType = "WIRAutomaticallyPause"

	NOT_AVAILABLE       AutomationAvailabilityType = "WIRAutomationAvailabilityNotAvailable"
	AVAILABLE           AutomationAvailabilityType = "WIRAutomationAvailabilityAvailable"
	AvailabilityUNKNOWN AutomationAvailabilityType = "WIRAutomationAvailabilityUnknown"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppList

type AppList struct {
	ApplicationList []Application `json:"appList"`
}

func (AppList) ToFormat

func (appList AppList) ToFormat() string

func (AppList) ToJson

func (appList AppList) ToJson() string

func (AppList) ToString

func (appList AppList) ToString() string

type Application

type Application struct {
	CFBundleShortVersionString string `json:"shortVersion,omitempty"`
	CFBundleVersion            string `json:"version"`
	CFBundleDisplayName        string `json:"name"`
	CFBundleIdentifier         string `json:"bundleId"`
	IconBase64                 string `json:"iconBase64,omitempty"`
}

type AutomationAvailabilityType added in v1.2.1

type AutomationAvailabilityType string

type Battery added in v1.0.3

type Battery struct {
	Serial                string      `json:"Serial,omitempty"`
	CurrentCapacity       interface{} `json:"CurrentCapacity,omitempty"`
	CycleCount            interface{} `json:"CycleCount"`
	AbsoluteCapacity      interface{} `json:"AbsoluteCapacity"`
	NominalChargeCapacity interface{} `json:"NominalChargeCapacity"`
	DesignCapacity        interface{} `json:"DesignCapacity"`
	Voltage               interface{} `json:"Voltage"`
	BootVoltage           interface{} `json:"BootVoltage"`
	AdapterDetailsVoltage interface{} `json:"AdapterDetailsVoltage,omitempty"`
	AdapterDetailsWatts   interface{} `json:"AdapterDetailsWatts,omitempty"`
	InstantAmperage       interface{} `json:"InstantAmperage"`
	Temperature           interface{} `json:"Temperature"`
}

func (*Battery) AnalyzeBatteryData added in v1.3.1

func (battery *Battery) AnalyzeBatteryData(batteryData map[string]interface{}) error

func (Battery) ToFormat added in v1.1.1

func (battery Battery) ToFormat() string

func (Battery) ToJson added in v1.1.1

func (battery Battery) ToJson() string

func (Battery) ToString added in v1.1.1

func (battery Battery) ToString() string

type BatteryList added in v1.0.3

type BatteryList struct {
	DeviceBatteryInfo map[string]Battery
}

func (*BatteryList) Put added in v1.3.1

func (battery *BatteryList) Put(key string, value Battery)

func (BatteryList) ToFormat added in v1.0.3

func (battery BatteryList) ToFormat() string

func (BatteryList) ToJson added in v1.0.3

func (battery BatteryList) ToJson() string

func (BatteryList) ToString added in v1.0.3

func (battery BatteryList) ToString() string

type BundleItem added in v1.2.2

type BundleItem struct {
	PID      string    `json:"pid,omitempty"`
	BundleId string    `json:"bundleId,omitempty"`
	Name     string    `json:"name,omitempty"`
	Pages    []UrlItem `json:"pages,omitempty"`
}

type DevMode added in v1.3.16

type DevMode struct {
	Device
	DevModeStatus string `json:"status,omitempty"`
}

func (DevMode) CanCheck added in v1.3.16

func (devmode DevMode) CanCheck() (bool, error)

type Device

type Device struct {
	RemoteAddr      string       `json:"remoteAddr"`
	DeviceID        int          `json:"deviceId"`
	ConnectionSpeed int          `json:"connectionSpeed"`
	ConnectionType  string       `json:"connectionType"`
	LocationID      int          `json:"locationId"`
	ProductID       int          `json:"productId"`
	SerialNumber    string       `json:"serialNumber"`
	Status          string       `json:"status"`
	DeviceDetail    DeviceDetail `json:"deviceDetail"`
}

func (*Device) GetStatus

func (device *Device) GetStatus() string

func (Device) ToFormat

func (device Device) ToFormat() string

func (Device) ToJson

func (device Device) ToJson() string

func (Device) ToString

func (device Device) ToString() string

type DeviceDetail

type DeviceDetail struct {
	GenerationName            string `json:"generationName,omitempty"`
	DeviceName                string `json:"deviceName,omitempty"`
	DeviceColor               string `json:"deviceColor,omitempty"`
	DeviceClass               string `json:"deviceClass,omitempty"`
	ProductVersion            string `json:"productVersion,omitempty"`
	ProductType               string `json:"productType,omitempty"`
	ProductName               string `json:"productName,omitempty"`
	PasswordProtected         bool   `json:"passwordProtected,omitempty"`
	ModelNumber               string `json:"modelNumber,omitempty"`
	SerialNumber              string `json:"serialNumber,omitempty"`
	SIMStatus                 string `json:"simStatus,omitempty"`
	PhoneNumber               string `json:"phoneNumber,omitempty"`
	CPUArchitecture           string `json:"cpuArchitecture,omitempty"`
	ProtocolVersion           string `json:"protocolVersion,omitempty"`
	RegionInfo                string `json:"regionInfo,omitempty"`
	TelephonyCapability       bool   `json:"telephonyCapability,omitempty"`
	TimeZone                  string `json:"timeZone,omitempty"`
	UniqueDeviceID            string `json:"uniqueDeviceID,omitempty"`
	WiFiAddress               string `json:"wifiAddress,omitempty"`
	WirelessBoardSerialNumber string `json:"wirelessBoardSerialNumber,omitempty"`
	BluetoothAddress          string `json:"bluetoothAddress,omitempty"`
	BuildVersion              string `json:"buildVersion,omitempty"`
}

func GetDetail

func GetDetail(device giDevice.Device) (*DeviceDetail, error)

func (*DeviceDetail) GetGenerationName

func (deviceDetail *DeviceDetail) GetGenerationName() string

type DeviceList

type DeviceList struct {
	DeviceList []Device `json:"deviceList"`
}

func (DeviceList) ToFormat

func (deviceList DeviceList) ToFormat() string

func (DeviceList) ToJson

func (deviceList DeviceList) ToJson() string

func (DeviceList) ToString

func (deviceList DeviceList) ToString() string

type NetworkInfo added in v1.2.6

type NetworkInfo struct {
	Mac  string `json:"mac"`
	IPv4 string `json:"ipv4"`
	IPv6 string `json:"ipv6"`
}

func (NetworkInfo) ToFormat added in v1.2.6

func (networkInfo NetworkInfo) ToFormat() string

func (NetworkInfo) ToJson added in v1.2.6

func (networkInfo NetworkInfo) ToJson() string

func (NetworkInfo) ToString added in v1.2.6

func (networkInfo NetworkInfo) ToString() string

type PerfData added in v1.2.6

type PerfData struct {
	PerfDataBytes []byte
}

func (*PerfData) ToFormat added in v1.2.6

func (p *PerfData) ToFormat() string

func (*PerfData) ToJson added in v1.2.6

func (p *PerfData) ToJson() string

func (*PerfData) ToString added in v1.2.6

func (p *PerfData) ToString() string

type RemoteInfo added in v1.3.0

type RemoteInfo struct {
	Host *string
	Port *int
}

type UrlItem added in v1.2.1

type UrlItem struct {
	Description          string  `json:"description"`
	ID                   string  `json:"id"`
	Port                 int     `json:"port"`
	Title                *string `json:"title"`
	Type                 string  `json:"type"`
	Url                  *string `json:"url"`
	WebSocketDebuggerUrl string  `json:"webSocketDebuggerUrl"`
	DevtoolsFrontendUrl  string  `json:"devtoolsFrontendUrl"`
}

type WIRArgument added in v1.2.1

type WIRArgument struct {
	WIRMessageDataKey          []byte                     `plist:"WIRMessageDataKey,omitempty"`
	WIRConnectionIdentifierKey *string                    `plist:"WIRConnectionIdentifierKey,omitempty"`
	WIRPageIdentifierKey       *int                       `plist:"WIRPageIdentifierKey,omitempty"`
	WIRIndicateEnabledKey      *bool                      `plist:"WIRIndicateEnabledKey,omitempty"`
	WIRSessionIdentifierKey    *string                    `plist:"WIRSessionIdentifierKey,omitempty"`
	WIRSenderKey               *string                    `plist:"WIRSenderKey,omitempty"`
	WIRAutomaticallyPause      *bool                      `plist:"WIRAutomaticallyPause,omitempty"`
	WIRSocketDataKey           []byte                     `plist:"WIRSocketDataKey,omitempty"`
	WIRSessionCapabilitiesKey  *WIRSessionCapabilitiesKey `plist:"WIRSessionCapabilitiesKey,omitempty"`
	// 单个appInfo情况下
	WIRApplicationIdentifierKey       *string                    `plist:"WIRApplicationIdentifierKey,omitempty"`
	WIRApplicationBundleIdentifierKey *string                    `plist:"WIRApplicationBundleIdentifierKey,omitempty"`
	WIRApplicationNameKey             *string                    `plist:"WIRApplicationNameKey,omitempty"`
	WIRAutomationAvailabilityKey      AutomationAvailabilityType `plist:"WIRAutomationAvailabilityKey,omitempty"`
	WIRIsApplicationActiveKey         *int                       `plist:"WIRIsApplicationActiveKey,omitempty"`
	WIRIsApplicationProxyKey          *bool                      `plist:"WIRIsApplicationProxyKey,omitempty"`
	WIRIsApplicationReadyKey          *bool                      `plist:"WIRIsApplicationReadyKey,omitempty"`
	WIRHostApplicationIdentifierKey   *string                    `plist:"WIRHostApplicationIdentifierKey,omitempty"`
	// 多个appInfo情况下
	WIRApplicationDictionaryKey map[string]WIRArgument      `plist:"WIRApplicationDictionaryKey,omitempty"`
	WIRListingKey               map[string]WebInspectorPage `plist:"WIRListingKey,omitempty"`
}

type WIRMessageStruct added in v1.2.1

type WIRMessageStruct struct {
	Argument WIRArgument              `plist:"__argument"`
	Selector WebInspectorSelectorEnum `plist:"__selector"`
}

type WIRSessionCapabilitiesKey added in v1.2.1

type WIRSessionCapabilitiesKey struct {
	AllowInsecureMediaCapture    bool `plist:"org.webkit.webdriver.webrtc.allow-insecure-media-capture"`
	SppressIceCandidateFiltering bool `plist:"org.webkit.webdriver.webrtc.suppress-ice-candidate-filtering"`
}

type WebInspectorApplication added in v1.2.1

type WebInspectorApplication struct {
	ApplicationID           *string `plist:"WIRApplicationIdentifierKey,omitempty"`
	ApplicationBundle       *string `plist:"WIRApplicationBundleIdentifierKey,omitempty"`
	ApplicationPID          *int
	ApplicationName         *string                    `plist:"WIRApplicationNameKey,omitempty"`
	ApplicationAvailability AutomationAvailabilityType `plist:"WIRAutomationAvailabilityKey,omitempty"`
	ApplicationActive       *int                       `plist:"WIRIsApplicationActiveKey,omitempty"`
	ApplicationProxy        *bool                      `plist:"WIRIsApplicationProxyKey,omitempty"`
	ApplicationReady        *bool                      `plist:"WIRIsApplicationReadyKey,omitempty"`
	ApplicationHost         *string                    `plist:"WIRHostApplicationIdentifierKey,omitempty"`
}

type WebInspectorPage added in v1.2.1

type WebInspectorPage struct {
	PageID                     *int                 `plist:"WIRPageIdentifierKey,omitempty"`
	PageType                   WebInspectorPageType `plist:"WIRTypeKey,omitempty"`
	PageWebUrl                 *string              `plist:"WIRURLKey,omitempty"`
	PageWebTitle               *string              `plist:"WIRTitleKey,omitempty"`
	PageAutoationIsPairedKey   *bool                `plist:"WIRAutomationTargetIsPairedKey,omitempty"`
	PageAutomationName         *string              `plist:"WIRAutomationTargetNameKey,omitempty"`
	PageAutomationVersion      *string              `plist:"WIRAutomationTargetVersionKey,omitempty"`
	PageAutomationSessionID    *string              `plist:"WIRSessionIdentifierKey,omitempty"`
	PageAutomationConnectionID *string              `plist:"WIRConnectionIdentifierKey,omitempty"`
}

type WebInspectorPageType added in v1.2.1

type WebInspectorPageType string

type WebInspectorSelectorEnum added in v1.2.1

type WebInspectorSelectorEnum string
const (
	// 发送消息类型
	SEND_REPORT_ID                WebInspectorSelectorEnum = "_rpc_reportIdentifier:"
	SEND_GET_CONNECT_APP          WebInspectorSelectorEnum = "_rpc_getConnectedApplications:"
	SEND_FORWARD_GET_LISTING      WebInspectorSelectorEnum = "_rpc_forwardGetListing:"
	SEND_FORWARD_SOCKET_SETUP     WebInspectorSelectorEnum = "_rpc_forwardSocketSetup:"
	SEND_FORWARD_SOCKET_DATA      WebInspectorSelectorEnum = "_rpc_forwardSocketData:"
	SEND_FORWARD_INDICATE_WEBVIEW WebInspectorSelectorEnum = "_rpc_forwardIndicateWebView:"
	SEND_FORWARD_DID_CLOSE        WebInspectorSelectorEnum = "_rpc_forwardDidClose:"

	REQUEST_APPLICATION_LAUNCH WebInspectorSelectorEnum = "_rpc_requestApplicationLaunch"

	// 接收消息类型
	ON_REPORT_CURRENT_STATE      WebInspectorSelectorEnum = "_rpc_reportCurrentState:"
	ON_REPORT_SETUP              WebInspectorSelectorEnum = "_rpc_reportSetup:"
	ON_REPORT_DRIVER_LIST        WebInspectorSelectorEnum = "_rpc_reportConnectedDriverList:"
	ON_REPORT_CONNECTED_APP_LIST WebInspectorSelectorEnum = "_rpc_reportConnectedApplicationList:"
	ON_APP_CONNECTED             WebInspectorSelectorEnum = "_rpc_applicationConnected:"
	ON_APP_UPDATED               WebInspectorSelectorEnum = "_rpc_applicationUpdated:"
	ON_APP_SENT_LISTING          WebInspectorSelectorEnum = "_rpc_applicationSentListing:"
	ON_APP_SENT_DATA             WebInspectorSelectorEnum = "_rpc_applicationSentData:"
	ON_APP_DISCONNECTED          WebInspectorSelectorEnum = "_rpc_applicationDisconnected:"
)

Jump to

Keyboard shortcuts

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