2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
// Connection.h
|
2015-05-12 21:48:30 -04:00
|
|
|
// Moonlight
|
2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
// Created by Diego Waxemberg on 1/19/14.
|
2015-05-12 21:48:30 -04:00
|
|
|
// Copyright (c) 2014 Moonlight Stream. All rights reserved.
|
2014-08-31 13:13:46 -04:00
|
|
|
//
|
|
|
|
|
|
2014-10-19 00:09:47 -04:00
|
|
|
#import "VideoDecoderRenderer.h"
|
2014-10-20 19:20:50 -04:00
|
|
|
#import "StreamConfiguration.h"
|
2014-08-31 13:13:46 -04:00
|
|
|
|
2020-08-10 22:56:47 -07:00
|
|
|
#define CONN_TEST_SERVER "ios.conntest.moonlight-stream.org"
|
|
|
|
|
|
2014-10-21 14:54:10 -04:00
|
|
|
@protocol ConnectionCallbacks <NSObject>
|
2014-10-21 01:02:04 -04:00
|
|
|
|
2014-10-21 14:54:10 -04:00
|
|
|
- (void) connectionStarted;
|
2020-02-25 00:00:00 -08:00
|
|
|
- (void) connectionTerminated:(int)errorCode;
|
2016-07-31 17:10:32 -07:00
|
|
|
- (void) stageStarting:(const char*)stageName;
|
|
|
|
|
- (void) stageComplete:(const char*)stageName;
|
2020-08-10 22:56:47 -07:00
|
|
|
- (void) stageFailed:(const char*)stageName withError:(int)errorCode portTestFlags:(int)portTestFlags;
|
2014-10-23 23:41:07 -04:00
|
|
|
- (void) launchFailed:(NSString*)message;
|
2019-02-11 19:22:18 -08:00
|
|
|
- (void) rumble:(unsigned short)controllerNumber lowFreqMotor:(unsigned short)lowFreqMotor highFreqMotor:(unsigned short)highFreqMotor;
|
2019-07-23 18:43:41 -04:00
|
|
|
- (void) connectionStatusUpdate:(int)status;
|
2014-10-21 01:02:04 -04:00
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
2014-08-31 13:13:46 -04:00
|
|
|
@interface Connection : NSOperation <NSStreamDelegate>
|
|
|
|
|
|
2016-10-05 17:32:30 -07:00
|
|
|
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks;
|
2014-10-21 01:54:31 -04:00
|
|
|
-(void) terminate;
|
2014-08-31 13:13:46 -04:00
|
|
|
-(void) main;
|
|
|
|
|
|
|
|
|
|
@end
|