Enhance the connection callback protocol to include other connection listener callbacks exposed by common. Start handling some HTTP request errors.

This commit is contained in:
Cameron Gutman
2014-10-21 14:54:10 -04:00
parent 01a2853032
commit ea24b39fbe
7 changed files with 83 additions and 27 deletions

View File

@@ -10,15 +10,22 @@
#import "VideoDecoderRenderer.h"
#import "StreamConfiguration.h"
@protocol ConTermCallback <NSObject>
@protocol ConnectionCallbacks <NSObject>
- (void) connectionTerminated;
- (void) connectionStarted;
- (void) connectionTerminated:(long)errorCode;
- (void) stageStarting:(char*)stageName;
- (void) stageComplete:(char*)stageName;
- (void) stageFailed:(char*)stageName withError:(long)errorCode;
- (void) launchFailed;
- (void) displayMessage:(char*)message;
- (void) displayTransientMessage:(char*)message;
@end
@interface Connection : NSOperation <NSStreamDelegate>
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionTerminatedCallback:(id<ConTermCallback>)callback;
-(id) initWithConfig:(StreamConfiguration*)config renderer:(VideoDecoderRenderer*)myRenderer connectionCallbacks:(id<ConnectionCallbacks>)callbacks;
-(void) terminate;
-(void) main;