transport

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package transport handles sending and receiving using wormhole-william

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	wormhole.Client

	// Notification holds the settings value for if we have notifications enabled or not.
	Notifications bool

	// OverwriteExisting holds the settings value for if we should overwrite already existing files.
	OverwriteExisting bool

	// DownloadPath holds the download path used for saving received files.
	DownloadPath string

	// Defines if we should pass a custom code or let wormhole-william generate on for us.
	CustomCode bool
	// contains filtered or unexported fields
}

Client defines the client for handling sending and receiving using wormhole-william

func NewClient

func NewClient(app fyne.App) *Client

NewClient returns a new client for sending and receiving using wormhole-william

func (*Client) CompleteRecvCode added in v3.1.0

func (c *Client) CompleteRecvCode(toComplete string) []string

CompleteCode returns completion suggestions for the receiver code.

func (*Client) NewDirSend

func (c *Client) NewDirSend(dir fyne.ListableURI, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)

NewDirSend takes a listable URI and sends it using wormhole-william.

func (*Client) NewFileSend

func (c *Client) NewFileSend(file fyne.URIReadCloser, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)

NewFileSend takes the chosen file and sends it using wormhole-william.

func (*Client) NewReceive

func (c *Client) NewReceive(code string, pathname chan string, progress *util.ProgressBar) (err error)

NewReceive runs a receive using wormhole-william and handles types accordingly.

func (*Client) NewTextSend

func (c *Client) NewTextSend(text string, progress wormhole.SendOption, code string) (string, chan wormhole.SendResult, error)

NewTextSend takes a text input and sends the text using wormhole-william.

func (*Client) ShowNotification

func (c *Client) ShowNotification(title, content string)

ShowNotification sends a notification if c.Notifications is true.

func (*Client) ShowTextSendWindow

func (c *Client) ShowTextSendWindow() chan string

ShowTextSendWindow opens a new window for setting up text to send.

Directories

Path Synopsis
Package bridge serves as a bridge between the transport backend and the Fyne ui
Package bridge serves as a bridge between the transport backend and the Fyne ui

Jump to

Keyboard shortcuts

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