Use new_ui branch version of CallDelegate

This commit is contained in:
Yann Diorcet 2012-08-20 11:53:23 +02:00
parent 9b92d063c0
commit bf08bfbe62
2 changed files with 7 additions and 8 deletions

View file

@ -22,21 +22,19 @@
enum CallDelegateType {
CD_UNDEFINED = 0,
CD_NEW_CALL,
CD_ZRTP,
CD_VIDEO_UPDATE,
CD_STOP_VIDEO_ON_LOW_BATTERY,
CD_TRANSFER_CALL
CD_STOP_VIDEO_ON_LOW_BATTERY
};
@protocol UIActionSheetCustomDelegate
@protocol CallActionSheetDelegate
- (void)actionSheet:(UIActionSheet *)actionSheet ofType:(enum CallDelegateType) type clickedButtonAtIndex:(NSInteger)buttonIndex withUserDatas:(void*) datas;
@end
@interface CallDelegate : NSObject<UIActionSheetDelegate> {
enum CallDelegateType eventType;
LinphoneCall* call;
id<UIActionSheetCustomDelegate> delegate;
id<CallActionSheetDelegate> delegate;
NSTimer* timeout;
}

View file

@ -18,6 +18,7 @@
*/
#import "CallDelegate.h"
#import "Utils.h"
@implementation CallDelegate
@ -32,7 +33,7 @@
timeout = nil;
}
if (eventType == CD_UNDEFINED) {
ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set");
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
}
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call];
}
@ -47,7 +48,7 @@
if (buttonIndex != actionSheet.cancelButtonIndex) return;
if (eventType == CD_UNDEFINED) {
ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set");
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
}
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:buttonIndex withUserDatas:call];
@ -59,7 +60,7 @@
timeout = nil;
}
if (eventType == CD_UNDEFINED) {
ms_error("Incorrect usage of CallDelegate/ActionSheet: eventType must be set");
[LinphoneLogger logc:LinphoneLoggerError format:"Incorrect usage of CallDelegate/ActionSheet: eventType must be set"];
}
[delegate actionSheet:actionSheet ofType:eventType clickedButtonAtIndex:actionSheet.cancelButtonIndex withUserDatas:call];
}