SKYLINKConnectionFileTransferDelegate Protocol Reference

Conforms to NSObject
Declared in SKYLINKConnection.h
SKYLINKProtocol.h

Overview

@protocol

Delegate methods are called on the main thread.

– connection:didReceiveFileTransferRequest:isPublic:remotePeerId:

Called upon receiving a request to accept a File from remote Peer.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveFileTransferRequest:(null_unspecified NSString *)fileName isPublic:(BOOL)isPublic remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

fileName

The name of the file in request.

isPublic

accessibility of file.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didReceiveFileTransferResponse:fileName:remotePeerId:

Called upon receiving a response to our request to send a File to remote Peer.

- (void)connection:(nonnull SKYLINKConnection *)connection didReceiveFileTransferResponse:(BOOL)wasAccepted fileName:(null_unspecified NSString *)fileName remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

wasAccepted

Flag to specify whether the request was accepted.

fileName

The name of the file in request.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didDropFileTransfer:message:isExplicit:remotePeerId:

Called when receive signal that File transfer was stopped before completing.

- (void)connection:(nonnull SKYLINKConnection *)connection didDropFileTransfer:(null_unspecified NSString *)fileName message:(null_unspecified NSString *)message isExplicit:(BOOL)isExplicit remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

fileName

The name of the file in request.

message

The message specifying reason for the file transfer drop.

isExplicit

Flag to specify whether the transfer was halted explicity by the sender.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didUpdateFileTransferSendingProgress:fileName:remotePeerId:

Called upon every file transfer progress update.

- (void)connection:(nonnull SKYLINKConnection *)connection didUpdateFileTransferSendingProgress:(CGFloat)percentage fileName:(null_unspecified NSString *)fileName remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

percentage

The perccentage representing the progress of the transfer (CGFloat from 0 to 1).

fileName

The name of the file in transmission.

remotePeerId

The unique id of the peer thie file is sent to or received from.

Discussion

Alternatively, if many of your objects need to get these informations, it can register to the notification with identifier: @“SKYLINKFileProgress”.

Declared In

SKYLINKConnection.h

– connection:didUpdateFileTransferReceivingProgress:fileName:remotePeerId:

Called upon every file transfer progress update.

- (void)connection:(nonnull SKYLINKConnection *)connection didUpdateFileTransferReceivingProgress:(CGFloat)percentage fileName:(null_unspecified NSString *)fileName remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

percentage

The perccentage representing the progress of the transfer (CGFloat from 0 to 1).

fileName

The name of the file in transmission.

remotePeerId

The unique id of the peer thie file is sent to or received from.

Discussion

Alternatively, if many of your objects need to get these informations, it can register to the notification with identifier: @“SKYLINKFileProgress”.

Declared In

SKYLINKConnection.h

– connection:didCompleteFileTransferSending:remotePeerId:

Called upon receiving signal that our sending of a File to remote Peer is complete.

- (void)connection:(nonnull SKYLINKConnection *)connection didCompleteFileTransferSending:(null_unspecified NSString *)fileName remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object.

fileName

The name of the file in request.

remotePeerId

The unique id of the peer.

Declared In

SKYLINKConnection.h

– connection:didCompleteFileTransferReceiving:fileData:fileSavePath:remotePeerId:

Called upon receiving signal that our receipt of a File from remote Peer is complete

- (void)connection:(nonnull SKYLINKConnection *)connection didCompleteFileTransferReceiving:(null_unspecified NSString *)fileName fileData:(null_unspecified NSData *)fileData fileSavePath:(null_unspecified NSString *)fileSavePath remotePeerId:(null_unspecified NSString *)remotePeerId

Parameters

connection

The underlying connection object

fileName

The name of the file in request

fileData

The data of the received file

fileSavePath

The path where the file is saved, it is in the sandbox /tmp folder

remotePeerId

The unique id of the peer

Declared In

SKYLINKConnection.h