File indexing completed on 2024-05-12 16:25:01

0001 /*
0002  * SPDX-FileCopyrightText: 2014 YANG Qiao <yangqiao0505@me.com>
0003  *                         2020 Weixuan Xiao <veyx.shaw@gmail.com>
0004  *                         2021 Lucas Wang <lucas.wang@tuta.io>
0005  *                         2023 Apollo Zhu <public-apollonian@outlook.com>
0006  *
0007  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0008  */
0009 
0010 // Original header below:
0011 //Copyright 27/4/14  YANG Qiao yangqiao0505@me.com
0012 //kdeconnect is distributed under two licenses.
0013 //
0014 //* The Mozilla Public License (MPL) v2.0
0015 //
0016 //or
0017 //
0018 //* The General Public License (GPL) v2.1
0019 //
0020 //----------------------------------------------------------------------
0021 //
0022 //Software distributed under these licenses is distributed on an "AS
0023 //IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
0024 //implied. See the License for the specific language governing rights
0025 //and limitations under the License.
0026 //kdeconnect is distributed under both the GPL and the MPL. The MPL
0027 //notice, reproduced below, covers the use of either of the licenses.
0028 //
0029 //----------------------------------------------------------------------
0030 
0031 #import <Foundation/Foundation.h>
0032 
0033 @class BaseLink;
0034 @class KDEFileTransferItem;
0035 
0036 NS_ASSUME_NONNULL_BEGIN
0037 
0038 @protocol LinkDelegate <NSObject>
0039 @optional
0040 - (void)onPackageReceived:(NetworkPackage *)np;
0041 - (void)onSendingPayload:(KDEFileTransferItem *)payload;
0042 - (void)onPackage:(NetworkPackage *)np sentWithPackageTag:(long)tag;
0043 - (void)onPackage:(NetworkPackage *)np sendWithPackageTag:(long)tag
0044   failedWithError:(NSError *)error;
0045 - (void)willReceivePayload:(KDEFileTransferItem *)payload
0046   totalNumOfFilesToReceive:(long)numberOfFiles;
0047 - (void)onReceivingPayload:(KDEFileTransferItem *)payload;
0048 - (void)onReceivingPayload:(KDEFileTransferItem *)payload
0049            failedWithError:(NSError *)error;
0050 - (void)onLinkDestroyed:(BaseLink *)link;
0051 @end
0052 
0053 NS_ASSUME_NONNULL_END