Documentation
¶
Overview ¶
Package client implements the local IPC client for kcdctl.
Index ¶
- type Client
- func (c *Client) Battery(deviceID string) (int, bool, error)
- func (c *Client) BroadcastStart() error
- func (c *Client) BroadcastStop() error
- func (c *Client) Call(cmd string, payload interface{}) (*ipc.Response, error)
- func (c *Client) CallMute(deviceID string) error
- func (c *Client) ClipboardPush(deviceID string) error
- func (c *Client) Connect(ip string) error
- func (c *Client) Devices() ([]device.DeviceInfo, error)
- func (c *Client) FindMyPhone(deviceID string) error
- func (c *Client) Lock(deviceID string) error
- func (c *Client) MprisAction(deviceID, player, action string) error
- func (c *Client) MprisRemote() (*ipc.MprisRemoteResponse, error)
- func (c *Client) MprisSeek(deviceID, player string, seek int64) error
- func (c *Client) MprisStatus() (*ipc.MprisStatusResponse, error)
- func (c *Client) MprisVolume(deviceID, player string, volume int) error
- func (c *Client) NotifyReply(deviceID, replyID, message string) error
- func (c *Client) Pair(deviceID string) error
- func (c *Client) PairListen() (*ipc.PairListenResult, error)
- func (c *Client) Ping(deviceID string) error
- func (c *Client) RunExec(deviceID string, key string) error
- func (c *Client) RunList(deviceID string) error
- func (c *Client) SendSMS(deviceID, phoneNumber, message string) error
- func (c *Client) SftpInfo(deviceID string) (*ipc.SftpInfoResponse, error)
- func (c *Client) SftpMount(deviceID string) error
- func (c *Client) SftpMountLocal(deviceID string) (string, error)
- func (c *Client) SftpUnmount(deviceID string) error
- func (c *Client) SftpVolumes(deviceID string) ([]ipc.StorageVolumeResponse, error)
- func (c *Client) ShareFile(deviceID string, filePath string) error
- func (c *Client) SmsRequestAttachment(deviceID string, partID int64, uniqueIdentifier string) error
- func (c *Client) SmsRequestConversation(deviceID string, threadID int64) error
- func (c *Client) SmsRequestConversations(deviceID string) error
- func (c *Client) Status() (*ipc.StatusResponse, error)
- func (c *Client) Unlock(deviceID string) error
- func (c *Client) Unpair(deviceID string) error
- func (c *Client) Watch(ctx context.Context, filter []string, ch chan<- events.Event) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client connects to the kcd daemon via Unix socket.
func (*Client) BroadcastStart ¶ added in v1.10.0
BroadcastStart asks the daemon to begin UDP/mDNS broadcasting.
func (*Client) BroadcastStop ¶ added in v1.10.0
BroadcastStop asks the daemon to stop UDP/mDNS broadcasting.
func (*Client) CallMute ¶
CallMute requests the daemon to mute an incoming call on the remote device.
func (*Client) ClipboardPush ¶
ClipboardPush triggers an outgoing clipboard sync from desktop to device.
func (*Client) Connect ¶ added in v1.0.1
Connect requests the daemon to manually connect to a device by IP.
func (*Client) Devices ¶
func (c *Client) Devices() ([]device.DeviceInfo, error)
Devices queries the daemon for all known devices.
func (*Client) FindMyPhone ¶
FindMyPhone requests the remote device to ring loudly.
func (*Client) MprisAction ¶ added in v1.11.0
MprisAction sends a media control action to a remote device. deviceID may be empty to auto-select the first connected device.
func (*Client) MprisRemote ¶ added in v1.11.0
func (c *Client) MprisRemote() (*ipc.MprisRemoteResponse, error)
MprisRemote returns the list of remote MPRIS players with their current state.
func (*Client) MprisSeek ¶ added in v1.11.0
MprisSeek sends a seek command to a remote device's player.
func (*Client) MprisStatus ¶ added in v1.10.0
func (c *Client) MprisStatus() (*ipc.MprisStatusResponse, error)
MprisStatus returns MPRIS plugin debug information.
func (*Client) MprisVolume ¶ added in v1.11.0
MprisVolume sends a volume change to a remote device's player.
func (*Client) NotifyReply ¶
NotifyReply requests the daemon to send a reply to an Android notification.
func (*Client) PairListen ¶ added in v1.10.0
func (c *Client) PairListen() (*ipc.PairListenResult, error)
PairListen enters listen mode: waits for an incoming pair request, auto-accepts it, and returns the paired device info. Blocks up to 60 seconds.
func (*Client) SftpInfo ¶ added in v1.10.0
func (c *Client) SftpInfo(deviceID string) (*ipc.SftpInfoResponse, error)
SftpInfo returns the cached SFTP connection details for a device.
func (*Client) SftpMount ¶
SftpMount requests the daemon to initiate an SFTP connection to the remote device.
func (*Client) SftpMountLocal ¶
SftpMountLocal requests the daemon to request SFTP credentials from the phone, wait for the response, mount via sshfs, and open the result in the default file manager. Returns the local browse path on success.
func (*Client) SftpUnmount ¶ added in v1.0.5
SftpUnmount cleanly unmounts a previously mounted phone filesystem.
func (*Client) SftpVolumes ¶ added in v1.10.0
func (c *Client) SftpVolumes(deviceID string) ([]ipc.StorageVolumeResponse, error)
SftpVolumes returns the list of available storage volumes from a device.
func (*Client) SmsRequestAttachment ¶ added in v1.11.0
SmsRequestAttachment asks a device to send an MMS attachment file.
func (*Client) SmsRequestConversation ¶ added in v1.11.0
SmsRequestConversation asks a device to send messages from a specific thread.
func (*Client) SmsRequestConversations ¶ added in v1.11.0
SmsRequestConversations asks a device to send a list of all SMS conversations.
func (*Client) Status ¶ added in v1.0.5
func (c *Client) Status() (*ipc.StatusResponse, error)
Status returns runtime status information from the daemon.