mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
add file sharing
This commit is contained in:
parent
3c3ad88b84
commit
6d4c6c6ffa
18 changed files with 958 additions and 187 deletions
|
|
@ -45,7 +45,9 @@
|
|||
data = nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[self loadData];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
|
|
@ -81,7 +83,7 @@
|
|||
[LinphoneLogger logc:LinphoneLoggerWarning format:"chat entries diesn not exixt"];
|
||||
return;
|
||||
}
|
||||
[[self tableView] reloadData]; //just reload
|
||||
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:index inSection:0]] withRowAnimation:FALSE];; //just reload
|
||||
return;
|
||||
}
|
||||
- (void)scrollToLastUnread:(BOOL)animated {
|
||||
|
|
|
|||
|
|
@ -26,10 +26,16 @@
|
|||
|
||||
#include "linphonecore.h"
|
||||
|
||||
@interface ChatRoomViewController : UIViewController<UITextFieldDelegate, UICompositeViewDelegate> {
|
||||
@interface ChatRoomViewController : UIViewController<UITextFieldDelegate, UICompositeViewDelegate,UIActionSheetDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate,NSURLConnectionDataDelegate> {
|
||||
@private
|
||||
LinphoneChatRoom *chatRoom;
|
||||
NSString *_remoteAddress;
|
||||
UIActionSheet* photoSourceSelector;
|
||||
NSURLConnection* uploadCnx;
|
||||
NSURLConnection* downloadCnx;
|
||||
NSString* pendingFileUrl; /*Url received from the remote party to be downloaded*/
|
||||
NSMutableData* downloadedData;
|
||||
NSInteger totalBytesExpectedToRead;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -44,10 +50,15 @@
|
|||
@property (nonatomic, retain) IBOutlet UIView *chatView;
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *fieldBackgroundImage;
|
||||
@property (nonatomic, copy) NSString *remoteAddress;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* pictButton;
|
||||
@property (nonatomic, retain) IBOutlet UIButton* cancelTransfertButton;
|
||||
@property (nonatomic, retain) IBOutlet UIProgressView* imageTransferProgressBar;
|
||||
|
||||
- (IBAction)onBackClick:(id)event;
|
||||
- (IBAction)onEditClick:(id)event;
|
||||
- (IBAction)onMessageChange:(id)sender;
|
||||
- (IBAction)onSendClick:(id)event;
|
||||
- (IBAction)onPictClick:(id)event;
|
||||
- (IBAction)onTransferCancelClick:(id)event;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -19,8 +19,13 @@
|
|||
|
||||
#import "ChatRoomViewController.h"
|
||||
#import "PhoneMainView.h"
|
||||
|
||||
#import <MobileCoreServices/UTCoreTypes.h>
|
||||
#import <NinePatch.h>
|
||||
#import <AssetsLibrary/ALAssetsLibrary.h>
|
||||
#import "ImageViewerViewController.h"
|
||||
|
||||
#define FILE_DOWNLOAD_ACTION_SHEET 1
|
||||
#define FILE_CHOOSER_ACTION_SHEET 2
|
||||
|
||||
@implementation ChatRoomViewController
|
||||
|
||||
|
|
@ -35,7 +40,9 @@
|
|||
@synthesize footerView;
|
||||
@synthesize chatView;
|
||||
@synthesize fieldBackgroundImage;
|
||||
|
||||
@synthesize pictButton;
|
||||
@synthesize imageTransferProgressBar;
|
||||
@synthesize cancelTransfertButton;
|
||||
|
||||
#pragma mark - Lifecycle Functions
|
||||
|
||||
|
|
@ -63,6 +70,7 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
static UICompositeViewDescription *compositeDescription = nil;
|
||||
|
|
@ -92,6 +100,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
// Set selected+over background: IB lack !
|
||||
[editButton setImage:[UIImage imageNamed:@"chat_ok_over.png"]
|
||||
forState:(UIControlStateHighlighted | UIControlStateSelected)];
|
||||
[self enableTransfertView:FALSE];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -120,6 +129,19 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
[fieldBackgroundImage setImage:[TUNinePatchCache imageOfSize:[fieldBackgroundImage bounds].size
|
||||
forNinePatchNamed:@"chat_field"]];
|
||||
BOOL fileSharingEnabled = [[LinphoneManager instance] lpConfigStringForKey:@"file_upload_url_preference"] != NULL
|
||||
&& [[[LinphoneManager instance] lpConfigStringForKey:@"file_upload_url_preference"] length]>0 ;
|
||||
[pictButton setHidden:!fileSharingEnabled];
|
||||
|
||||
/* CGRect frame = messageField.frame;
|
||||
if (fileSharingEnabled) {
|
||||
frame.origin.x=61;
|
||||
frame.size.width=175;
|
||||
} else {
|
||||
frame.origin.x=0;
|
||||
frame.size.width=175+61;
|
||||
}
|
||||
[messageField setFrame:frame];*/
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
|
|
@ -199,13 +221,13 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
ChatRoomViewController* thiz=(ChatRoomViewController*)ud;
|
||||
ChatModel *chat = (ChatModel *)linphone_chat_message_get_user_data(msg);
|
||||
[LinphoneLogger log:LinphoneLoggerLog
|
||||
format:@"Delivery status for [%@] is [%s]",chat.message,linphone_chat_message_state_to_string(state)];
|
||||
format:@"Delivery status for [%@] is [%s]",(chat.message?chat.message:@""),linphone_chat_message_state_to_string(state)];
|
||||
[chat setState:[NSNumber numberWithInt:state]];
|
||||
[chat update];
|
||||
[thiz.tableController updateChatEntry:chat];
|
||||
}
|
||||
|
||||
- (BOOL)sendMessage:(NSString *)message {
|
||||
- (BOOL)sendMessage:(NSString *)message withExterlBodyUrl:(NSString*) url{
|
||||
if(![LinphoneManager isLcReady]) {
|
||||
[LinphoneLogger logc:LinphoneLoggerWarning format:"Cannot send message: Linphone core not ready"];
|
||||
return FALSE;
|
||||
|
|
@ -215,10 +237,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
return FALSE;
|
||||
}
|
||||
if(chatRoom == NULL) {
|
||||
|
||||
|
||||
chatRoom = linphone_core_create_chat_room([LinphoneManager getLc], [_remoteAddress UTF8String]);
|
||||
|
||||
}
|
||||
|
||||
// Save message in database
|
||||
|
|
@ -232,10 +251,13 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
[chat setState:[NSNumber numberWithInt:1]]; //INPROGRESS
|
||||
[chat create];
|
||||
[tableController addChatEntry:chat];
|
||||
[chat release];
|
||||
// [chat release]; commenting this line avoid a crash on first message sent, specially when picture
|
||||
LinphoneChatMessage* msg = linphone_chat_room_create_message(chatRoom,[message UTF8String]);
|
||||
linphone_chat_message_set_user_data(msg,chat);
|
||||
linphone_chat_room_send_message2(chatRoom, msg,message_status,self);
|
||||
if (url) {
|
||||
linphone_chat_message_set_external_body_url(msg, [url UTF8String]);
|
||||
}
|
||||
linphone_chat_room_send_message2(chatRoom, msg,message_status,self);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -246,7 +268,8 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
//LinphoneChatRoom *room = [[[notif userInfo] objectForKey:@"room"] pointerValue];
|
||||
//NSString *message = [[notif userInfo] objectForKey:@"message"];
|
||||
LinphoneAddress *from = [[[notif userInfo] objectForKey:@"from"] pointerValue];
|
||||
ChatModel *chat = [[notif userInfo] objectForKey:@"chat"];
|
||||
|
||||
ChatModel *chat = [[notif userInfo] objectForKey:@"chat"];
|
||||
if(from != NULL && chat != NULL) {
|
||||
char *fromStr = linphone_address_as_string_uri_only(from);
|
||||
if(fromStr != NULL) {
|
||||
|
|
@ -259,7 +282,18 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
}
|
||||
ms_free(fromStr);
|
||||
}
|
||||
} else {
|
||||
if ([[notif userInfo] objectForKey:@"external_body_url"]) {
|
||||
pendingFileUrl=[[[notif userInfo] objectForKey:@"external_body_url"] retain];
|
||||
UIActionSheet* new_incoming_file = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Incoming file stored to your photo library",nil)
|
||||
delegate:self
|
||||
cancelButtonTitle:NSLocalizedString(@"Ignore",nil)
|
||||
destructiveButtonTitle:nil
|
||||
otherButtonTitles:NSLocalizedString(@"Accept",nil),nil];
|
||||
[new_incoming_file setTag:FILE_DOWNLOAD_ACTION_SHEET];
|
||||
[new_incoming_file showInView:self.view];
|
||||
[new_incoming_file release];
|
||||
}
|
||||
} else {
|
||||
[LinphoneLogger logc:LinphoneLoggerWarning format:"Invalid textReceivedEvent"];
|
||||
}
|
||||
}
|
||||
|
|
@ -284,7 +318,7 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
}
|
||||
|
||||
- (IBAction)onSendClick:(id)event {
|
||||
if([self sendMessage:[messageField text]]) {
|
||||
if([self sendMessage:[messageField text] withExterlBodyUrl:nil]) {
|
||||
[messageField setText:@""];
|
||||
}
|
||||
}
|
||||
|
|
@ -297,7 +331,328 @@ static void message_status(LinphoneChatMessage* msg,LinphoneChatMessageState sta
|
|||
}
|
||||
}
|
||||
|
||||
- (IBAction)onPictClick:(id)event {
|
||||
|
||||
photoSourceSelector = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Select picture source",nil)
|
||||
delegate:self
|
||||
cancelButtonTitle:NSLocalizedString(@"Cancel",nil)
|
||||
destructiveButtonTitle:nil
|
||||
otherButtonTitles:NSLocalizedString(@"Camera",nil),NSLocalizedString(@"Photo library",nil), nil];
|
||||
|
||||
photoSourceSelector.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[photoSourceSelector setTag:FILE_CHOOSER_ACTION_SHEET];
|
||||
[photoSourceSelector showInView:self.view];
|
||||
[photoSourceSelector release];
|
||||
|
||||
|
||||
}
|
||||
- (IBAction)onTransferCancelClick:(id)event {
|
||||
[uploadCnx cancel];
|
||||
[downloadCnx cancel];
|
||||
[self stopUpload];
|
||||
[self stopDownload];
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"File transfert interrupted by user "];
|
||||
}
|
||||
|
||||
-(void) enableTransfertView:(BOOL) isTranfer {
|
||||
if (isTranfer) {
|
||||
[imageTransferProgressBar setProgress:0.0];
|
||||
} else {
|
||||
//[uploadCnx cancel];
|
||||
|
||||
}
|
||||
[imageTransferProgressBar setHidden:!isTranfer];
|
||||
[cancelTransfertButton setHidden:!isTranfer];
|
||||
[pictButton setEnabled:!isTranfer];
|
||||
[sendButton setEnabled:!isTranfer];
|
||||
}
|
||||
|
||||
-(void) startUpload {
|
||||
[self enableTransfertView:TRUE];
|
||||
}
|
||||
-(void) stopUpload {
|
||||
[self enableTransfertView:FALSE];
|
||||
}
|
||||
-(void) startDownload {
|
||||
[self enableTransfertView:TRUE];
|
||||
}
|
||||
-(void) stopDownload {
|
||||
[self enableTransfertView:FALSE];
|
||||
}
|
||||
|
||||
-(void) actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
|
||||
|
||||
switch (actionSheet.tag) {
|
||||
case FILE_CHOOSER_ACTION_SHEET: {
|
||||
UIImagePickerController *mediaUI = [[UIImagePickerController alloc] init];
|
||||
switch (buttonIndex) {
|
||||
case 0: {
|
||||
if ([UIImagePickerController isSourceTypeAvailable:
|
||||
UIImagePickerControllerSourceTypeCamera] == NO) {
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"no camera found, using image library"];
|
||||
} else {
|
||||
mediaUI.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
|
||||
// Displays a control that allows the user to choose picture or
|
||||
// movie capture, if both are available:
|
||||
mediaUI.mediaTypes =
|
||||
[UIImagePickerController availableMediaTypesForSourceType:
|
||||
UIImagePickerControllerSourceTypeCamera];
|
||||
|
||||
// Hides the controls for moving & scaling pictures, or for
|
||||
// trimming movies. To instead show the controls, use YES.
|
||||
mediaUI.allowsEditing = NO;
|
||||
break;
|
||||
}
|
||||
}
|
||||
case 1: {
|
||||
|
||||
mediaUI.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
|
||||
// Displays saved pictures and movies, if both are available, from the
|
||||
// Camera Roll album.
|
||||
mediaUI.mediaTypes =
|
||||
[UIImagePickerController availableMediaTypesForSourceType:
|
||||
UIImagePickerControllerSourceTypePhotoLibrary];
|
||||
|
||||
// Hides the controls for moving & scaling pictures, or for
|
||||
// trimming movies. To instead show the controls, use YES.
|
||||
mediaUI.allowsEditing = NO;
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
[mediaUI release];
|
||||
return ;break;
|
||||
|
||||
}
|
||||
mediaUI.delegate = self;
|
||||
[self presentModalViewController: mediaUI animated: YES];
|
||||
break;
|
||||
}
|
||||
case FILE_DOWNLOAD_ACTION_SHEET: {
|
||||
switch (buttonIndex) {
|
||||
case 0:
|
||||
[downloadCnx release];
|
||||
downloadCnx= [self downloadImageFrom:pendingFileUrl];
|
||||
[self startDownload];
|
||||
break;
|
||||
case 1:
|
||||
default: {
|
||||
//nop
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Unexpected action sheet result for tag [%i]",actionSheet.tag];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#pragma mark - NSURLConnectionDelegate
|
||||
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
|
||||
UIAlertView* errorAlert = [UIAlertView alloc];
|
||||
if (connection == uploadCnx) {
|
||||
[self stopUpload];
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Cannot upload file to server [%@] because [%@]",[[LinphoneManager instance] lpConfigStringForKey:@"file_upload_url"],[error localizedDescription]];
|
||||
[errorAlert initWithTitle:NSLocalizedString(@"Tranfer error",nil)
|
||||
message:NSLocalizedString(@"Cannot transfert file to remote pary",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
}else if (connection == downloadCnx) {
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Cannot dowanlod file from [%@] because [%@]",pendingFileUrl,[error localizedDescription]];
|
||||
[errorAlert initWithTitle:NSLocalizedString(@"Tranfer error",nil)
|
||||
message:NSLocalizedString(@"Cannot transfert file from remote pary",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
} else {
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Unknown connection error [%@]",[error localizedDescription]];
|
||||
}
|
||||
[errorAlert release];
|
||||
|
||||
}
|
||||
|
||||
-(void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite {
|
||||
[imageTransferProgressBar setProgress:(float)((float)totalBytesWritten/(float)totalBytesExpectedToWrite) animated:FALSE];
|
||||
|
||||
}
|
||||
- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data {
|
||||
if (connection == uploadCnx) {
|
||||
NSString* imageRemoteUrl=[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"File can be downloaded from [%@]",imageRemoteUrl];
|
||||
[self sendMessage:NSLocalizedString(@"Image sent",nil) withExterlBodyUrl:imageRemoteUrl];
|
||||
} else if (connection == downloadCnx) {
|
||||
if (downloadedData == nil) downloadedData = [[NSMutableData alloc] initWithCapacity:4096];
|
||||
[downloadedData appendData:data];
|
||||
[imageTransferProgressBar setProgress:(float)((float)downloadedData.length/(float)totalBytesExpectedToRead) animated:FALSE];
|
||||
} else {
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Unknown received value error"];
|
||||
}
|
||||
}
|
||||
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
|
||||
NSHTTPURLResponse * httpResponse = (NSHTTPURLResponse *) response;
|
||||
int statusCode = httpResponse.statusCode;;
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"File transfert status code [%i]",statusCode];
|
||||
UIAlertView* errorAlert = [UIAlertView alloc];
|
||||
if (connection == uploadCnx) {
|
||||
if (statusCode == 200) {
|
||||
//nop
|
||||
} else if (statusCode >= 400) {
|
||||
|
||||
[errorAlert initWithTitle:NSLocalizedString(@"Transfer error",nil)
|
||||
message:NSLocalizedString(@"Cannot transfert file to remote pary",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
|
||||
}
|
||||
|
||||
} else if (connection == downloadCnx) {
|
||||
if (statusCode == 200) {
|
||||
totalBytesExpectedToRead=[response expectedContentLength];
|
||||
} else if (statusCode >= 400) {
|
||||
[errorAlert initWithTitle:NSLocalizedString(@"Transfer error",nil)
|
||||
message:NSLocalizedString(@"Cannot transfert file from remote pary",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[errorAlert show];
|
||||
} else {
|
||||
//TODO
|
||||
}
|
||||
|
||||
} else {
|
||||
//FIXE
|
||||
}
|
||||
|
||||
[errorAlert release];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
|
||||
if (connection == uploadCnx) {
|
||||
//nothing to do [self enableTransfert:FALSE];
|
||||
[self stopUpload];
|
||||
//[uploadCnx release];
|
||||
uploadCnx=nil;
|
||||
} else if (connection == downloadCnx) {
|
||||
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
|
||||
[library writeImageDataToSavedPhotosAlbum:downloadedData
|
||||
metadata:nil
|
||||
completionBlock:^(NSURL *assetURL, NSError *error){
|
||||
if (error) {
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"Cannot save image data downloaded because [%@]",[error localizedDescription]];
|
||||
} else {
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"Image saved to [%@]",[assetURL absoluteString]];
|
||||
}
|
||||
|
||||
ImageViewerViewController* imageView = [[ImageViewerViewController alloc ]initWithNibName:@"ImageViewerViewController" bundle:[NSBundle mainBundle]];
|
||||
[imageView setImageToDisplay:[UIImage imageWithData:downloadedData]];
|
||||
[self presentModalViewController: imageView animated: YES];
|
||||
[downloadedData release];
|
||||
downloadedData=nil;
|
||||
}];
|
||||
|
||||
|
||||
[library release];
|
||||
[self stopDownload];
|
||||
//[downloadCnx release];
|
||||
downloadCnx=nil;
|
||||
}
|
||||
}
|
||||
-(NSURLConnection*) downloadImageFrom:(NSString*) address {
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"downloading [%@]",address];
|
||||
NSURL* url = [NSURL URLWithString: address ];
|
||||
NSURLRequest* request = [NSURLRequest requestWithURL:url
|
||||
cachePolicy:NSURLRequestUseProtocolCachePolicy
|
||||
timeoutInterval:60.0];
|
||||
|
||||
return [[NSURLConnection alloc] initWithRequest:request delegate: self];
|
||||
}
|
||||
|
||||
|
||||
-(NSURLConnection*) uploadImage:(UIImage*) image Named:(NSString*) name {
|
||||
/*
|
||||
turning the image into a NSData object
|
||||
getting the image back out of the UIImageView
|
||||
setting the quality to 90
|
||||
*/
|
||||
NSData *imageData = UIImageJPEGRepresentation(image, 80);
|
||||
// setting up the URL to post to
|
||||
NSString *urlString = [[LinphoneManager instance] lpConfigStringForKey:@"file_upload_url_preference"];
|
||||
|
||||
// setting up the request object now
|
||||
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
|
||||
[request setURL:[NSURL URLWithString:urlString]];
|
||||
[request setHTTPMethod:@"POST"];
|
||||
|
||||
/*
|
||||
add some header info now
|
||||
we always need a boundary when we post a file
|
||||
also we need to set the content type
|
||||
|
||||
You might want to generate a random boundary.. this is just the same
|
||||
as my output from wireshark on a valid html post
|
||||
*/
|
||||
NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
|
||||
NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
|
||||
[request addValue:contentType forHTTPHeaderField: @"Content-Type"];
|
||||
|
||||
/*
|
||||
now lets create the body of the post
|
||||
*/
|
||||
NSMutableData *body = [NSMutableData data];
|
||||
[body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
[body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"%@\"\r\n",name] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
[body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
[body appendData:[NSData dataWithData:imageData]];
|
||||
[body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]];
|
||||
// setting the body of the post to the reqeust
|
||||
[request setHTTPBody:body];
|
||||
|
||||
return [NSURLConnection connectionWithRequest:(NSURLRequest *)request
|
||||
delegate:self];
|
||||
}
|
||||
|
||||
#pragma mark UIImagePickerControllerDelegate
|
||||
// For responding to the user tapping Cancel.
|
||||
- (void) imagePickerControllerDidCancel: (UIImagePickerController *) picker {
|
||||
[self dismissModalViewControllerAnimated: YES];
|
||||
[picker release];
|
||||
}
|
||||
|
||||
- (void) imagePickerController: (UIImagePickerController *) picker
|
||||
didFinishPickingMediaWithInfo: (NSDictionary *) info {
|
||||
|
||||
NSURL *imageURL = [info valueForKey: UIImagePickerControllerReferenceURL];
|
||||
UIImage* imageToUse = (UIImage *) [info objectForKey: UIImagePickerControllerOriginalImage];
|
||||
NSString* imageName;
|
||||
if (imageURL) {
|
||||
// extract id from asset-url ex: assets-library://asset/asset.JPG?id=1645156-6151-1513&ext=JPG
|
||||
NSArray *parameters = [[imageURL query] componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"=&"]];
|
||||
for (int i = 0; i < [parameters count]; i=i+2) {
|
||||
if ([(NSString*)[parameters objectAtIndex:i] isEqualToString:@"id"]) {
|
||||
imageName=[NSString stringWithFormat:@"%@.jpg",(NSString*)[parameters objectAtIndex:i+1]];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// must be "unique"
|
||||
imageName=[NSString stringWithFormat:@"%i.jpg",[imageToUse hash]];
|
||||
}
|
||||
uploadCnx =[self uploadImage:imageToUse Named: imageName];
|
||||
[self startUpload];
|
||||
|
||||
[picker.presentingViewController dismissModalViewControllerAnimated: YES];
|
||||
[picker release];
|
||||
}
|
||||
#pragma mark - Keyboard Event Functions
|
||||
|
||||
- (void)keyboardWillHide:(NSNotification *)notif {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
<string>IBUIImageView</string>
|
||||
<string>IBUILabel</string>
|
||||
<string>IBProxyObject</string>
|
||||
<string>IBUIProgressView</string>
|
||||
<string>IBUITextField</string>
|
||||
<string>IBUITableViewController</string>
|
||||
<string>IBUITableView</string>
|
||||
|
|
@ -54,7 +55,6 @@
|
|||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{-13, -5}, {131, 107}}</string>
|
||||
<reference key="NSSuperview" ref="414508017"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="495119736"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -69,7 +69,6 @@
|
|||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{20, 6}, {65, 65}}</string>
|
||||
<reference key="NSSuperview" ref="414508017"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="578164845"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -84,7 +83,6 @@
|
|||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrame">{{101, 37}, {199, 43}}</string>
|
||||
<reference key="NSSuperview" ref="414508017"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="879615756"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -113,7 +111,6 @@
|
|||
</array>
|
||||
<string key="NSFrameSize">{320, 80}</string>
|
||||
<reference key="NSSuperview" ref="715329044"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="934483770"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="460939904">
|
||||
|
|
@ -128,10 +125,9 @@
|
|||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 80}, {320, 277}}</string>
|
||||
<reference key="NSSuperview" ref="715329044"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="833509359"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<object class="NSColor" key="IBUIBackgroundColor" id="552351717">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
|
|
@ -153,8 +149,7 @@
|
|||
<int key="NSvFlags">257</int>
|
||||
<string key="NSFrame">{{250, 0}, {70, 59}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<reference key="NSNextKeyView" ref="1057788215"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<object class="IBUIAccessibilityConfiguration" key="IBUIAccessibilityConfiguration">
|
||||
|
|
@ -195,9 +190,8 @@
|
|||
<object class="IBUIImageView" id="946416684">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">258</int>
|
||||
<string key="NSFrameSize">{250, 59}</string>
|
||||
<string key="NSFrame">{{56, 0}, {194, 59}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="87421816"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -210,9 +204,8 @@
|
|||
<object class="IBUITextField" id="87421816">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">-2147483390</int>
|
||||
<string key="NSFrame">{{10, 10}, {230, 39}}</string>
|
||||
<string key="NSFrame">{{61, 10}, {189, 39}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="607607719"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -247,10 +240,9 @@
|
|||
<object class="IBUITextView" id="607607719">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{10, 10}, {230, 39}}</string>
|
||||
<string key="NSFrame">{{61, 10}, {175, 39}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="487645621"/>
|
||||
<reference key="NSNextKeyView" ref="1061708115"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
|
|
@ -267,11 +259,68 @@
|
|||
<reference key="IBUIFontDescription" ref="467582381"/>
|
||||
<reference key="IBUIFont" ref="957794319"/>
|
||||
</object>
|
||||
<object class="IBUIButton" id="776972334">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{2, 12}, {53, 37}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSNextKeyView" ref="946416684"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<string key="IBUINormalTitle">Pict</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="552351717"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="153071662"/>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage" id="462348487">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">background.png</string>
|
||||
</object>
|
||||
<reference key="IBUIFontDescription" ref="278893601"/>
|
||||
<reference key="IBUIFont" ref="871116895"/>
|
||||
</object>
|
||||
<object class="IBUIProgressView" id="1061708115">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrame">{{72, 25}, {163, 9}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSNextKeyView" ref="487645621"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIButton" id="1057788215">
|
||||
<reference key="NSNextResponder" ref="833509359"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{258, 11}, {59, 37}}</string>
|
||||
<reference key="NSSuperview" ref="833509359"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<int key="IBUIButtonType">1</int>
|
||||
<string key="IBUINormalTitle">Cancel</string>
|
||||
<reference key="IBUIHighlightedTitleColor" ref="552351717"/>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<reference key="IBUINormalTitleShadowColor" ref="153071662"/>
|
||||
<reference key="IBUINormalBackgroundImage" ref="462348487"/>
|
||||
<reference key="IBUIFontDescription" ref="278893601"/>
|
||||
<reference key="IBUIFont" ref="871116895"/>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 357}, {320, 59}}</string>
|
||||
<reference key="NSSuperview" ref="715329044"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="946416684"/>
|
||||
<reference key="NSNextKeyView" ref="776972334"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
|
|
@ -283,7 +332,6 @@
|
|||
</array>
|
||||
<string key="NSFrame">{{0, 44}, {320, 416}}</string>
|
||||
<reference key="NSSuperview" ref="589117993"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="414508017"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
|
|
@ -302,7 +350,6 @@
|
|||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="333187864"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="544154475"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -317,7 +364,6 @@
|
|||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{160, 44}</string>
|
||||
<reference key="NSSuperview" ref="333187864"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="602867427"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -345,7 +391,6 @@
|
|||
<int key="NSvFlags">289</int>
|
||||
<string key="NSFrame">{{160, 0}, {160, 44}}</string>
|
||||
<reference key="NSSuperview" ref="333187864"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="715329044"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -375,7 +420,6 @@
|
|||
</array>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="589117993"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="393955689"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
|
|
@ -388,7 +432,6 @@
|
|||
</array>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="333187864"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<reference key="IBUIBackgroundColor" ref="460939904"/>
|
||||
|
|
@ -495,6 +538,30 @@
|
|||
</object>
|
||||
<int key="connectionID">57</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">pictButton</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="776972334"/>
|
||||
</object>
|
||||
<int key="connectionID">59</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">cancelTransfertButton</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="1057788215"/>
|
||||
</object>
|
||||
<int key="connectionID">66</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">imageTransferProgressBar</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="1061708115"/>
|
||||
</object>
|
||||
<int key="connectionID">68</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
|
|
@ -546,6 +613,24 @@
|
|||
</object>
|
||||
<int key="connectionID">33</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onPictClick:</string>
|
||||
<reference key="source" ref="776972334"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">60</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onTransferCancelClick:</string>
|
||||
<reference key="source" ref="1057788215"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">69</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
|
|
@ -664,6 +749,9 @@
|
|||
<reference ref="87421816"/>
|
||||
<reference ref="487645621"/>
|
||||
<reference ref="607607719"/>
|
||||
<reference ref="776972334"/>
|
||||
<reference ref="1061708115"/>
|
||||
<reference ref="1057788215"/>
|
||||
</array>
|
||||
<reference key="parent" ref="715329044"/>
|
||||
<string key="objectName">footerView</string>
|
||||
|
|
@ -692,6 +780,21 @@
|
|||
<reference key="parent" ref="833509359"/>
|
||||
<string key="objectName">messageFieldOld</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">58</int>
|
||||
<reference key="object" ref="776972334"/>
|
||||
<reference key="parent" ref="833509359"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">62</int>
|
||||
<reference key="object" ref="1061708115"/>
|
||||
<reference key="parent" ref="833509359"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">64</int>
|
||||
<reference key="object" ref="1057788215"/>
|
||||
<reference key="parent" ref="833509359"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
|
|
@ -716,7 +819,10 @@
|
|||
<string key="47.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="49.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="55.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="62.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="64.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
|
|
@ -726,114 +832,9 @@
|
|||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">57</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ChatRoomTableViewController</string>
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ChatRoomTableViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">ChatRoomViewController</string>
|
||||
<string key="superclassName">UIViewController</string>
|
||||
<dictionary class="NSMutableDictionary" key="actions">
|
||||
<string key="onBackClick:">id</string>
|
||||
<string key="onEditClick:">id</string>
|
||||
<string key="onMessageChange:">id</string>
|
||||
<string key="onSendClick:">id</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="actionInfosByName">
|
||||
<object class="IBActionInfo" key="onBackClick:">
|
||||
<string key="name">onBackClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="onEditClick:">
|
||||
<string key="name">onEditClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="onMessageChange:">
|
||||
<string key="name">onMessageChange:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo" key="onSendClick:">
|
||||
<string key="name">onSendClick:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="outlets">
|
||||
<string key="addressLabel">UILabel</string>
|
||||
<string key="avatarImage">UIImageView</string>
|
||||
<string key="chatView">UIView</string>
|
||||
<string key="editButton">UIToggleButton</string>
|
||||
<string key="fieldBackgroundImage">UIImageView</string>
|
||||
<string key="footerView">UIView</string>
|
||||
<string key="headerView">UIView</string>
|
||||
<string key="messageField">UITextView</string>
|
||||
<string key="sendButton">UIButton</string>
|
||||
<string key="tableController">ChatRoomTableViewController</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<object class="IBToOneOutletInfo" key="addressLabel">
|
||||
<string key="name">addressLabel</string>
|
||||
<string key="candidateClassName">UILabel</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="avatarImage">
|
||||
<string key="name">avatarImage</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="chatView">
|
||||
<string key="name">chatView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="editButton">
|
||||
<string key="name">editButton</string>
|
||||
<string key="candidateClassName">UIToggleButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="fieldBackgroundImage">
|
||||
<string key="name">fieldBackgroundImage</string>
|
||||
<string key="candidateClassName">UIImageView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="footerView">
|
||||
<string key="name">footerView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="headerView">
|
||||
<string key="name">headerView</string>
|
||||
<string key="candidateClassName">UIView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="messageField">
|
||||
<string key="name">messageField</string>
|
||||
<string key="candidateClassName">UITextView</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="sendButton">
|
||||
<string key="name">sendButton</string>
|
||||
<string key="candidateClassName">UIButton</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo" key="tableController">
|
||||
<string key="name">tableController</string>
|
||||
<string key="candidateClassName">ChatRoomTableViewController</string>
|
||||
</object>
|
||||
</dictionary>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/ChatRoomViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">UIToggleButton</string>
|
||||
<string key="superclassName">UIButton</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">./Classes/UIToggleButton.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<int key="maxID">69</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
|
|
@ -845,6 +846,7 @@
|
|||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="avatar_shadow_small.png">{262, 214}</string>
|
||||
<string key="avatar_unknown_small.png">{131, 131}</string>
|
||||
<string key="background.png">{640, 523}</string>
|
||||
<string key="chat_back_default.png">{320, 88}</string>
|
||||
<string key="chat_back_over.png">{320, 88}</string>
|
||||
<string key="chat_edit_default.png">{320, 88}</string>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIView" id="624008635">
|
||||
|
|
@ -48,7 +48,6 @@
|
|||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="40094652"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
|
|
@ -63,7 +62,6 @@
|
|||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{160, 44}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="827146159"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -101,7 +99,6 @@
|
|||
<int key="NSvFlags">-2147483356</int>
|
||||
<string key="NSFrameSize">{160, 44}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="100677920"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -129,7 +126,6 @@
|
|||
<int key="NSvFlags">289</int>
|
||||
<string key="NSFrame">{{160, 0}, {160, 44}}</string>
|
||||
<reference key="NSSuperview" ref="624008635"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="685526080"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
|
|
@ -159,7 +155,6 @@
|
|||
</array>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="463087888"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
|
|
@ -176,8 +171,6 @@
|
|||
<int key="NSvFlags">306</int>
|
||||
<string key="NSFrame">{{0, 44}, {320, 416}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">10</int>
|
||||
|
|
@ -260,8 +253,6 @@ AAgACAAIAAEAAQABAAE</bytes>
|
|||
</object>
|
||||
</array>
|
||||
<string key="NSFrameSize">{320, 460}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSWindow"/>
|
||||
<reference key="NSNextKeyView" ref="624008635"/>
|
||||
<reference key="IBUIBackgroundColor" ref="845399741"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
|
|
|
|||
34
Classes/ImageViewerViewController.h
Normal file
34
Classes/ImageViewerViewController.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* ImageViewerViewController.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface ImageViewerViewController : UIViewController {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@property (nonatomic, retain) IBOutlet UIImageView *imageView;
|
||||
@property (nonatomic, retain) UIImage *imageToDisplay;
|
||||
@property (nonatomic, retain) IBOutlet UIButton *backButton;
|
||||
|
||||
|
||||
- (IBAction)onBackClick:(id)sender;
|
||||
@end
|
||||
62
Classes/ImageViewerViewController.m
Normal file
62
Classes/ImageViewerViewController.m
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/* ImageViewerViewController.h
|
||||
*
|
||||
* Copyright (C) 2012 Belledonne Comunications, Grenoble, France
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#import "ImageViewerViewController.h"
|
||||
|
||||
@interface ImageViewerViewController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation ImageViewerViewController
|
||||
@synthesize imageView;
|
||||
@synthesize backButton;
|
||||
@synthesize imageToDisplay;
|
||||
|
||||
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
||||
{
|
||||
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
||||
if (self) {
|
||||
// Custom initialization
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
[imageView setImage:imageToDisplay];
|
||||
}
|
||||
|
||||
- (void)viewDidUnload
|
||||
{
|
||||
[super viewDidUnload];
|
||||
// Release any retained subviews of the main view.
|
||||
// e.g. self.myOutlet = nil;
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
return (interfaceOrientation == UIInterfaceOrientationPortrait);
|
||||
}
|
||||
|
||||
- (IBAction)onBackClick:(id)sender {
|
||||
[self.presentingViewController dismissModalViewControllerAnimated: YES];
|
||||
}
|
||||
@end
|
||||
233
Classes/ImageViewerViewController.xib
Normal file
233
Classes/ImageViewerViewController.xib
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1296</int>
|
||||
<string key="IBDocument.SystemVersion">11E53</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">2182</string>
|
||||
<string key="IBDocument.AppKitVersion">1138.47</string>
|
||||
<string key="IBDocument.HIToolboxVersion">569.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="NS.object.0">1181</string>
|
||||
</object>
|
||||
<array key="IBDocument.IntegratedClassDependencies">
|
||||
<string>IBUIButton</string>
|
||||
<string>IBUIImageView</string>
|
||||
<string>IBUIView</string>
|
||||
<string>IBProxyObject</string>
|
||||
</array>
|
||||
<array key="IBDocument.PluginDependencies">
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</array>
|
||||
<object class="NSMutableDictionary" key="IBDocument.Metadata">
|
||||
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
|
||||
<integer value="1" key="NS.object.0"/>
|
||||
</object>
|
||||
<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
|
||||
<object class="IBProxyObject" id="372490531">
|
||||
<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBProxyObject" id="975951072">
|
||||
<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIView" id="191373211">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<array class="NSMutableArray" key="NSSubviews">
|
||||
<object class="IBUIImageView" id="170933358">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{0, 44}, {320, 416}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<int key="IBUIContentMode">4</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
<object class="IBUIImageView" id="714444944">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrameSize">{320, 44}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSNextKeyView" ref="771824371"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSCustomResource" key="IBUIImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">background.png</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIButton" id="771824371">
|
||||
<reference key="NSNextResponder" ref="191373211"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{235, 0}, {80, 44}}</string>
|
||||
<reference key="NSSuperview" ref="191373211"/>
|
||||
<reference key="NSNextKeyView" ref="170933358"/>
|
||||
<string key="NSReuseIdentifierKey">_NS:9</string>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
<object class="NSColor" key="IBUIHighlightedTitleColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA</bytes>
|
||||
</object>
|
||||
<object class="NSColor" key="IBUINormalTitleShadowColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MC41AA</bytes>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">chat_back_default.png</string>
|
||||
</object>
|
||||
<object class="NSCustomResource" key="IBUINormalBackgroundImage">
|
||||
<string key="NSClassName">NSImage</string>
|
||||
<string key="NSResourceName">chat_back_over.png</string>
|
||||
</object>
|
||||
<object class="IBUIFontDescription" key="IBUIFontDescription">
|
||||
<int key="type">2</int>
|
||||
<double key="pointSize">15</double>
|
||||
</object>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica-Bold</string>
|
||||
<double key="NSSize">15</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
</object>
|
||||
</array>
|
||||
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="NSNextKeyView" ref="714444944"/>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">3</int>
|
||||
<bytes key="NSWhite">MQA</bytes>
|
||||
<object class="NSColorSpace" key="NSCustomColorSpace">
|
||||
<int key="NSID">2</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
|
||||
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<array class="NSMutableArray" key="connectionRecords">
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">view</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="191373211"/>
|
||||
</object>
|
||||
<int key="connectionID">3</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">backButton</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="771824371"/>
|
||||
</object>
|
||||
<int key="connectionID">8</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">imageView</string>
|
||||
<reference key="source" ref="372490531"/>
|
||||
<reference key="destination" ref="170933358"/>
|
||||
</object>
|
||||
<int key="connectionID">9</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">onBackClick:</string>
|
||||
<reference key="source" ref="771824371"/>
|
||||
<reference key="destination" ref="372490531"/>
|
||||
<int key="IBEventType">7</int>
|
||||
</object>
|
||||
<int key="connectionID">10</int>
|
||||
</object>
|
||||
</array>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
<array key="orderedObjects">
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">0</int>
|
||||
<array key="object" id="0"/>
|
||||
<reference key="children" ref="1000"/>
|
||||
<nil key="parent"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">1</int>
|
||||
<reference key="object" ref="191373211"/>
|
||||
<array class="NSMutableArray" key="children">
|
||||
<reference ref="170933358"/>
|
||||
<reference ref="714444944"/>
|
||||
<reference ref="771824371"/>
|
||||
</array>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-1</int>
|
||||
<reference key="object" ref="372490531"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
<string key="objectName">File's Owner</string>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">-2</int>
|
||||
<reference key="object" ref="975951072"/>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">4</int>
|
||||
<reference key="object" ref="170933358"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">6</int>
|
||||
<reference key="object" ref="714444944"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">7</int>
|
||||
<reference key="object" ref="771824371"/>
|
||||
<reference key="parent" ref="191373211"/>
|
||||
</object>
|
||||
</array>
|
||||
</object>
|
||||
<dictionary class="NSMutableDictionary" key="flattenedProperties">
|
||||
<string key="-1.CustomClassName">ImageViewerViewController</string>
|
||||
<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="-2.CustomClassName">UIResponder</string>
|
||||
<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="4.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string key="7.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</dictionary>
|
||||
<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
|
||||
<nil key="activeLocalization"/>
|
||||
<dictionary class="NSMutableDictionary" key="localizations"/>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">10</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes"/>
|
||||
<int key="IBDocument.localizationMode">0</int>
|
||||
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
|
||||
<real value="1296" key="NS.object.0"/>
|
||||
</object>
|
||||
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
|
||||
<int key="IBDocument.defaultPropertyAccessControl">3</int>
|
||||
<dictionary class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
|
||||
<string key="background.png">{640, 523}</string>
|
||||
<string key="chat_back_default.png">{320, 88}</string>
|
||||
<string key="chat_back_over.png">{320, 88}</string>
|
||||
</dictionary>
|
||||
<string key="IBCocoaTouchPluginVersion">1181</string>
|
||||
</data>
|
||||
</archive>
|
||||
|
|
@ -28,9 +28,11 @@
|
|||
@end
|
||||
|
||||
@interface LinphoneAppDelegate : NSObject <UIApplicationDelegate,UIAlertViewDelegate> {
|
||||
UIWindow *window;
|
||||
@private
|
||||
UIWindow *window;
|
||||
CTCallCenter* callCenter;
|
||||
BOOL started;
|
||||
int savedMaxCall;
|
||||
}
|
||||
|
||||
@property (assign) BOOL started;
|
||||
|
|
|
|||
|
|
@ -248,12 +248,12 @@
|
|||
#pragma mark - PushNotification Functions
|
||||
|
||||
- (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
|
||||
[LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Token %@", deviceToken];
|
||||
[LinphoneLogger log:LinphoneLoggerLog format:@"PushNotification: Token %@", deviceToken];
|
||||
[[LinphoneManager instance] setPushNotificationToken:deviceToken];
|
||||
}
|
||||
|
||||
- (void)application:(UIApplication*)application didFailToRegisterForRemoteNotificationsWithError:(NSError*)error {
|
||||
[LinphoneLogger log:LinphoneLoggerDebug format:@"PushNotification: Error %@", error];
|
||||
[LinphoneLogger log:LinphoneLoggerError format:@"PushNotification: Error %@", [error localizedDescription]];
|
||||
[[LinphoneManager instance] setPushNotificationToken:nil];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
[self setString: linphone_address_get_username(addr) forKey:@"username_preference"];
|
||||
[self setString: linphone_address_get_domain(addr) forKey:@"domain_preference"];
|
||||
[self setInteger: lp_config_get_int(linphone_core_get_config(lc),"default_values","reg_expires",600) forKey:@"expire_preference"];
|
||||
[self setInteger: linphone_proxy_config_get_expires(cfg) forKey:@"expire_preference"];
|
||||
[self setString:linphone_proxy_config_get_dial_prefix(cfg) forKey:@"prefix_preference"];
|
||||
if (strcmp(linphone_address_get_domain(addr),linphone_address_get_domain(proxy_addr))!=0
|
||||
|| port!=NULL){
|
||||
|
|
@ -119,6 +119,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[self setBool:linphone_proxy_config_get_dial_escape_plus(cfg) forKey:@"substitute_+_by_00_preference"];
|
||||
|
||||
}
|
||||
} else {
|
||||
[self setInteger: lp_config_get_int(linphone_core_get_config(lc),"default_values","reg_expires",600) forKey:@"expire_preference"];
|
||||
}
|
||||
{
|
||||
LinphoneAddress *parsed = linphone_core_get_primary_contact_parsed(lc);
|
||||
|
|
@ -191,7 +193,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
[self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","animations_preference", 1) forKey:@"animations_preference"];
|
||||
[self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","check_config_disable_preference", 0) forKey:@"check_config_disable_preference"];
|
||||
[self setBool: lp_config_get_int(linphone_core_get_config(lc),"app","wifi_only_preference", 0) forKey:@"wifi_only_preference"];
|
||||
|
||||
[self setString: lp_config_get_string(linphone_core_get_config(lc),"app","file_upload_url_preference",NULL) forKey:@"file_upload_url_preference"];
|
||||
|
||||
/*keep this one also in the standardUserDefaults so that it can be read before starting liblinphone*/
|
||||
BOOL start_at_boot = TRUE;
|
||||
if ([[NSUserDefaults standardUserDefaults] objectForKey:@"start_at_boot_preference"]!=Nil)
|
||||
|
|
@ -355,7 +358,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
|
||||
int expire = [self integerForKey:@"expire_preference"];
|
||||
lp_config_set_int(linphone_core_get_config(lc),"default_values","reg_expires",expire);
|
||||
linphone_proxy_config_expires(proxyCfg,expire);
|
||||
|
||||
BOOL isWifiOnly = [self boolForKey:@"wifi_only_preference"];
|
||||
|
||||
|
|
@ -505,6 +508,10 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
|
||||
BOOL animations = [self boolForKey:@"animations_preference"];
|
||||
lp_config_set_int(linphone_core_get_config(lc),"app","animations_preference", animations);
|
||||
NSString* file_upload_url= [self stringForKey:@"file_upload_url_preference"];
|
||||
[[LinphoneManager instance] lpConfigSetString:file_upload_url forKey:@"file_upload_url_preference"];
|
||||
|
||||
|
||||
|
||||
/*keep this one also in the standardUserDefaults so that it can be read before starting liblinphone*/
|
||||
BOOL start_at_boot = [self boolForKey:@"start_at_boot_preference"];
|
||||
|
|
|
|||
|
|
@ -403,9 +403,9 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
|
||||
#pragma mark - Text Received Functions
|
||||
|
||||
- (void)onTextReceived:(LinphoneCore *)lc room:(LinphoneChatRoom *)room from:(const LinphoneAddress *)from message:(const char *)message {
|
||||
- (void)onMessageReceived:(LinphoneCore *)lc room:(LinphoneChatRoom *)room message:(LinphoneChatMessage*)msg {
|
||||
|
||||
char *fromStr = linphone_address_as_string_uri_only(from);
|
||||
char *fromStr = linphone_address_as_string_uri_only(linphone_chat_message_get_from(msg));
|
||||
if(fromStr == NULL)
|
||||
return;
|
||||
|
||||
|
|
@ -413,27 +413,35 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
ChatModel *chat = [[ChatModel alloc] init];
|
||||
[chat setLocalContact:@""];
|
||||
[chat setRemoteContact:[NSString stringWithUTF8String:fromStr]];
|
||||
[chat setMessage:[NSString stringWithUTF8String:message]];
|
||||
[chat setDirection:[NSNumber numberWithInt:1]];
|
||||
if (linphone_chat_message_get_external_body_url(msg)) {
|
||||
[chat setMessage:NSLocalizedString(@"Incoming file",nil)];
|
||||
} else {
|
||||
[chat setMessage:[NSString stringWithUTF8String:linphone_chat_message_get_text(msg)]];
|
||||
}
|
||||
[chat setDirection:[NSNumber numberWithInt:1]];
|
||||
[chat setTime:[NSDate date]];
|
||||
[chat setRead:[NSNumber numberWithInt:0]];
|
||||
[chat create];
|
||||
|
||||
ms_free(fromStr);
|
||||
|
||||
NSString* ext_body_url=nil;
|
||||
if (linphone_chat_message_get_external_body_url(msg)) {
|
||||
ext_body_url=[NSString stringWithUTF8String:linphone_chat_message_get_external_body_url(msg)];
|
||||
}
|
||||
// Post event
|
||||
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSValue valueWithPointer:room], @"room",
|
||||
[NSValue valueWithPointer:from], @"from",
|
||||
[NSString stringWithUTF8String:message], @"message",
|
||||
chat, @"chat",
|
||||
[NSValue valueWithPointer:room], @"room",
|
||||
[NSValue valueWithPointer:linphone_chat_message_get_from(msg)], @"from",
|
||||
chat.message, @"message",
|
||||
chat, @"chat",
|
||||
ext_body_url,@"external_body_url",
|
||||
nil];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kLinphoneTextReceived object:self userInfo:dict];
|
||||
[chat release];
|
||||
}
|
||||
|
||||
static void linphone_iphone_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onTextReceived:lc room:room from:from message:message];
|
||||
static void linphone_iphone_message_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *message) {
|
||||
[(LinphoneManager*)linphone_core_get_user_data(lc) onMessageReceived:lc room:room message:message];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -570,7 +578,8 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
.display_message=linphone_iphone_log,
|
||||
.display_warning=linphone_iphone_log,
|
||||
.display_url=NULL,
|
||||
.text_received=linphone_iphone_text_received,
|
||||
.text_received=NULL,
|
||||
.message_received=linphone_iphone_message_received,
|
||||
.dtmf_received=NULL,
|
||||
.transfer_state_changed=linphone_iphone_transfer_state_changed
|
||||
};
|
||||
|
|
@ -1066,7 +1075,8 @@ static LinphoneCoreVTable linphonec_vtable = {
|
|||
|
||||
|
||||
-(void)lpConfigSetString:(NSString*) value forKey:(NSString*) key {
|
||||
lp_config_set_string(linphone_core_get_config(theLinphoneCore),"app",value?[key UTF8String]:NULL, [value UTF8String]);
|
||||
if (!key) return;
|
||||
lp_config_set_string(linphone_core_get_config(theLinphoneCore),"app",[key UTF8String], value?[value UTF8String]:NULL);
|
||||
}
|
||||
-(NSString*)lpConfigStringForKey:(NSString*) key {
|
||||
if (!theLinphoneCore) {
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@ display_filter_auto_rotate=1
|
|||
|
||||
|
||||
[default_values]
|
||||
reg_expires=600
|
||||
reg_expires=610
|
||||
|
|
@ -156,6 +156,20 @@
|
|||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSGroupSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSTextFieldSpecifier</string>
|
||||
<key>Title</key>
|
||||
<string>sharing server</string>
|
||||
<key>Key</key>
|
||||
<string>file_upload_url_preference</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
2234C8EE15EE744200E18E83 /* chat_message_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = 2234C8ED15EE744200E18E83 /* chat_message_inprogress.png */; };
|
||||
2234C8EF15EE744200E18E83 /* chat_message_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = 2234C8ED15EE744200E18E83 /* chat_message_inprogress.png */; };
|
||||
2237D4091084D7A9001383EE /* ring.wav in Resources */ = {isa = PBXBuildFile; fileRef = 2237D4081084D7A9001383EE /* ring.wav */; };
|
||||
22405EEB16006F0800B92522 /* libmediastreamer_base.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EE916006F0700B92522 /* libmediastreamer_base.a */; };
|
||||
22405EEC16006F0800B92522 /* libmediastreamer_voip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EEA16006F0700B92522 /* libmediastreamer_voip.a */; };
|
||||
22405EEE1600B4E400B92522 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22405EED1600B4E400B92522 /* AssetsLibrary.framework */; };
|
||||
22405F001601C19200B92522 /* ImageViewerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22405EFE1601C19100B92522 /* ImageViewerViewController.m */; };
|
||||
22405F011601C19200B92522 /* ImageViewerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22405EFE1601C19100B92522 /* ImageViewerViewController.m */; };
|
||||
22405F021601C19200B92522 /* ImageViewerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22405EFF1601C19100B92522 /* ImageViewerViewController.xib */; };
|
||||
22405F031601C19200B92522 /* ImageViewerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22405EFF1601C19100B92522 /* ImageViewerViewController.xib */; };
|
||||
2242E313125235120061DDCE /* ring.caf in Resources */ = {isa = PBXBuildFile; fileRef = 2242E312125235120061DDCE /* ring.caf */; };
|
||||
224567C2107B968500F10948 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 224567C1107B968500F10948 /* AVFoundation.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
|
||||
2245F78A1201D38000C4179D /* MoreViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81B111C44E100B04932 /* MoreViewController.xib */; };
|
||||
|
|
@ -53,6 +60,7 @@
|
|||
2264B6D211200342002C2C53 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2264B6D111200342002C2C53 /* SystemConfiguration.framework */; };
|
||||
226CDADF14E2D0B800513B67 /* libbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADD14E2D0B800513B67 /* libbcg729.a */; };
|
||||
226CDAE014E2D0B800513B67 /* libmsbcg729.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226CDADE14E2D0B800513B67 /* libmsbcg729.a */; };
|
||||
226EF06C15FA256B005865C7 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 226EF06B15FA256B005865C7 /* MobileCoreServices.framework */; };
|
||||
226F2ED61344B0EF00F6EF27 /* libopencore-amrwb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */; };
|
||||
226F2ED71344B0EF00F6EF27 /* libopencore-amrnb.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */; };
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 226F2ED51344B0EF00F6EF27 /* libmsamr.a */; };
|
||||
|
|
@ -1133,7 +1141,6 @@
|
|||
D3F9A9EE15AF277E0045320F /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F9A9ED15AF277D0045320F /* UACellBackgroundView.m */; };
|
||||
D3F9A9EF15AF277E0045320F /* UACellBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D3F9A9ED15AF277D0045320F /* UACellBackgroundView.m */; };
|
||||
F476004B147AAF2800FFF19B /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB911475562600DEE054 /* liblinphone.a */; };
|
||||
F476004C147AAF4600FFF19B /* libmediastreamer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB8F147555C800DEE054 /* libmediastreamer.a */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
|
@ -1348,6 +1355,12 @@
|
|||
2234C8E815EE2F7F00E18E83 /* chat_message_not_delivered.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_message_not_delivered.png; path = Resources/chat_message_not_delivered.png; sourceTree = "<group>"; };
|
||||
2234C8ED15EE744200E18E83 /* chat_message_inprogress.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = chat_message_inprogress.png; path = Resources/chat_message_inprogress.png; sourceTree = "<group>"; };
|
||||
2237D4081084D7A9001383EE /* ring.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = ring.wav; path = Resources/ring.wav; sourceTree = "<group>"; };
|
||||
22405EE916006F0700B92522 /* libmediastreamer_base.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer_base.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer_base.a"; sourceTree = "<group>"; };
|
||||
22405EEA16006F0700B92522 /* libmediastreamer_voip.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmediastreamer_voip.a; path = "liblinphone-sdk/apple-darwin/lib/libmediastreamer_voip.a"; sourceTree = "<group>"; };
|
||||
22405EED1600B4E400B92522 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
|
||||
22405EFD1601C19000B92522 /* ImageViewerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageViewerViewController.h; sourceTree = "<group>"; };
|
||||
22405EFE1601C19100B92522 /* ImageViewerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageViewerViewController.m; sourceTree = "<group>"; };
|
||||
22405EFF1601C19100B92522 /* ImageViewerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImageViewerViewController.xib; sourceTree = "<group>"; };
|
||||
2242E312125235120061DDCE /* ring.caf */ = {isa = PBXFileReference; lastKnownFileType = file; name = ring.caf; path = Resources/ring.caf; sourceTree = "<group>"; };
|
||||
224567C1107B968500F10948 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
2248E90C12F7E4CF00220D9C /* UIDigitButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIDigitButton.h; sourceTree = "<group>"; };
|
||||
|
|
@ -1360,6 +1373,7 @@
|
|||
2264B6D111200342002C2C53 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
226CDADD14E2D0B800513B67 /* libbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/libbcg729.a"; sourceTree = "<group>"; };
|
||||
226CDADE14E2D0B800513B67 /* libmsbcg729.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsbcg729.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsbcg729.a"; sourceTree = "<group>"; };
|
||||
226EF06B15FA256B005865C7 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
|
||||
226F2ED31344B0EF00F6EF27 /* libopencore-amrwb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrwb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrwb.a"; sourceTree = "<group>"; };
|
||||
226F2ED41344B0EF00F6EF27 /* libopencore-amrnb.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libopencore-amrnb.a"; path = "liblinphone-sdk/apple-darwin/lib/libopencore-amrnb.a"; sourceTree = "<group>"; };
|
||||
226F2ED51344B0EF00F6EF27 /* libmsamr.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libmsamr.a; path = "liblinphone-sdk/apple-darwin/lib/mediastreamer/plugins/libmsamr.a"; sourceTree = "<group>"; };
|
||||
|
|
@ -2050,6 +2064,10 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
22405EEE1600B4E400B92522 /* AssetsLibrary.framework in Frameworks */,
|
||||
22405EEB16006F0800B92522 /* libmediastreamer_base.a in Frameworks */,
|
||||
22405EEC16006F0800B92522 /* libmediastreamer_voip.a in Frameworks */,
|
||||
226EF06C15FA256B005865C7 /* MobileCoreServices.framework in Frameworks */,
|
||||
22B5F03510CE6B2F00777D97 /* AddressBook.framework in Frameworks */,
|
||||
22B5EFA310CE50BD00777D97 /* AddressBookUI.framework in Frameworks */,
|
||||
2274402F106F335E006EC466 /* AudioToolbox.framework in Frameworks */,
|
||||
|
|
@ -2078,7 +2096,6 @@
|
|||
220FAD3210765B400068D98F /* libgsm.a in Frameworks */,
|
||||
223148E41178A08200637D6A /* libilbc.a in Frameworks */,
|
||||
F476004B147AAF2800FFF19B /* liblinphone.a in Frameworks */,
|
||||
F476004C147AAF4600FFF19B /* libmediastreamer.a in Frameworks */,
|
||||
226F2ED81344B0EF00F6EF27 /* libmsamr.a in Frameworks */,
|
||||
223148E61178A09900637D6A /* libmsilbc.a in Frameworks */,
|
||||
226183B0147259670037138E /* libmssilk.a in Frameworks */,
|
||||
|
|
@ -2229,6 +2246,9 @@
|
|||
D350F20B15A43BB100149E54 /* WizardViewController.h */,
|
||||
D350F20C15A43BB100149E54 /* WizardViewController.m */,
|
||||
D350F20D15A43BB100149E54 /* WizardViewController.xib */,
|
||||
22405EFD1601C19000B92522 /* ImageViewerViewController.h */,
|
||||
22405EFE1601C19100B92522 /* ImageViewerViewController.m */,
|
||||
22405EFF1601C19100B92522 /* ImageViewerViewController.xib */,
|
||||
);
|
||||
path = Classes;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -2590,6 +2610,10 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22405EED1600B4E400B92522 /* AssetsLibrary.framework */,
|
||||
22405EE916006F0700B92522 /* libmediastreamer_base.a */,
|
||||
22405EEA16006F0700B92522 /* libmediastreamer_voip.a */,
|
||||
226EF06B15FA256B005865C7 /* MobileCoreServices.framework */,
|
||||
2258633C11410BAC00C5A737 /* README */,
|
||||
22276E8013C73D3100210156 /* libavcodec.a */,
|
||||
22276E8113C73D3100210156 /* libavutil.a */,
|
||||
|
|
@ -3775,6 +3799,7 @@
|
|||
2234C8E915EE2F7F00E18E83 /* chat_message_delivered.png in Resources */,
|
||||
2234C8EB15EE2F7F00E18E83 /* chat_message_not_delivered.png in Resources */,
|
||||
2234C8EE15EE744200E18E83 /* chat_message_inprogress.png in Resources */,
|
||||
22405F021601C19200B92522 /* ImageViewerViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -4220,6 +4245,7 @@
|
|||
2234C8EA15EE2F7F00E18E83 /* chat_message_delivered.png in Resources */,
|
||||
2234C8EC15EE2F7F00E18E83 /* chat_message_not_delivered.png in Resources */,
|
||||
2234C8EF15EE744200E18E83 /* chat_message_inprogress.png in Resources */,
|
||||
22405F031601C19200B92522 /* ImageViewerViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -4342,6 +4368,7 @@
|
|||
D380800515C28A7A005BE9BC /* UILinphone.m in Sources */,
|
||||
D380801315C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */,
|
||||
D378AB2A15DCDB4A0098505D /* ContactDetailsImagePickerController.m in Sources */,
|
||||
22405F001601C19200B92522 /* ImageViewerViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -4432,6 +4459,7 @@
|
|||
D380800615C28A7A005BE9BC /* UILinphone.m in Sources */,
|
||||
D380801415C299D0005BE9BC /* ColorSpaceUtilites.m in Sources */,
|
||||
D378AB2B15DCDB4A0098505D /* ContactDetailsImagePickerController.m in Sources */,
|
||||
22405F011601C19200B92522 /* ImageViewerViewController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -4491,6 +4519,7 @@
|
|||
HAVE_SILK,
|
||||
DEBUG,
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
@ -4564,6 +4593,7 @@
|
|||
HAVE_X264,
|
||||
HAVE_SILK,
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
@ -4831,6 +4861,7 @@
|
|||
HAVE_X264,
|
||||
HAVE_SILK,
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
@ -4904,6 +4935,7 @@
|
|||
HAVE_X264,
|
||||
HAVE_SILK,
|
||||
);
|
||||
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
submodules/linphone/coreapi,
|
||||
submodules/linphone/mediastreamer2/include,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
221DCB6E153584410025E54D /* yuv2rgb.vs in Sources */ = {isa = PBXBuildFile; fileRef = 221DCB6B153584410025E54D /* yuv2rgb.vs */; };
|
||||
221DCB6F153584410025E54D /* yuv2rgb.vs in Sources */ = {isa = PBXBuildFile; fileRef = 221DCB6B153584410025E54D /* yuv2rgb.vs */; };
|
||||
221F58A013AB50F800D603C9 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 221F589F13AB50F800D603C9 /* CoreMedia.framework */; };
|
||||
221F58A413AB708C00D603C9 /* alldescs.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58A313AB708C00D603C9 /* alldescs.h */; };
|
||||
221F58E413AF44B300D603C9 /* scaler.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58E313AF44B300D603C9 /* scaler.h */; };
|
||||
222CA63211F6CF7600621220 /* allfilters.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA5BE11F6CF7600621220 /* allfilters.h */; };
|
||||
222CA63311F6CF7600621220 /* dsptools.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA5BF11F6CF7600621220 /* dsptools.h */; };
|
||||
|
|
@ -113,6 +112,12 @@
|
|||
222CA78411F6CFB100621220 /* siplogin.c in Sources */ = {isa = PBXBuildFile; fileRef = 222CA76211F6CFB100621220 /* siplogin.c */; };
|
||||
222CA78511F6CFB100621220 /* sipsetup.c in Sources */ = {isa = PBXBuildFile; fileRef = 222CA76311F6CFB100621220 /* sipsetup.c */; };
|
||||
222CA78611F6CFB100621220 /* sipsetup.h in Headers */ = {isa = PBXBuildFile; fileRef = 222CA76411F6CFB100621220 /* sipsetup.h */; };
|
||||
22405EDD160065C200B92522 /* basedescs.h in Headers */ = {isa = PBXBuildFile; fileRef = 22405EDC160065C200B92522 /* basedescs.h */; };
|
||||
22405EE01600668800B92522 /* msvoip.c in Sources */ = {isa = PBXBuildFile; fileRef = 22405EDF1600668800B92522 /* msvoip.c */; };
|
||||
22405EE2160066C700B92522 /* voipdescs.h in Headers */ = {isa = PBXBuildFile; fileRef = 22405EE1160066C700B92522 /* voipdescs.h */; };
|
||||
22405EE51600671D00B92522 /* logging.c in Sources */ = {isa = PBXBuildFile; fileRef = 22405EE31600671D00B92522 /* logging.c */; };
|
||||
22405EE61600671D00B92522 /* rtpprofile.c in Sources */ = {isa = PBXBuildFile; fileRef = 22405EE41600671D00B92522 /* rtpprofile.c */; };
|
||||
22405EE81600675C00B92522 /* genericplc.c in Sources */ = {isa = PBXBuildFile; fileRef = 22405EE71600675C00B92522 /* genericplc.c */; };
|
||||
2258C44113A9377B0087A596 /* swscale.h in Headers */ = {isa = PBXBuildFile; fileRef = 2258C44013A9377B0087A596 /* swscale.h */; };
|
||||
2258C44513A945520087A596 /* libswscale.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2258C44213A945520087A596 /* libswscale.a */; };
|
||||
2258C44613A945520087A596 /* libavutil.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2258C44313A945520087A596 /* libavutil.a */; };
|
||||
|
|
@ -191,7 +196,6 @@
|
|||
225D64761521BFA6008B2E81 /* linphonecore_utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 229B9D5813043EAB00EFCD1C /* linphonecore_utils.h */; };
|
||||
225D64781521BFA6008B2E81 /* nowebcam.h in Headers */ = {isa = PBXBuildFile; fileRef = 220ED1AA13A9062500AC21E0 /* nowebcam.h */; };
|
||||
225D64791521BFA6008B2E81 /* swscale.h in Headers */ = {isa = PBXBuildFile; fileRef = 2258C44013A9377B0087A596 /* swscale.h */; };
|
||||
225D647A1521BFA6008B2E81 /* alldescs.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58A313AB708C00D603C9 /* alldescs.h */; };
|
||||
225D647B1521BFA6008B2E81 /* scaler.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58E313AF44B300D603C9 /* scaler.h */; };
|
||||
225D647C1521BFA6008B2E81 /* g722.h in Headers */ = {isa = PBXBuildFile; fileRef = 229A614B13DDFE3500090183 /* g722.h */; };
|
||||
225D647D1521BFA6008B2E81 /* shaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 70E542F613E14816002BA2C0 /* shaders.h */; };
|
||||
|
|
@ -339,7 +343,6 @@
|
|||
225D65431521C009008B2E81 /* linphonecore_utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 229B9D5813043EAB00EFCD1C /* linphonecore_utils.h */; };
|
||||
225D65451521C009008B2E81 /* nowebcam.h in Headers */ = {isa = PBXBuildFile; fileRef = 220ED1AA13A9062500AC21E0 /* nowebcam.h */; };
|
||||
225D65461521C009008B2E81 /* swscale.h in Headers */ = {isa = PBXBuildFile; fileRef = 2258C44013A9377B0087A596 /* swscale.h */; };
|
||||
225D65471521C009008B2E81 /* alldescs.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58A313AB708C00D603C9 /* alldescs.h */; };
|
||||
225D65481521C009008B2E81 /* scaler.h in Headers */ = {isa = PBXBuildFile; fileRef = 221F58E313AF44B300D603C9 /* scaler.h */; };
|
||||
225D65491521C009008B2E81 /* g722.h in Headers */ = {isa = PBXBuildFile; fileRef = 229A614B13DDFE3500090183 /* g722.h */; };
|
||||
225D654A1521C009008B2E81 /* shaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 70E542F613E14816002BA2C0 /* shaders.h */; };
|
||||
|
|
@ -466,7 +469,6 @@
|
|||
221F589D13AB503F00D603C9 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
|
||||
221F589F13AB50F800D603C9 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
|
||||
221F58A113AB6F8000D603C9 /* pixconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pixconv.c; sourceTree = "<group>"; };
|
||||
221F58A313AB708C00D603C9 /* alldescs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = alldescs.h; path = build/iphone/alldescs.h; sourceTree = "<group>"; };
|
||||
221F58A513AB716300D603C9 /* tonedetector.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tonedetector.c; sourceTree = "<group>"; };
|
||||
221F58A613AB716300D603C9 /* jpegwriter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = jpegwriter.c; sourceTree = "<group>"; };
|
||||
221F58A713AB716300D603C9 /* h264dec.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = h264dec.c; sourceTree = "<group>"; };
|
||||
|
|
@ -639,6 +641,12 @@
|
|||
222CA76311F6CFB100621220 /* sipsetup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sipsetup.c; sourceTree = "<group>"; };
|
||||
222CA76411F6CFB100621220 /* sipsetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sipsetup.h; sourceTree = "<group>"; };
|
||||
22313679143DED490035C1F4 /* msandroidvideo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = msandroidvideo.cpp; sourceTree = "<group>"; };
|
||||
22405EDC160065C200B92522 /* basedescs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = basedescs.h; path = build/iphone/basedescs.h; sourceTree = "<group>"; };
|
||||
22405EDF1600668800B92522 /* msvoip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = msvoip.c; sourceTree = "<group>"; };
|
||||
22405EE1160066C700B92522 /* voipdescs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = voipdescs.h; path = build/iphone/voipdescs.h; sourceTree = "<group>"; };
|
||||
22405EE31600671D00B92522 /* logging.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = logging.c; sourceTree = "<group>"; };
|
||||
22405EE41600671D00B92522 /* rtpprofile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = rtpprofile.c; sourceTree = "<group>"; };
|
||||
22405EE71600675C00B92522 /* genericplc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = genericplc.c; sourceTree = "<group>"; };
|
||||
224AD571143208BB00510FF3 /* android-display.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "android-display.c"; path = "../../../../../../workspace-android/linphone-android/submodules/linphone/mediastreamer2/src/android-display.c"; sourceTree = "<group>"; };
|
||||
224AD57314320EB400510FF3 /* scaler_arm.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = scaler_arm.S; path = "../../../../../../workspace-android/linphone-android/submodules/linphone/mediastreamer2/src/scaler_arm.S"; sourceTree = "<group>"; };
|
||||
22512698145F13CE0041FBF2 /* aqsnd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aqsnd.c; sourceTree = "<group>"; };
|
||||
|
|
@ -846,8 +854,9 @@
|
|||
222CA4CF11F6CF2000621220 /* mediastreamer2 */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22405EE1160066C700B92522 /* voipdescs.h */,
|
||||
22405EDC160065C200B92522 /* basedescs.h */,
|
||||
22B5106813AFD37B00CD87DA /* nowebcamCIF.jpg */,
|
||||
221F58A313AB708C00D603C9 /* alldescs.h */,
|
||||
22DD19E013A8D82C0018ECD4 /* tests */,
|
||||
222CA5B811F6CF7600621220 /* include */,
|
||||
222CA5DC11F6CF7600621220 /* src */,
|
||||
|
|
@ -916,6 +925,8 @@
|
|||
222CA5DC11F6CF7600621220 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22405EE71600675C00B92522 /* genericplc.c */,
|
||||
22405EDF1600668800B92522 /* msvoip.c */,
|
||||
221DCB6A153584410025E54D /* yuv2rgb.fs */,
|
||||
221DCB6B153584410025E54D /* yuv2rgb.vs */,
|
||||
221DCB6715347EF80025E54D /* opengles_display.c */,
|
||||
|
|
@ -1045,6 +1056,8 @@
|
|||
222CA6B611F6CF9F00621220 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22405EE31600671D00B92522 /* logging.c */,
|
||||
22405EE41600671D00B92522 /* rtpprofile.c */,
|
||||
F4D9F23D145710540035B0D0 /* netsim.c */,
|
||||
F4D9F23E145710540035B0D0 /* ortp_srtp.c */,
|
||||
7014533D13FA841E00A01D86 /* zrtp.c */,
|
||||
|
|
@ -1281,11 +1294,12 @@
|
|||
225D64761521BFA6008B2E81 /* linphonecore_utils.h in Headers */,
|
||||
225D64781521BFA6008B2E81 /* nowebcam.h in Headers */,
|
||||
225D64791521BFA6008B2E81 /* swscale.h in Headers */,
|
||||
225D647A1521BFA6008B2E81 /* alldescs.h in Headers */,
|
||||
225D647B1521BFA6008B2E81 /* scaler.h in Headers */,
|
||||
225D647C1521BFA6008B2E81 /* g722.h in Headers */,
|
||||
225D647D1521BFA6008B2E81 /* shaders.h in Headers */,
|
||||
225D64811521BFA6008B2E81 /* zrtp.h in Headers */,
|
||||
22405EDD160065C200B92522 /* basedescs.h in Headers */,
|
||||
22405EE2160066C700B92522 /* voipdescs.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -1367,7 +1381,6 @@
|
|||
225D65431521C009008B2E81 /* linphonecore_utils.h in Headers */,
|
||||
225D65451521C009008B2E81 /* nowebcam.h in Headers */,
|
||||
225D65461521C009008B2E81 /* swscale.h in Headers */,
|
||||
225D65471521C009008B2E81 /* alldescs.h in Headers */,
|
||||
225D65481521C009008B2E81 /* scaler.h in Headers */,
|
||||
225D65491521C009008B2E81 /* g722.h in Headers */,
|
||||
225D654A1521C009008B2E81 /* shaders.h in Headers */,
|
||||
|
|
@ -1453,7 +1466,6 @@
|
|||
229B9D5913043EAB00EFCD1C /* linphonecore_utils.h in Headers */,
|
||||
220ED1AC13A9062600AC21E0 /* nowebcam.h in Headers */,
|
||||
2258C44113A9377B0087A596 /* swscale.h in Headers */,
|
||||
221F58A413AB708C00D603C9 /* alldescs.h in Headers */,
|
||||
221F58E413AF44B300D603C9 /* scaler.h in Headers */,
|
||||
229A614F13DDFE3500090183 /* g722.h in Headers */,
|
||||
70E542FA13E14816002BA2C0 /* shaders.h in Headers */,
|
||||
|
|
@ -1658,6 +1670,8 @@
|
|||
221DCB6915347EF80025E54D /* opengles_display.c in Sources */,
|
||||
221DCB6D153584410025E54D /* yuv2rgb.fs in Sources */,
|
||||
221DCB6F153584410025E54D /* yuv2rgb.vs in Sources */,
|
||||
22405EE01600668800B92522 /* msvoip.c in Sources */,
|
||||
22405EE81600675C00B92522 /* genericplc.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -1690,6 +1704,8 @@
|
|||
225D65B41521C009008B2E81 /* zrtp.c in Sources */,
|
||||
225D65B81521C009008B2E81 /* netsim.c in Sources */,
|
||||
225D65B91521C009008B2E81 /* ortp_srtp.c in Sources */,
|
||||
22405EE51600671D00B92522 /* logging.c in Sources */,
|
||||
22405EE61600671D00B92522 /* rtpprofile.c in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 88703bcc139e124598732b0babc762fddff0309c
|
||||
Subproject commit 8004607607c344a0f1dd09d1854848fca0e52d59
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit d3a6a0a130730c0eaf9a0b6ed2fc466432852684
|
||||
Subproject commit f9015a91ca056cc5be577dfb78c7c224f1fd77b2
|
||||
Loading…
Add table
Reference in a new issue