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 committed 2014-10-21 14:54:10 -04:00
1 parent 01a2853032
commit ea24b39fbe
7 files changed
+83 -27

No files matched your search

+10 -3
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;