transport

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: GPL-3.0 Imports: 13 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

func UserDownloadsFolder

func UserDownloadsFolder() string

UserDownloadsFolder returns the downloads folder corresponding to the current user.

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
	// contains filtered or unexported fields
}

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

func NewClient

func NewClient() *Client

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

func (*Client) NewDirSend

func (c *Client) NewDirSend(dir fyne.ListableURI, progress wormhole.SendOption) (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) (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) (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) (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