Method

ValentChanneldownload

unstable since: 1.0

Declaration [src]

void
valent_channel_download (
  ValentChannel* channel,
  JsonNode* packet,
  GCancellable* cancellable,
  GAsyncReadyCallback callback,
  gpointer user_data
)

Description [src]

Open an auxiliary connection, usually to download data.

Implementations should use information from the payloadTransferInfo field to open a connection and wait for it to be accepted. In most cases the remote device will write data to the stream and then close it when finished.

For example, a TCP-based implementation could connect to a port in the payloadTransferInfo dictionary on the same host as the channel. When the connection is accepted the caller can perform operations on it as required.

Call valent_channel_download_finish() to get the result.

Available since: 1.0

This method completes asynchronously. Use valent_channel_download_finish() inside the GAsyncReadyCallback to obtain the result of the operation.

Parameters

packet

Type: JsonNode

A KDE Connect packet.

The data is owned by the caller of the method.
cancellable

Type: GCancellable

A GCancellable.

The argument can be NULL.
The data is owned by the caller of the method.
callback

Type: GAsyncReadyCallback

A GAsyncReadyCallback.

The argument can be NULL.
user_data

Type: gpointer

User supplied data.

The argument can be NULL.
The data is owned by the caller of the method.