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  *
0006  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0007  */
0008 
0009 // Original header below:
0010 //Copyright 2/5/14  YANG Qiao yangqiao0505@me.com
0011 //kdeconnect is distributed under two licenses.
0012 //
0013 //* The Mozilla Public License (MPL) v2.0
0014 //
0015 //or
0016 //
0017 //* The General Public License (GPL) v2.1
0018 //
0019 //----------------------------------------------------------------------
0020 //
0021 //Software distributed under these licenses is distributed on an "AS
0022 //IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
0023 //implied. See the License for the specific language governing rights
0024 //and limitations under the License.
0025 //kdeconnect is distributed under both the GPL and the MPL. The MPL
0026 //notice, reproduced below, covers the use of either of the licenses.
0027 //
0028 //---------------------------------------------------------------------
0029 
0030 #import <Foundation/Foundation.h>
0031 #import "BaseLink.h"
0032 #import "BaseLinkProvider.h"
0033 #import "Device.h"
0034 #import "NetworkPackage.h"
0035 //#import "PluginFactory.h"
0036 //#import "deviceDelegate.h"
0037 //#import "KDE_Connect-Swift.h"
0038 //@class PluginFactory;
0039 @class BaseLink;
0040 @class Device;
0041 @class ConnectedDevicesViewModel;
0042 @class CertificateService;
0043 
0044 @interface BackgroundService : NSObject<LinkProviderDelegate, DeviceDelegate>
0045 
0046 // TODO: fix casing
0047 - (BackgroundService*) initWithconnectedDeviceViewModel:(ConnectedDevicesViewModel*)connectedDeviceViewModel certificateService:(CertificateService*) certificateService;
0048 @property(nonatomic, setter=setDevices:) NSDictionary<NSString *, Device *> *devices;
0049 @property(nonatomic, setter=setSettings:) NSDictionary<NSString *, NSData *> *settings;
0050 
0051 //+ (id) sharedInstance;
0052 
0053 - (void) startDiscovery;
0054 - (void) refreshDiscovery;
0055 - (void) stopDiscovery;
0056 - (void) pairDevice:(NSString*)deviceId;
0057 - (void) unpairDevice:(NSString*)deviceId;
0058 //- (NSArray*) getDevicePluginViews:(NSString*)deviceId viewController:(UIViewController*)vc;
0059 - (NSDictionary<NSString *, NSDictionary<NSString *, NSString *> *> *) getDevicesLists;
0060 - (void) reloadAllPlugins;
0061 
0062 - (void) onNetworkChange;
0063 @end