InCallView: add visual indication of encryption status of each call

This commit is contained in:
Pierre-Eric Pelloux-Prayer 2011-11-23 16:28:12 +01:00
parent 40b8aff198
commit 23cae69f00
2 changed files with 20 additions and 2 deletions

View file

@ -441,7 +441,7 @@ int callCount(LinphoneCore* lc) {
}
[cell.textLabel setBackgroundColor:[UIColor clearColor]];
[cell.detailTextLabel setBackgroundColor:[UIColor clearColor]];
[cell.accessoryView setHidden:YES];
//[cell.accessoryView setHidden:YES];
//[cell.backgroundView setBackgroundColor:cell.backgroundColor];
}
@ -519,6 +519,16 @@ int callCount(LinphoneCore* lc) {
} else{
cell.backgroundColor = [UIColor colorWithRed:1 green:0.5 blue:0 alpha:1];
}*/
UIImageView* uiiv = ((UIImageView*)cell.accessoryView);
if (linphone_call_params_get_media_encryption(linphone_call_get_current_params(call)) !=
LinphoneMediaEncryptionNone) {
if (uiiv.image == nil)
uiiv.image = [UIImage imageNamed:@"secured.png"];
} else {
uiiv = nil;
}
return;
LinphoneCall* selectedCall = linphone_core_get_current_call([LinphoneManager getLc]);
@ -542,6 +552,8 @@ int callCount(LinphoneCore* lc) {
cell.accessoryType = UITableViewCellAccessoryNone;
[self updateActive:NO cell:cell];
cell.selected = NO;
((UIImageView*)cell.accessoryView).image = nil;
[callTableView deselectRowAtIndexPath:indexPath animated:NO];
NSMutableString* ms = [[NSMutableString alloc] init ];
@ -588,7 +600,9 @@ int callCount(LinphoneCore* lc) {
cell.textLabel.font = [UIFont systemFontOfSize:40];
cell.textLabel.autoresizingMask = UIViewAutoresizingFlexibleHeight;
cell.accessoryView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 28, 28)];
}
((UIImageView*)cell.accessoryView).image = nil;
LinphoneCore* lc = [LinphoneManager getLc];
if (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0)
@ -666,7 +680,7 @@ int callCount(LinphoneCore* lc) {
LinphoneCore* lc = [LinphoneManager getLc];
[[callTableView cellForRowAtIndexPath:indexPath] setSelected:YES animated:NO];
//[[callTableView cellForRowAtIndexPath:indexPath] setSelected:YES animated:NO];
bool inConf = (indexPath.row == 0 && linphone_core_get_conference_size(lc) > 0);

View file

@ -223,6 +223,7 @@
22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
22F51EF6107FA66500F98953 /* untitled.plist in Resources */ = {isa = PBXBuildFile; fileRef = 22F51EF5107FA66500F98953 /* untitled.plist */; };
288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; };
34957F3F147D3FBF00DD7A09 /* secured.png in Resources */ = {isa = PBXBuildFile; fileRef = 34957F3E147D3FBF00DD7A09 /* secured.png */; };
34F2F678147D2E1C00A2D5E3 /* contact_vide.png in Resources */ = {isa = PBXBuildFile; fileRef = 34F2F677147D2E1C00A2D5E3 /* contact_vide.png */; };
70571E1A13FABCB000CDD3C2 /* rootca.pem in Resources */ = {isa = PBXBuildFile; fileRef = 70571E1913FABCB000CDD3C2 /* rootca.pem */; };
7066FC0C13E830E400EFC6DC /* libvpx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7066FC0B13E830E400EFC6DC /* libvpx.a */; };
@ -574,6 +575,7 @@
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* linphone_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = linphone_Prefix.pch; sourceTree = "<group>"; };
34957F3E147D3FBF00DD7A09 /* secured.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = secured.png; path = Resources/secured.png; sourceTree = "<group>"; };
34F2F677147D2E1C00A2D5E3 /* contact_vide.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = contact_vide.png; path = Resources/contact_vide.png; sourceTree = "<group>"; };
70571E1913FABCB000CDD3C2 /* rootca.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rootca.pem; path = Resources/rootca.pem; sourceTree = "<group>"; };
7066FC0B13E830E400EFC6DC /* libvpx.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libvpx.a; path = "liblinphone-sdk/apple-darwin/lib/libvpx.a"; sourceTree = "<group>"; };
@ -1105,6 +1107,7 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
34957F3E147D3FBF00DD7A09 /* secured.png */,
34F2F677147D2E1C00A2D5E3 /* contact_vide.png */,
2211DBCA1476BE7300DEE054 /* ajouter.png */,
2211DBCB1476BE7300DEE054 /* clavier.png */,
@ -1274,6 +1277,7 @@
2211DBE71476BE7300DEE054 /* pause_inactif.png in Resources */,
2211DBE91476BE7300DEE054 /* pause.png in Resources */,
34F2F678147D2E1C00A2D5E3 /* contact_vide.png in Resources */,
34957F3F147D3FBF00DD7A09 /* secured.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};