diff --git a/Classes/VoiceBase/MGMAddons.m b/Classes/VoiceBase/MGMAddons.m index 1437acf..d4782e7 100644 --- a/Classes/VoiceBase/MGMAddons.m +++ b/Classes/VoiceBase/MGMAddons.m @@ -136,7 +136,8 @@ number = [number replace:@"-" with:@""]; number = [number replace:@")" with:@""]; number = [number replace:@"(" with:@""]; - number = [number replace:@"+" with:@""]; + number = [number replace:@"+1" with:@"1"]; + number = [number replace:@"+" with:@"011"]; number = [number replace:@"." with:@""]; return number; } @@ -195,15 +196,30 @@ - (NSString *)readableNumber { NSString *number = [[self removePhoneWhiteSpace] littersToNumbers]; if (![number hasPrefix:@"011"]) { - if ([number length]>7) { - if ([number hasPrefix:@"1"]) - number = [number substringFromIndex:1]; + if ([number length]==10) { NSString *areaCode = [number substringToIndex:3]; number = [number substringFromIndex:3]; NSString *firstNumbers = [number substringToIndex:3]; number = [number substringFromIndex:3]; number = [NSString stringWithFormat:@"(%@) %@-%@", areaCode, firstNumbers, number]; + } else if ([number length]==11 && [number hasPrefix:@"1"]) { + number = [number substringFromIndex:1]; + NSString *areaCode = [number substringToIndex:3]; + number = [number substringFromIndex:3]; + NSString *firstNumbers = [number substringToIndex:3]; + number = [number substringFromIndex:3]; + if ([areaCode isEqual:@"800"]) + number = [NSString stringWithFormat:@"1 (%@) %@-%@", areaCode, firstNumbers, number]; + else + number = [NSString stringWithFormat:@"(%@) %@-%@", areaCode, firstNumbers, number]; + } else if ([number length]>=7 && [number length]<=10) { + NSString *firstNumbers = [number substringToIndex:3]; + number = [number substringFromIndex:3]; + number = [NSString stringWithFormat:@"%@-%@", firstNumbers, number]; } + } else { + number = [number substringFromIndex:3]; + number = [@"+" stringByAppendingString:number]; } return number; } @@ -1404,7 +1420,8 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont [graphicsContext setShouldAntialias:YES]; [image drawInRect:NSMakeRect(0, 0, scaledWidth, scaledHeight) fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; [newImage unlockFocus]; - scaledData = [newImage TIFFRepresentation]; + NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:[newImage TIFFRepresentation]]; + scaledData = [imageRep representationUsingType:NSPNGFileType properties:nil]; [newImage release]; } #endif diff --git a/Classes/VoiceBase/SIP/MGMSIP.h b/Classes/VoiceBase/SIP/MGMSIP.h index cc7d199..fd6c45a 100644 --- a/Classes/VoiceBase/SIP/MGMSIP.h +++ b/Classes/VoiceBase/SIP/MGMSIP.h @@ -11,9 +11,9 @@ #import #else #import +#import #endif #import -#import @class MGMSIPAccount, MGMSIPCall; @@ -107,8 +107,10 @@ typedef enum { int ringbackCount; +#if !TARGET_OS_IPHONE SCDynamicStoreRef store; CFRunLoopSourceRef storeRunLoop; +#endif } + (MGMSIP *)sharedSIP; diff --git a/Classes/VoiceBase/SIP/MGMSIP.m b/Classes/VoiceBase/SIP/MGMSIP.m index c7e9ca3..2f0c94a 100644 --- a/Classes/VoiceBase/SIP/MGMSIP.m +++ b/Classes/VoiceBase/SIP/MGMSIP.m @@ -279,12 +279,12 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void - (void)dealloc { #if !TARGET_OS_IPHONE [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self]; -#endif [self stop]; if (storeRunLoop!=NULL) CFRunLoopRemoveSource(CFRunLoopGetCurrent(), storeRunLoop, kCFRunLoopDefaultMode); if (store!=NULL) CFRelease(store); +#endif if (lock!=nil) [lock release]; if (accounts!=nil) diff --git a/Classes/VoiceBase/XML/MGMXMLNode.h b/Classes/VoiceBase/XML/MGMXMLNode.h index 54c0065..ba9cd64 100644 --- a/Classes/VoiceBase/XML/MGMXMLNode.h +++ b/Classes/VoiceBase/XML/MGMXMLNode.h @@ -8,10 +8,11 @@ #if TARGET_OS_IPHONE #import +#import #else #import -#endif #import +#endif #import #import #import @@ -71,7 +72,7 @@ struct _xmlCom { xmlNsPtr namespaceXML; xmlNodePtr parentNode; MGMXMLNodeKind type; - MGMXMLNode *documentNode; + MGMXMLDocument *documentNode; } + (id)nodeWithTypeXMLPtr:(xmlTypPtr)theXMLPtr; - (id)initWithTypeXMLPtr:(xmlTypPtr)theXMLPtr; diff --git a/Classes/VoiceBase/XML/MGMXMLNode.m b/Classes/VoiceBase/XML/MGMXMLNode.m index 8ed85ca..78ca88c 100644 --- a/Classes/VoiceBase/XML/MGMXMLNode.m +++ b/Classes/VoiceBase/XML/MGMXMLNode.m @@ -84,9 +84,9 @@ static void MGMXMLErrorHandler(void *userData, xmlErrorPtr error) { parentNode = NULL; } if (commonXML!=NULL) { + commonXML->_private = NULL; if (type!=MGMXMLDocumentKind) [self releaseDocument]; - commonXML->_private = NULL; if (commonXML->parent==NULL) { if (type==MGMXMLDocumentKind) { @@ -225,7 +225,7 @@ static void MGMXMLErrorHandler(void *userData, xmlErrorPtr error) { else if (type==MGMXMLElementKind && [self isMemberOfClass:[MGMXMLNode class]]) self->isa = [MGMXMLElement class]; if (type!=MGMXMLDocumentKind) - documentNode = [[MGMXMLNode alloc] initWithTypeXMLPtr:(xmlTypPtr)commonXML->doc]; + documentNode = [[MGMXMLDocument alloc] initWithTypeXMLPtr:(xmlTypPtr)commonXML->doc]; } } - (void)releaseDocument { diff --git a/Classes/VoiceMac/MGMContactsController.m b/Classes/VoiceMac/MGMContactsController.m index a840ea5..915eaa1 100644 --- a/Classes/VoiceMac/MGMContactsController.m +++ b/Classes/VoiceMac/MGMContactsController.m @@ -117,7 +117,7 @@ NSString *MGMContactsWindowOpen = @"MGMContactsWindowOpen"; [(MGMViewCell *)cell addSubview:[contactViews objectAtIndex:row-contactsVisible.location]]; } @catch (NSException *e) { - NSLog(@"Contact error, ignoreing. %@", e); + NSLog(@"Contact error, ignoring. %@", e); } [filterLock unlock]; } diff --git a/Classes/VoiceMac/Views/MGMContactView.m b/Classes/VoiceMac/Views/MGMContactView.m index 3e67351..042b5f0 100644 --- a/Classes/VoiceMac/Views/MGMContactView.m +++ b/Classes/VoiceMac/Views/MGMContactView.m @@ -63,20 +63,18 @@ - (void)setContact:(NSDictionary *)theContact { if (contact!=nil) [contact release]; contact = [theContact mutableCopy]; - if ([contact objectForKey:MGMCPhoto]==nil || [[contact objectForKey:MGMCPhoto] isKindOfClass:[NSNull class]]) { + if ([contact objectForKey:MGMCPhoto]==nil || [[contact objectForKey:MGMCPhoto] isKindOfClass:[NSNull class]]) [photoView setImage:[[[NSImage alloc] initWithContentsOfFile:[themeManager incomingIconPath]] autorelease]]; - } else { + else [photoView setImage:[[[NSImage alloc] initWithData:[contact objectForKey:MGMCPhoto]] autorelease]]; - } if ([[contact objectForKey:MGMCName] isEqual:@""]) [nameField setStringValue:[contact objectForKey:MGMCCompany]]; else [nameField setStringValue:[contact objectForKey:MGMCName]]; - if ([[contact objectForKey:MGMCLabel] isEqual:@""]) { + if ([[contact objectForKey:MGMCLabel] isEqual:@""]) [phoneField setStringValue:[[contact objectForKey:MGMCNumber] readableNumber]]; - } else { + else [phoneField setStringValue:[NSString stringWithFormat:@"%@ %@", [[contact objectForKey:MGMCNumber] readableNumber], [contact objectForKey:MGMCLabel]]]; - } } - (void)setFontColor:(NSColor *)theColor { diff --git a/Classes/VoiceMob/MGMAccountController.h b/Classes/VoiceMob/MGMAccountController.h new file mode 100644 index 0000000..17904dd --- /dev/null +++ b/Classes/VoiceMob/MGMAccountController.h @@ -0,0 +1,51 @@ +// +// MGMAccountController.h +// VoiceMob +// +// Created by Mr. Gecko on 9/27/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMAccountController, MGMController, MGMAccounts, MGMUser; + +@protocol MGMAccountProtocol +- (MGMAccountController *)accountController; +- (MGMUser *)user; +- (NSString *)title; +- (NSString *)areaCode; + +- (UIView *)view; +- (void)releaseView; +@end + + +@interface MGMAccountController : NSObject { + MGMController *controller; + + NSMutableArray *contactsControllers; + int currentContactsController; + MGMAccounts *accounts; + IBOutlet UIView *view; + IBOutlet UIToolbar *toolbar; + NSArray *accountsItems; + NSArray *accountItems; + IBOutlet UILabel *titleField; + IBOutlet UIView *contentView; +} +- (id)initWithController:(MGMController *)theController; + +- (void)registerDefaults; + +- (MGMController *)controller; +- (UIView *)view; + +- (BOOL)isCurrent:(id)theUser; +- (void)setTitle:(NSString *)theTitle; + +- (IBAction)showAccounts:(id)sender; +- (IBAction)showSettings:(id)sender; + +- (void)showUser:(MGMUser *)theUser; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMAccountController.m b/Classes/VoiceMob/MGMAccountController.m new file mode 100644 index 0000000..989d503 --- /dev/null +++ b/Classes/VoiceMob/MGMAccountController.m @@ -0,0 +1,232 @@ +// +// MGMAccountController.m +// VoiceMob +// +// Created by Mr. Gecko on 9/27/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMAccountController.h" +#import "MGMController.h" +#import "MGMAccounts.h" +#import "MGMVoiceUser.h" +#import "MGMSIPUser.h" +#import "MGMVMAddons.h" +#import "MGMAccountSetup.h" +#import +#import + +NSString * const MGMLastContactsController = @"MGMLastContactsController"; + +NSString * const MGMAccountsTitle = @"Accounts"; + +@implementation MGMAccountController +- (id)initWithController:(MGMController *)theController { + if (self = [super init]) { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"AccountController"] owner:self options:nil]) { + NSLog(@"Unable to load Account Controller"); + [self release]; + self = nil; + } else { + controller = theController; + + [self registerDefaults]; + + contactsControllers = [NSMutableArray new]; + NSArray *lastUsers = [MGMUser lastUsers]; + for (int i=0; i<[lastUsers count]; i++) { + MGMUser *user = [MGMUser userWithID:[lastUsers objectAtIndex:i]]; + if ([[user settingForKey:MGMSAccountType] isEqual:MGMSGoogleVoice]) { + [contactsControllers addObject:[MGMVoiceUser voiceUser:user accountController:self]]; + } +#if MGMSIPENABLED + else if ([[user settingForKey:MGMSAccountType] isEqual:MGMSSIP]) { + if (![[MGMSIP sharedSIP] isStarted]) [[MGMSIP sharedSIP] start]; + [contactsControllers addObject:[MGMSIPUser SIPUser:user accountController:self]]; + } +#endif + } + currentContactsController = [[NSUserDefaults standardUserDefaults] integerForKey:MGMLastContactsController]; + + accounts = [[MGMAccounts alloc] initWithAccountController:self]; + accountsItems = [[NSArray arrayWithObjects:[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:NULL] autorelease], [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addAccount:)] autorelease], nil] retain]; + accountItems = [[toolbar items] copy]; + if ([contactsControllers count]==0 || currentContactsController==-1) { + [toolbar setItems:accountsItems animated:NO]; + [contentView addSubview:[accounts view]]; + [self setTitle:MGMAccountsTitle]; + } else { + id contactsController = [contactsControllers objectAtIndex:currentContactsController]; + [toolbar setItems:accountItems animated:NO]; + [contentView addSubview:[contactsController view]]; + + [self setTitle:[contactsController title]]; + } + + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter addObserver:self selector:@selector(userStarted:) name:MGMUserStartNotification object:nil]; + [notificationCenter addObserver:self selector:@selector(userDone:) name:MGMUserDoneNotification object:nil]; + } + } + return self; +} +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + if (contactsControllers!=nil) + [contactsControllers release]; + if (accounts!=nil) + [accounts release]; + if (view!=nil) + [view release]; + if (accountsItems!=nil) + [accountsItems release]; + if (accountItems!=nil) + [accountItems release]; + [super dealloc]; +} + +- (void)registerDefaults { + NSMutableDictionary *defaults = [NSMutableDictionary dictionary]; + [defaults setObject:[NSNumber numberWithInt:-1] forKey:MGMLastContactsController]; + [[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; +} + +- (MGMController *)controller { + return controller; +} +- (UIView *)view { + return view; +} + +- (BOOL)isCurrent:(id)theUser { + return ([contactsControllers indexOfObject:theUser]==currentContactsController); +} +- (void)setTitle:(NSString *)theTitle { + [titleField setText:theTitle]; +} + +- (IBAction)addAccount:(id)sender { + [controller showAccountSetup]; +} + +- (IBAction)showAccounts:(id)sender { + id contactsController = [contactsControllers objectAtIndex:currentContactsController]; + currentContactsController = -1; + [[NSUserDefaults standardUserDefaults] setInteger:currentContactsController forKey:MGMLastContactsController]; + [toolbar setItems:accountsItems animated:YES]; + [self setTitle:MGMAccountsTitle]; + CGRect inViewFrame = [[accounts view] frame]; + inViewFrame.origin.x -= inViewFrame.size.width; + [[accounts view] setFrame:inViewFrame]; + [contentView addSubview:[accounts view]]; + [UIView beginAnimations:nil context:contactsController]; + [UIView setAnimationDuration:0.5]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(contactsControllerAnimationDidStop:finished:contactsController:)]; + [[accounts view] setFrame:[[contactsController view] frame]]; + CGRect outViewFrame = [[contactsController view] frame]; + outViewFrame.origin.x += outViewFrame.size.width; + [[contactsController view] setFrame:outViewFrame]; + [UIView commitAnimations]; +} +- (IBAction)showSettings:(id)sender { + +} + +- (void)userStarted:(NSNotification *)theNotification { + MGMUser *user = [theNotification object]; + if ([[user settingForKey:MGMSAccountType] isEqual:MGMSGoogleVoice]) { + [contactsControllers addObject:[MGMVoiceUser voiceUser:user accountController:self]]; + } +#if MGMSIPENABLED + else if ([[user settingForKey:MGMSAccountType] isEqual:MGMSSIP]) { + if (![[MGMSIP sharedSIP] isStarted]) [[MGMSIP sharedSIP] start]; + [contactsControllers addObject:[MGMSIPUser SIPUser:user accountController:self]]; + } +#endif +} +- (void)userDone:(NSNotification *)theNotification { + for (int i=0; i<[contactsControllers count]; i++) { + if ([[contactsControllers objectAtIndex:i] isKindOfClass:[MGMVoiceUser class]]) { + MGMVoiceUser *voiceUser = [contactsControllers objectAtIndex:i]; + if ([[voiceUser user] isEqual:[theNotification object]]) { + if (currentContactsController==i) { + currentContactsController = -1; + [[NSUserDefaults standardUserDefaults] setInteger:currentContactsController forKey:MGMLastContactsController]; + } else { + [contactsControllers removeObject:voiceUser]; + } + break; + } + } +#if MGMSIPENABLED + else if ([[contactsControllers objectAtIndex:i] isKindOfClass:[MGMSIPUser class]]) { + MGMSIPUser *SIPUser = [contactsControllers objectAtIndex:i]; + if ([[SIPUser user] isEqual:[theNotification object]]) { + if (currentContactsController==i) { + currentContactsController = -1; + [[NSUserDefaults standardUserDefaults] setInteger:currentContactsController forKey:MGMLastContactsController]; + } else { + [contactsControllers removeObject:SIPUser]; + } + } + } +#endif + } +} + +- (void)showUser:(MGMUser *)theUser { + id contactsController = nil; + for (int i=0; i<[contactsControllers count]; i++) { + if ([[[contactsControllers objectAtIndex:i] user] isEqual:theUser]) { + contactsController = [contactsControllers objectAtIndex:i]; + break; + } + } + if (contactsController==nil) { + if ([[theUser settingForKey:MGMSAccountType] isEqual:MGMSGoogleVoice]) { + contactsController = [MGMVoiceUser voiceUser:theUser accountController:self]; + [contactsControllers addObject:contactsController]; + } +#if MGMSIPENABLED + else if ([[theUser settingForKey:MGMSAccountType] isEqual:MGMSSIP]) { + if (![[MGMSIP sharedSIP] isStarted]) [[MGMSIP sharedSIP] start]; + contactsController = [MGMSIPUser SIPUser:theUser accountController:self]; + [contactsControllers addObject:contactsController]; + } +#endif + } + if ([theUser isStarted]) { + currentContactsController = [contactsControllers indexOfObject:contactsController]; + [[NSUserDefaults standardUserDefaults] setInteger:currentContactsController forKey:MGMLastContactsController]; + } + [toolbar setItems:nil animated:YES]; + [self setTitle:[contactsController title]]; + + CGRect inViewFrame = [[contactsController view] frame]; + inViewFrame.origin.x += inViewFrame.size.width; + [[contactsController view] setFrame:inViewFrame]; + [contentView addSubview:[contactsController view]]; + [UIView beginAnimations:nil context:accounts]; + [UIView setAnimationDuration:0.5]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(contactsControllerAnimationDidStop:finished:contactsController:)]; + [[contactsController view] setFrame:[[accounts view] frame]]; + CGRect outViewFrame = [[accounts view] frame]; + outViewFrame.origin.x -= outViewFrame.size.width; + [[accounts view] setFrame:outViewFrame]; + [UIView commitAnimations]; +} +- (void)contactsControllerAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished contactsController:(id)theContactsController { + [[theContactsController view] removeFromSuperview]; + [theContactsController releaseView]; + if ([theContactsController isKindOfClass:[MGMAccounts class]]) { + [toolbar setItems:accountItems animated:YES]; + } else { + if (![[theContactsController user] isStarted]) + [contactsControllers removeObject:theContactsController]; + } +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMAccountSetup.h b/Classes/VoiceMob/MGMAccountSetup.h index 64e69c0..5c63372 100644 --- a/Classes/VoiceMob/MGMAccountSetup.h +++ b/Classes/VoiceMob/MGMAccountSetup.h @@ -8,9 +8,19 @@ #import -@class MGMUser, MGMInstance, MGMURLConnectionManager, MGMSIPAccount; +extern NSString * const MGMSGoogleVoice; +extern NSString * const MGMSGoogleContacts; +extern NSString * const MGMSSIP; +extern NSString * const MGMSAccountType; + +extern NSString * const MGMSIPDefaultDomain; + +@class MGMController, MGMUser, MGMInstance, MGMURLConnectionManager, MGMSIPAccount; @interface MGMAccountSetup : NSObject { + MGMController *controller; + BOOL setupOnly; + IBOutlet UIView *setupView; CGRect setupRect; CGRect setupKeyboardRect; @@ -83,10 +93,14 @@ IBOutlet UIView *S9View; IBOutlet UITextView *S9MessageField; } +- (id)initWithController:(MGMController *)theController; + - (UIView *)view; - (IBAction)closeKeyboard:(id)sender; +- (void)setSetupOnly:(BOOL)isSetupOnly; +- (void)setStep:(int)theStep; - (void)displayStep; - (IBAction)back:(id)sender; - (IBAction)continue:(id)sender; diff --git a/Classes/VoiceMob/MGMAccountSetup.m b/Classes/VoiceMob/MGMAccountSetup.m index debd531..55a41b9 100644 --- a/Classes/VoiceMob/MGMAccountSetup.m +++ b/Classes/VoiceMob/MGMAccountSetup.m @@ -7,6 +7,7 @@ // #import "MGMAccountSetup.h" +#import "MGMController.h" #import "MGMSIPUser.h" #import "MGMVMAddons.h" #import @@ -33,16 +34,20 @@ NSString * const MGMS7SIPWaiting = @"Waiting for Registration Status."; NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; @implementation MGMAccountSetup -- (id)init { +- (id)initWithController:(MGMController *)theController { if (self = [super init]) { if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"AccountSetup"] owner:self options:nil]) { NSLog(@"Unable to load Account Setup"); + [self release]; + self = nil; } else { + controller = theController; + displaying = NO; needsDisplay = NO; goingBack = NO; - step = 1; - accountType = 1; + [self setSetupOnly:NO]; + accountType = 0; accountsCreated = [NSMutableArray new]; S7ConnectionManager = [[MGMURLConnectionManager managerWithCookieStorage:nil] retain]; setupRect = [setupView frame]; @@ -55,6 +60,24 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; - (void)dealloc { if (setupView!=nil) [setupView release]; + if (S1View!=nil) + [S1View release]; + if (S2View!=nil) + [S2View release]; + if (S3View!=nil) + [S3View release]; + if (S4View!=nil) + [S4View release]; + if (S5View!=nil) + [S5View release]; + if (S6View!=nil) + [S6View release]; + if (S7View!=nil) + [S7View release]; + if (S8View!=nil) + [S8View release]; + if (S9View!=nil) + [S9View release]; if (accountsCreated!=nil) [accountsCreated release]; if (S7CheckUser!=nil) @@ -73,6 +96,8 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; } - (UIView *)view { + if (lastView==nil) + [self displayStep]; return setupView; } @@ -80,6 +105,13 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; } +- (void)setSetupOnly:(BOOL)isSetupOnly { + setupOnly = isSetupOnly; + if (setupOnly) + step = 2; + else + step = 1; +} - (void)setStep:(int)theStep { step = theStep; } @@ -100,7 +132,10 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; case 2: nextView = S2View; [titleField setText:@"Account Setup"]; - [backButton setTitle:MGMSGoBack]; + if (setupOnly) + [backButton setTitle:MGMSCancel]; + else + [backButton setTitle:MGMSGoBack]; [backButton setEnabled:YES]; [continueButton setTitle:MGMSContinue]; [continueButton setEnabled:YES]; @@ -205,22 +240,7 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; displaying = YES; if (goingBack) { CGRect inViewFrame = [nextView frame]; - inViewFrame.origin.x = -inViewFrame.size.width; - [nextView setFrame:inViewFrame]; - [view addSubview:nextView]; - [UIView beginAnimations:@"push" context:nil]; - [UIView setAnimationDuration:0.5]; - [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; - [UIView setAnimationDelegate:self]; - [UIView setAnimationDidStopSelector:@selector(displayAnimationDidStop:finished:context:)]; - [nextView setFrame:[lastView frame]]; - CGRect outViewFrame = [lastView frame]; - outViewFrame.origin.x = outViewFrame.size.width; - [lastView setFrame:outViewFrame]; - [UIView commitAnimations]; - } else { - CGRect inViewFrame = [nextView frame]; - inViewFrame.origin.x = inViewFrame.size.width; + inViewFrame.origin.x -= inViewFrame.size.width; [nextView setFrame:inViewFrame]; [view addSubview:nextView]; [UIView beginAnimations:nil context:nil]; @@ -230,7 +250,22 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; [UIView setAnimationDidStopSelector:@selector(displayAnimationDidStop:finished:context:)]; [nextView setFrame:[lastView frame]]; CGRect outViewFrame = [lastView frame]; - outViewFrame.origin.x = -outViewFrame.size.width; + outViewFrame.origin.x += outViewFrame.size.width; + [lastView setFrame:outViewFrame]; + [UIView commitAnimations]; + } else { + CGRect inViewFrame = [nextView frame]; + inViewFrame.origin.x += inViewFrame.size.width; + [nextView setFrame:inViewFrame]; + [view addSubview:nextView]; + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:0.5]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(displayAnimationDidStop:finished:context:)]; + [nextView setFrame:[lastView frame]]; + CGRect outViewFrame = [lastView frame]; + outViewFrame.origin.x -= outViewFrame.size.width; [lastView setFrame:outViewFrame]; [UIView commitAnimations]; } @@ -252,6 +287,11 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; - (IBAction)back:(id)sender { switch (step) { case 2: + if (setupOnly) { + [accountsCreated makeObjectsPerformSelector:@selector(start)]; + [controller dismissAccountSetup:self]; + return; + } step--; break; case 4: @@ -297,7 +337,7 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; UIAlertView *theAlert = [[UIAlertView new] autorelease]; [theAlert setTitle:@"Unable to Add Account"]; [theAlert setMessage:@"MGMSIP is not compiled with VoiceMob, you can not add a SIP account without first compiling with MGMSIP."]; - [theAlert addButtonWithTitle:@"Ok"]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; [theAlert show]; return; #endif @@ -326,7 +366,7 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; UIAlertView *theAlert = [[UIAlertView new] autorelease]; [theAlert setTitle:@"Missing Information"]; [theAlert setMessage:@"It appears as if you did not fill the required fields, please fill out the required fields and then continue."]; - [theAlert addButtonWithTitle:@"Ok"]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; [theAlert show]; return; } @@ -335,7 +375,7 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; } case 9: [accountsCreated makeObjectsPerformSelector:@selector(start)]; - [self release]; + [controller dismissAccountSetup:self]; return; default: step++; @@ -595,7 +635,7 @@ NSString * const MGMSIPDefaultDomain = @"proxy01.sipphone.com"; //Step 9 - (IBAction)S9AddAnotherAccount:(id)sender { goingBack = YES; - step = 2; + [self setSetupOnly:YES]; [self displayStep]; } @end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMAccounts.h b/Classes/VoiceMob/MGMAccounts.h new file mode 100644 index 0000000..d2dec14 --- /dev/null +++ b/Classes/VoiceMob/MGMAccounts.h @@ -0,0 +1,22 @@ +// +// MGMAccounts.h +// VoiceMob +// +// Created by Mr. Gecko on 9/27/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMAccountController; + +@interface MGMAccounts : NSObject { + MGMAccountController *accountController; + + IBOutlet UITableView *tableView; +} +- (id)initWithAccountController:(MGMAccountController *)theAccountController; + +- (UIView *)view; +- (void)releaseView; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMAccounts.m b/Classes/VoiceMob/MGMAccounts.m new file mode 100644 index 0000000..a3fa471 --- /dev/null +++ b/Classes/VoiceMob/MGMAccounts.m @@ -0,0 +1,97 @@ +// +// MGMAccounts.m +// VoiceMob +// +// Created by Mr. Gecko on 9/27/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMAccounts.h" +#import "MGMAccountController.h" +#import "MGMAccountSetup.h" +#import "MGMVMAddons.h" +#import +#import + +NSString * const MGMAccountCellIdentifier = @"MGMAccountCellIdentifier"; + +@implementation MGMAccounts +- (id)initWithAccountController:(MGMAccountController *)theAccountController { + if (self = [super init]) { + accountController = theAccountController; + } + return self; +} +- (void)dealloc { + [self releaseView]; + [super dealloc]; +} + +- (UIView *)view { + if (tableView==nil) { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"Accounts"] owner:self options:nil]) { + NSLog(@"Unable to load Accounts"); + [self release]; + self = nil; + } else { + NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; + [notificationCenter addObserver:tableView selector:@selector(reloadData) name:MGMUserStartNotification object:nil]; + [notificationCenter addObserver:tableView selector:@selector(reloadData) name:MGMUserDoneNotification object:nil]; + } + } + return tableView; +} +- (void)releaseView { + if (tableView!=nil) { + [tableView release]; + tableView = nil; + [[NSNotificationCenter defaultCenter] removeObserver:self]; + } +} + +- (NSInteger)tableView:(UITableView *)theTableView numberOfRowsInSection:(NSInteger)section { + return [[MGMUser users] count]; +} +- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MGMAccountCellIdentifier]; + if (cell==nil) { + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MGMAccountCellIdentifier] autorelease]; + [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; + } + NSArray *users = [MGMUser users]; + if ([users count]<=[indexPath indexAtPosition:1]) { + [cell setText:@"Unknown"]; + } else { + [cell setText:[[MGMUser userNames] objectAtIndex:[indexPath indexAtPosition:1]]]; + MGMUser *user = [MGMUser userWithID:[users objectAtIndex:[indexPath indexAtPosition:1]]]; + if ([[user settingForKey:MGMSAccountType] isEqual:MGMSSIP]) { + if ([user settingForKey:MGMSIPAccountFullName]!=nil && ![[user settingForKey:MGMSIPAccountFullName] isEqual:@""]) + [cell setText:[user settingForKey:MGMSIPAccountFullName]]; + } + } + return cell; +} +- (BOOL)tableView:(UITableView *)theTableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { + return YES; +} +- (UITableViewCellEditingStyle)tableView:(UITableView *)theTableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { + return UITableViewCellEditingStyleDelete; +} +- (NSString *)tableView:(UITableView *)theTableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath { + return @"Remove"; +} +- (void)tableView:(UITableView *)theTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { + MGMUser *user = [MGMUser userWithID:[[MGMUser users] objectAtIndex:[indexPath indexAtPosition:1]]]; + if ([user isStarted]) { + [user done]; + if ([user isStarted]) + return; + } + [user remove]; + [tableView reloadData]; +} +- (void)tableView:(UITableView *)theTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + MGMUser *user = [MGMUser userWithID:[[MGMUser users] objectAtIndex:[indexPath indexAtPosition:1]]]; + [accountController showUser:user]; +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMContactsController.h b/Classes/VoiceMob/MGMContactsController.h new file mode 100644 index 0000000..1ea9741 --- /dev/null +++ b/Classes/VoiceMob/MGMContactsController.h @@ -0,0 +1,48 @@ +// +// MGMContactsController.h +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMAccountController, MGMContacts; + +@interface MGMContactsController : NSObject { + MGMAccountController *accountController; + + IBOutlet UISearchBar *searchBar; + IBOutlet UIButton *searchCancelButton; + IBOutlet UITableView *contactsTable; + + NSLock *filterLock; + NSString *contactsMatchString; + int filterWaiting; + NSMutableArray *contactViews; + int contactsCount; + NSRange contactsLoading; + NSRange contactsVisible; +} +- (id)initWithAccountController:(MGMAccountController *)theAccountController; + +- (void)awakeFromNib; +- (void)releaseView; + +- (MGMContacts *)contacts; +- (NSString *)filterString; +- (void)updateMatchString; + +- (IBAction)cancelSearch:(id)sender; + +- (void)checkContactRow:(int)row; + +- (void)filterContacts; +- (void)backgroundFilter; +- (void)loadContacts:(BOOL)updatingCount; + +- (void)updatedContacts; + +- (void)selectedContact:(NSDictionary *)theContact; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMContactsController.m b/Classes/VoiceMob/MGMContactsController.m new file mode 100644 index 0000000..5466600 --- /dev/null +++ b/Classes/VoiceMob/MGMContactsController.m @@ -0,0 +1,184 @@ +// +// MGMContactsController.m +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMContactsController.h" +#import "MGMContactView.h" +#import "MGMAccountController.h" +#import "MGMController.h" +#import + +NSString * const MGMContactViewCellIdentifier = @"MGMContactViewCellIdentifier"; + +@implementation MGMContactsController +- (id)initWithAccountController:(MGMAccountController *)theAccountController { + if (self = [super init]) { + accountController = theAccountController; + + filterLock = [NSLock new]; + filterWaiting = 0; + contactViews = [NSMutableArray new]; + contactsCount = 0; + } + return self; +} +- (void)awakeFromNib { + if (contactsMatchString!=nil) + [searchBar setText:contactsMatchString]; + [self filterContacts]; + [searchCancelButton setHidden:YES]; +} +- (void)releaseView { + searchBar = nil; + searchCancelButton = nil; + contactsTable = nil; + contactsCount = 0; + [contactViews removeAllObjects]; +} +- (void)dealloc { + if (filterLock!=nil) + [filterLock release]; + if (contactsMatchString!=nil) + [contactsMatchString release]; + if (contactViews!=nil) + [contactViews release]; + [super dealloc]; +} + +- (MGMContacts *)contacts { + return nil; +} +- (NSString *)filterString { + return [searchBar text]; +} +- (void)updateMatchString { + if (contactsMatchString!=nil) [contactsMatchString release]; + contactsMatchString = [[self filterString] copy]; +} + +- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)theSearchBar { + [searchCancelButton setHidden:NO]; + return YES; +} +- (void)searchBar:(UISearchBar *)theSearchBar textDidChange:(NSString *)searchText { + [self filterContacts]; +} +- (void)searchBarSearchButtonClicked:(UISearchBar *)theSearchBar { + [self cancelSearch:self]; +} +- (void)searchBarCancelButtonClicked:(UISearchBar *)theSearchBar { + [self cancelSearch:self]; +} +- (IBAction)cancelSearch:(id)sender { + [searchBar resignFirstResponder]; + [searchCancelButton setHidden:YES]; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return contactsCount; +} +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + MGMContactView *cell = (MGMContactView *)[tableView dequeueReusableCellWithIdentifier:MGMContactViewCellIdentifier]; + if (cell==nil) { + cell = [[[MGMContactView alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MGMContactViewCellIdentifier] autorelease]; + [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; + [cell setThemeManager:[[accountController controller] themeManager]]; + } + + int row = [indexPath indexAtPosition:1]; + if (row>=contactsCount) return cell; + [self checkContactRow:row]; + @try { + [cell setContact:[contactViews objectAtIndex:row-contactsVisible.location]]; + } + @catch (NSException *e) { + NSLog(@"Contact error, ignoring. %@", e); + } + + return cell; +} +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + int row = [indexPath indexAtPosition:1]; + if (row>=contactsCount) return; + [self selectedContact:[contactViews objectAtIndex:row-contactsVisible.location]]; +} +- (void)checkContactRow:(int)row { + if (!NSLocationInRange(row, contactsVisible)) { + int maxResults = [[self contacts] maxResults]; + int page = (row/maxResults)+1; + contactsLoading.location = ((page==1 ? 1 : page-1)*maxResults)-maxResults; + contactsLoading.length = (row<(maxResults-3) ? maxResults : maxResults*2); + [self loadContacts:NO]; + } +} + +- (void)filterContacts { + [NSThread detachNewThreadSelector:@selector(backgroundFilter) toTarget:self withObject:nil]; +} +- (void)backgroundFilter { + if (contactsTable==nil) return; + if (filterWaiting>=1) + return; + NSAutoreleasePool *pool = [NSAutoreleasePool new]; + filterWaiting++; + [filterLock lock]; + filterWaiting--; + contactsCount = 0; + [contactViews removeAllObjects]; + [self performSelectorOnMainThread:@selector(updateMatchString) withObject:nil waitUntilDone:YES]; + int count = [[[self contacts] countContactsMatching:contactsMatchString] intValue]; + + contactsLoading.location = 0; + contactsLoading.length = 0; + contactsVisible.location = 0; + contactsVisible.length = [[self contacts] maxResults]; + + [contactViews addObjectsFromArray:[[self contacts] contactsMatching:contactsMatchString page:1]]; + contactsCount = count; + [filterLock unlock]; + if (contactsTable==nil) return; + [contactsTable performSelectorOnMainThread:@selector(reloadData) withObject:nil waitUntilDone:YES]; + if (contactsCount!=0) + [contactsTable scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] atScrollPosition:UITableViewScrollPositionTop animated:NO]; + [pool drain]; +} +- (void)loadContacts:(BOOL)updatingCount { + if (contactsTable==nil) return; + NSAutoreleasePool *pool = [NSAutoreleasePool new]; + [filterLock lock]; + int count = 0; + if (updatingCount) { + count = [[[self contacts] countContactsMatching:contactsMatchString] intValue]; + contactsCount = 0; + } + int maxResults = [[self contacts] maxResults]; + [contactViews removeAllObjects]; + int page = contactsLoading.location/maxResults; + int times = contactsLoading.length/maxResults; + for (int t=0; t +@class MGMThemeManager, MGMAccountController, MGMAccountSetup; + @interface MGMController : UIViewController { IBOutlet UIWindow *mainWindow; + + MGMThemeManager *themeManager; + MGMAccountController *accountController; } +- (MGMThemeManager *)themeManager; +- (void)showAccountSetup; +- (void)dismissAccountSetup:(MGMAccountSetup *)theAccountSetup; @end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMController.m b/Classes/VoiceMob/MGMController.m index 162fd24..272fca4 100644 --- a/Classes/VoiceMob/MGMController.m +++ b/Classes/VoiceMob/MGMController.m @@ -7,16 +7,57 @@ // #import "MGMController.h" +#import "MGMAccountController.h" #import "MGMAccountSetup.h" #import "MGMVMAddons.h" +#import +#import @implementation MGMController - (void)awakeFromNib { - NSLog(@"Device is %@", ([[UIDevice currentDevice] isPad] ? @"iPad" : @"iPhone/iPod")); - MGMAccountSetup *accountSetup = [MGMAccountSetup new]; - [accountSetup displayStep]; - [[self view] addSubview:[accountSetup view]]; + themeManager = [MGMThemeManager new]; + accountController = [[MGMAccountController alloc] initWithController:self]; + [[self view] addSubview:[accountController view]]; [mainWindow addSubview:[self view]]; + if ([[MGMUser userNames] count]==0) { + MGMAccountSetup *accountSetup = [[MGMAccountSetup alloc] initWithController:self]; + [[self view] addSubview:[accountSetup view]]; + } [mainWindow makeKeyAndVisible]; } + +- (MGMThemeManager *)themeManager { + return themeManager; +} + +- (void)showAccountSetup { + MGMAccountSetup *accountSetup = [[MGMAccountSetup alloc] initWithController:self]; + [accountSetup setSetupOnly:YES]; + CGRect inViewFrame = [[accountSetup view] frame]; + inViewFrame.origin.y += inViewFrame.size.height; + [[accountSetup view] setFrame:inViewFrame]; + [[self view] addSubview:[accountSetup view]]; + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:0.5]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + CGRect outViewFrame = [[accountSetup view] frame]; + outViewFrame.origin.y -= outViewFrame.size.height; + [[accountSetup view] setFrame:outViewFrame]; + [UIView commitAnimations]; +} +- (void)dismissAccountSetup:(MGMAccountSetup *)theAccountSetup { + [UIView beginAnimations:nil context:theAccountSetup]; + [UIView setAnimationDuration:0.5]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(dismissAnimationDidStop:finished:accountSetup:)]; + CGRect outViewFrame = [[theAccountSetup view] frame]; + outViewFrame.origin.y += outViewFrame.size.height; + [[theAccountSetup view] setFrame:outViewFrame]; + [UIView commitAnimations]; +} +- (void)dismissAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished accountSetup:(MGMAccountSetup *)theAccountSetup { + [[theAccountSetup view] removeFromSuperview]; + [theAccountSetup release]; +} @end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMSIPUser.h b/Classes/VoiceMob/MGMSIPUser.h deleted file mode 100644 index a7de182..0000000 --- a/Classes/VoiceMob/MGMSIPUser.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// MGMSIPUser.h -// VoiceMob -// -// Created by Mr. Gecko on 9/24/10. -// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ -// - -#import - -extern NSString * const MGMSIPUserAreaCode; - -@interface MGMSIPUser : NSObject { - -} - -@end \ No newline at end of file diff --git a/Classes/VoiceMob/MGMSIPUser.m b/Classes/VoiceMob/MGMSIPUser.m deleted file mode 100644 index e49f499..0000000 --- a/Classes/VoiceMob/MGMSIPUser.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// MGMSIPUser.m -// VoiceMob -// -// Created by Mr. Gecko on 9/24/10. -// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ -// - -#import "MGMSIPUser.h" - -NSString * const MGMSIPUserAreaCode = @"MGMVSIPUserAreaCode"; - -@implementation MGMSIPUser - -@end \ No newline at end of file diff --git a/Classes/VoiceMob/SIP/MGMSIPUser.h b/Classes/VoiceMob/SIP/MGMSIPUser.h new file mode 100644 index 0000000..61c1400 --- /dev/null +++ b/Classes/VoiceMob/SIP/MGMSIPUser.h @@ -0,0 +1,29 @@ +// +// MGMSIPUser.h +// VoiceMob +// +// Created by Mr. Gecko on 9/24/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +extern NSString * const MGMSIPUserAreaCode; + +@class MGMAccountController, MGMUser; + +@interface MGMSIPUser : NSObject { + MGMAccountController *accountController; + MGMUser *user; + + IBOutlet UIView *view; +} ++ (id)SIPUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController; +- (id)initWithUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController; + +- (MGMAccountController *)accountController; +- (MGMUser *)user; + +- (UIView *)view; +- (void)releaseView; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/SIP/MGMSIPUser.m b/Classes/VoiceMob/SIP/MGMSIPUser.m new file mode 100644 index 0000000..8321478 --- /dev/null +++ b/Classes/VoiceMob/SIP/MGMSIPUser.m @@ -0,0 +1,64 @@ +// +// MGMSIPUser.m +// VoiceMob +// +// Created by Mr. Gecko on 9/24/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMSIPUser.h" +#import "MGMVMAddons.h" +#import +#import + +NSString * const MGMSIPUserAreaCode = @"MGMVSIPUserAreaCode"; + +@implementation MGMSIPUser ++ (id)SIPUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController { + return [[[self alloc] initWithUser:theUser accountController:theAccountController] autorelease]; +} +- (id)initWithUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController { + if (self = [super init]) { + accountController = theAccountController; + user = [theUser retain]; + } + return self; +} +- (void)dealloc { + [self releaseView]; + if (user!=nil) + [user release]; + [super dealloc]; +} + +- (MGMAccountController *)accountController { + return accountController; +} +- (MGMUser *)user { + return user; +} +- (NSString *)title { + if ([user settingForKey:MGMSIPAccountFullName]!=nil && ![[user settingForKey:MGMSIPAccountFullName] isEqual:@""]) + return [user settingForKey:MGMSIPAccountFullName]; + return [user settingForKey:MGMUserName]; +} + +- (UIView *)view { + if (view==nil) { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"SIPUser"] owner:self options:nil]) { + NSLog(@"Unable to load SIP User"); + [self release]; + self = nil; + } else { + + } + } + return view; +} +- (void)releaseView { + if (view!=nil) { + [view release]; + view = nil; + } +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMContactView.h b/Classes/VoiceMob/Views/MGMContactView.h new file mode 100644 index 0000000..6a32111 --- /dev/null +++ b/Classes/VoiceMob/Views/MGMContactView.h @@ -0,0 +1,22 @@ +// +// MGMContactView.h +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMThemeManager; + +@interface MGMContactView : UITableViewCell { + MGMThemeManager *themeManager; + UIImageView *photoView; + UILabel *nameField; + UILabel *phoneField; + NSDictionary *contact; +} +- (void)setThemeManager:(MGMThemeManager *)theThemeManager; +- (void)setContact:(NSDictionary *)theContact; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMContactView.m b/Classes/VoiceMob/Views/MGMContactView.m new file mode 100644 index 0000000..8f0a034 --- /dev/null +++ b/Classes/VoiceMob/Views/MGMContactView.m @@ -0,0 +1,70 @@ +// +// MGMContactView.m +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMContactView.h" +#import + +@implementation MGMContactView +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + photoView = [[UIImageView alloc] initWithFrame:CGRectZero]; + [[self contentView] addSubview:photoView]; + nameField = [[UILabel alloc] initWithFrame:CGRectZero]; + [nameField setBackgroundColor:[UIColor clearColor]]; + [nameField setFont:[UIFont boldSystemFontOfSize:18.0]]; + [[self contentView] addSubview:nameField]; + phoneField = [[UILabel alloc] initWithFrame:CGRectZero]; + [phoneField setBackgroundColor:[UIColor clearColor]]; + [phoneField setFont:[UIFont systemFontOfSize:15.0]]; + [[self contentView] addSubview:phoneField]; + } + return self; +} +- (void)dealloc { + if (photoView!=nil) + [photoView release]; + if (nameField!=nil) + [nameField release]; + if (phoneField!=nil) + [phoneField release]; + [super dealloc]; +} + +- (void)setThemeManager:(MGMThemeManager *)theThemeManager { + themeManager = theThemeManager; +} +- (void)setContact:(NSDictionary *)theContact { + if (contact!=nil) [contact release]; + contact = [theContact retain]; +} + +- (void)layoutSubviews { + [super layoutSubviews]; + + CGRect frameRect = [[self contentView] bounds]; + + if (contact!=nil) { + if ([contact objectForKey:MGMCPhoto]==nil || [[contact objectForKey:MGMCPhoto] isKindOfClass:[NSNull class]]) + [photoView setImage:[[[UIImage alloc] initWithContentsOfFile:[themeManager incomingIconPath]] autorelease]]; + else + [photoView setImage:[[[UIImage alloc] initWithData:[contact objectForKey:MGMCPhoto]] autorelease]]; + if ([[contact objectForKey:MGMCName] isEqual:@""]) + [nameField setText:[contact objectForKey:MGMCCompany]]; + else + [nameField setText:[contact objectForKey:MGMCName]]; + if ([[contact objectForKey:MGMCLabel] isEqual:@""]) + [phoneField setText:[[contact objectForKey:MGMCNumber] readableNumber]]; + else + [phoneField setText:[NSString stringWithFormat:@"%@ %@", [[contact objectForKey:MGMCNumber] readableNumber], [contact objectForKey:MGMCLabel]]]; + } + + [photoView setFrame:CGRectMake(0, 0, frameRect.size.height, frameRect.size.height)]; + [nameField setFrame:CGRectMake(frameRect.size.height+8, 10, frameRect.size.width-(frameRect.size.height+12), 20)]; + [phoneField setFrame:CGRectMake(frameRect.size.height+8, frameRect.size.height-27, frameRect.size.width-(frameRect.size.height+12), 20)]; +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMNumberView.h b/Classes/VoiceMob/Views/MGMNumberView.h new file mode 100644 index 0000000..76ccc20 --- /dev/null +++ b/Classes/VoiceMob/Views/MGMNumberView.h @@ -0,0 +1,19 @@ +// +// MGMNumberView.h +// VoiceMob +// +// Created by Mr. Gecko on 9/28/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@interface MGMNumberView : UIControl { + NSString *number; + NSString *alphabet; + BOOL touching; +} +- (NSString *)number; +- (void)setNumber:(NSString *)theNumber; +- (NSString *)alphabet; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMNumberView.m b/Classes/VoiceMob/Views/MGMNumberView.m new file mode 100644 index 0000000..b208cf0 --- /dev/null +++ b/Classes/VoiceMob/Views/MGMNumberView.m @@ -0,0 +1,189 @@ +// +// MGMNumberView.m +// VoiceMob +// +// Created by Mr. Gecko on 9/28/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMNumberView.h" + +NSString * const MGMFontName = @"Helvetica"; + +@implementation MGMNumberView +- (void)dealloc { + if (number!=nil) + [number release]; + if (alphabet!=nil) + [alphabet release]; + [super dealloc]; +} + +- (NSString *)number { + if (number==nil) { + switch ([self tag]) { + case -1: + break; + case 10: + number = [@"✱" retain]; + break; + case 11: + number = [@"#" retain]; + break; + case 12: + number = [@"SMS" retain]; + break; + case 13: + number = [@"Call" retain]; + break; + case 14: + number = [@"↵" retain]; + break; + default: + number = [[[NSNumber numberWithInt:[self tag]] stringValue] copy]; + break; + } + } + return number; +} +- (void)setNumber:(NSString *)theNumber { + if (number!=nil) [number release]; + number = [theNumber copy]; + [self setNeedsDisplay]; +} +- (NSString *)alphabet { + if (alphabet==nil) { + switch ([self tag]) { + case 0: + alphabet = [@"+" retain]; + break; + case 2: + alphabet = [@"ABC" retain]; + break; + case 3: + alphabet = [@"DEF" retain]; + break; + case 4: + alphabet = [@"GHI" retain]; + break; + case 5: + alphabet = [@"JKL" retain]; + break; + case 6: + alphabet = [@"MNO" retain]; + break; + case 7: + alphabet = [@"PQRS" retain]; + break; + case 8: + alphabet = [@"TUV" retain]; + break; + case 9: + alphabet = [@"WXYZ" retain]; + break; + default: + break; + } + } + return alphabet; +} + +- (void)setTouching:(BOOL)isTouching { + touching = isTouching; + [self setNeedsDisplay]; +} +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + [super touchesBegan:touches withEvent:event]; + [self setTouching:YES]; +} +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + [super touchesEnded:touches withEvent:event]; + [self setTouching:NO]; +} +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { + [super touchesCancelled:touches withEvent:event]; + [self setTouching:NO]; +} + +- (void)drawRect:(CGRect)rect { + CGContextRef currentContext = UIGraphicsGetCurrentContext(); + CGContextSaveGState(currentContext); + CGMutablePathRef path = CGPathCreateMutable(); + CGRect bounds = [self bounds]; + CGPathAddRect(path, NULL, bounds); + CGContextAddPath(currentContext, path); + CGContextClip(currentContext); + + CGColorRef colorsRef[2]; + if (touching) { + colorsRef[0] = [[UIColor colorWithRed:0.5 green:0.5 blue:1.0 alpha:1.0] CGColor]; + colorsRef[1] = [[UIColor colorWithRed:0.1 green:0.1 blue:0.5 alpha:1.0] CGColor]; + } else { + if ([self tag]==13) { + colorsRef[0] = [[UIColor colorWithRed:0.5 green:1.0 blue:0.5 alpha:1.0] CGColor]; + colorsRef[1] = [[UIColor colorWithRed:0.1 green:0.5 blue:0.1 alpha:1.0] CGColor]; + } else if ([self tag]==14) { + colorsRef[0] = [[UIColor colorWithRed:1.0 green:0.5 blue:0.5 alpha:1.0] CGColor]; + colorsRef[1] = [[UIColor colorWithRed:0.5 green:0.1 blue:0.1 alpha:1.0] CGColor]; + } else { + colorsRef[0] = [[UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:1.0] CGColor]; + colorsRef[1] = [[UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1.0] CGColor]; + } + } + CFArrayRef colors = CFArrayCreate(NULL, (const void **)colorsRef, sizeof(colorsRef) / sizeof(CGColorRef), &kCFTypeArrayCallBacks); + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); + CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, colors, NULL); + CFRelease(colorSpace); + CFRelease(colors); + + CGPoint start = bounds.origin; + bounds.origin.y += bounds.size.height; + CGPoint end = bounds.origin; + CGContextDrawLinearGradient(currentContext, gradient, start, end, 0); + + CFRelease(gradient); + CFRelease(path); + + CGRect strokeRect = bounds; + strokeRect.origin.x = 0; + strokeRect.origin.y = 0; + CGContextSetStrokeColorWithColor(currentContext, [[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0] CGColor]); + CGContextStrokeRectWithWidth(currentContext, strokeRect, 2.0); + CGContextRestoreGState(currentContext); + + [[UIColor whiteColor] set]; + if ([self number]!=nil) { + if ([self tag]>=0 && [self tag]<=11) { + UIFont *font = [UIFont fontWithName:MGMFontName size:bounds.size.height-20.0]; + CGFloat actualSize; + CGSize numberSize = [[self number] sizeWithFont:font minFontSize:0.5 actualFontSize:&actualSize forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + font = [UIFont fontWithName:MGMFontName size:actualSize]; + numberSize = [[self number] sizeWithFont:font forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + CGPoint numberPoint = CGPointMake((bounds.size.width-numberSize.width)/2, 1); + [[self number] drawAtPoint:numberPoint withFont:font]; + } else { + UIFont *font = nil; + if ([self tag]<=13) + font = [UIFont fontWithName:MGMFontName size:bounds.size.height-10.0]; + else + font = [UIFont fontWithName:MGMFontName size:bounds.size.height-6.0]; + CGFloat actualSize; + CGSize numberSize = [[self number] sizeWithFont:font minFontSize:0.5 actualFontSize:&actualSize forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + font = [UIFont fontWithName:MGMFontName size:actualSize]; + numberSize = [[self number] sizeWithFont:font forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + CGPoint numberPoint = CGPointMake((bounds.size.width-numberSize.width)/2, (bounds.size.height-numberSize.height)/2); + [[self number] drawAtPoint:numberPoint withFont:font]; + } + } + + if ([self alphabet]!=nil) { + UIFont *font = [UIFont fontWithName:MGMFontName size:14.0]; + CGFloat actualSize; + CGSize alphabetSize = [[self alphabet] sizeWithFont:font minFontSize:0.5 actualFontSize:&actualSize forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + font = [UIFont fontWithName:MGMFontName size:actualSize]; + alphabetSize = [[self alphabet] sizeWithFont:font forWidth:bounds.size.width lineBreakMode:UILineBreakModeClip]; + CGPoint alphabetPoint = CGPointMake((bounds.size.width-alphabetSize.width)/2, bounds.size.height-20); + [[self alphabet] drawAtPoint:alphabetPoint withFont:font]; + } +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMProgressView.h b/Classes/VoiceMob/Views/MGMProgressView.h new file mode 100644 index 0000000..15da9d0 --- /dev/null +++ b/Classes/VoiceMob/Views/MGMProgressView.h @@ -0,0 +1,19 @@ +// +// MGMLoginProcessView.h +// VoiceMac +// +// Created by Mr. Gecko on 8/19/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@interface MGMProgressView : UIView { + UIActivityIndicatorView *progress; + UILabel *pleaseWaitField; + UILabel *progressField; +} +- (void)startProgess; +- (void)stopProgess; +- (void)setProgressTitle:(NSString *)theTitle; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Views/MGMProgressView.m b/Classes/VoiceMob/Views/MGMProgressView.m new file mode 100644 index 0000000..07a094d --- /dev/null +++ b/Classes/VoiceMob/Views/MGMProgressView.m @@ -0,0 +1,72 @@ +// +// MGMLoginProcessView.m +// VoiceMac +// +// Created by Mr. Gecko on 8/19/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMProgressView.h" + +@implementation MGMProgressView +- (id)initWithFrame:(CGRect)frameRect { + if (self = [super initWithFrame:frameRect]) { + [self setBackgroundColor:[UIColor clearColor]]; + progress = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; + [progress setFrame:CGRectMake((frameRect.size.width-37)/2, (frameRect.size.height-37)/2, 37, 37)]; + [self addSubview:progress]; + pleaseWaitField = [[UILabel alloc] initWithFrame:CGRectMake(17, (((frameRect.size.height-37)/2)+34)+8, frameRect.size.width-34, 21)]; + [pleaseWaitField setTextColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]]; + [pleaseWaitField setTextAlignment:UITextAlignmentCenter]; + [pleaseWaitField setBackgroundColor:[UIColor clearColor]]; + [pleaseWaitField setText:@"Please Wait..."]; + [self addSubview:pleaseWaitField]; + progressField = [[UILabel alloc] initWithFrame:CGRectMake(17, ((frameRect.size.height-37)/2)-30, frameRect.size.width-34, 21)]; + [progressField setTextColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]]; + [progressField setTextAlignment:UITextAlignmentCenter]; + [progressField setBackgroundColor:[UIColor clearColor]]; + [progressField setText:@"Progress"]; + [self addSubview:progressField]; + } + return self; +} +- (void)dealloc { + if (progress) + [progress release]; + if (pleaseWaitField!=nil) + [pleaseWaitField release]; + if (progressField!=nil) + [progressField release]; + [super dealloc]; +} +- (void)layoutSubviews { + [super layoutSubviews]; + CGRect frameRect = [self frame]; + [progress setFrame:CGRectMake((frameRect.size.width-37)/2, (frameRect.size.height-37)/2, 37, 37)]; + [pleaseWaitField setFrame:CGRectMake(17, ((frameRect.size.height-37)/2)-37, frameRect.size.width-37, 21)]; + [progressField setFrame:CGRectMake(17, (((frameRect.size.height-37)/2)+37)+12, frameRect.size.width-37, 21)]; +} +- (void)startProgess { + [progress startAnimating]; +} +- (void)stopProgess { + [progress stopAnimating]; +} +- (void)setProgressTitle:(NSString *)theTitle { + [progressField setText:theTitle]; +} +- (void)drawRect:(CGRect)rect { + CGContextRef context = UIGraphicsGetCurrentContext(); + + CGContextClearRect(context, [self bounds]); + + CGContextSetFillColorWithColor(context, [[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5] CGColor]); + CGContextBeginPath(context); + CGContextAddRect(context, rect); + CGContextClosePath(context); + CGContextFillPath(context); +} +- (BOOL)canBecomeFirstResponder { + return YES; +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoiceContacts.h b/Classes/VoiceMob/Voice/MGMVoiceContacts.h new file mode 100644 index 0000000..67e4a34 --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoiceContacts.h @@ -0,0 +1,27 @@ +// +// MGMVoiceContacts.h +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import +#import "MGMContactsController.h" + +@class MGMVoiceUser; + +@interface MGMVoiceContacts : MGMContactsController { + MGMVoiceUser *voiceUser; + + IBOutlet UIView *view; + NSDictionary *selectedContact; +} ++ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser; +- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser; + +- (MGMVoiceUser *)voiceUser; + +- (UIView *)view; +- (void)releaseView; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoiceContacts.m b/Classes/VoiceMob/Voice/MGMVoiceContacts.m new file mode 100644 index 0000000..43b8d54 --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoiceContacts.m @@ -0,0 +1,69 @@ +// +// MGMVoiceContacts.m +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMVoiceContacts.h" +#import "MGMVoiceUser.h" +#import "MGMVMAddons.h" +#import + +@implementation MGMVoiceContacts ++ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser { + return [[[self alloc] initWithVoiceUser:theVoiceUser] autorelease]; +} +- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser { + if (self = [super initWithAccountController:[theVoiceUser accountController]]) { + voiceUser = theVoiceUser; + } + return self; +} + +- (MGMVoiceUser *)voiceUser { + return voiceUser; +} +- (MGMContacts *)contacts { + return [[voiceUser instance] contacts]; +} + +- (UIView *)view { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"VoiceContacts"] owner:self options:nil]) { + NSLog(@"Unable to load Voice Contacts"); + [self release]; + self = nil; + } else { + [super awakeFromNib]; + } + return view; +} +- (void)releaseView { + if (view!=nil) { + [view release]; + view = nil; + } + [super releaseView]; +} + +- (void)selectedContact:(NSDictionary *)theContact { + selectedContact = theContact; + UIActionSheet *theAction = [[UIActionSheet new] autorelease]; + [theAction addButtonWithTitle:@"Call"]; + [theAction addButtonWithTitle:@"SMS"]; + [theAction addButtonWithTitle:@"Reverse Lookup"]; + [theAction addButtonWithTitle:@"Cancel"]; + [theAction setCancelButtonIndex:3]; + [theAction setDelegate:self]; + [theAction showInView:[voiceUser view]]; +} + +- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { + if (buttonIndex==0) { + [voiceUser call:[selectedContact objectForKey:MGMCNumber]]; + } + selectedContact = nil; + [contactsTable deselectRowAtIndexPath:[contactsTable indexPathForSelectedRow] animated:YES]; +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoicePad.h b/Classes/VoiceMob/Voice/MGMVoicePad.h new file mode 100644 index 0000000..08037cc --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoicePad.h @@ -0,0 +1,32 @@ +// +// MGMVoicePad.h +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMVoiceUser, MGMNumberView; + +@interface MGMVoicePad : NSObject { + MGMVoiceUser *voiceUser; + + IBOutlet UIView *view; + + NSString *numberString; + IBOutlet MGMNumberView *numberView; +} ++ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser; +- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser; + +- (MGMVoiceUser *)voiceUser; + +- (UIView *)view; +- (void)releaseView; + +- (IBAction)dial:(id)sender; +- (IBAction)delete:(id)sender; +- (IBAction)call:(id)sender; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoicePad.m b/Classes/VoiceMob/Voice/MGMVoicePad.m new file mode 100644 index 0000000..0b616ac --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoicePad.m @@ -0,0 +1,97 @@ +// +// MGMVoicePad.m +// VoiceMob +// +// Created by Mr. Gecko on 9/29/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMVoicePad.h" +#import "MGMVoiceUser.h" +#import "MGMNumberView.h" +#import "MGMVMAddons.h" +#import + +@implementation MGMVoicePad ++ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser { + return [[[self alloc] initWithVoiceUser:theVoiceUser] autorelease]; +} +- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser { + if (self = [super init]) { + voiceUser = theVoiceUser; + } + return self; +} +- (void)dealloc { + [self releaseView]; + if (numberString!=nil) + [numberString release]; + [super dealloc]; +} + +- (MGMVoiceUser *)voiceUser { + return voiceUser; +} + +- (UIView *)view { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"VoicePad"] owner:self options:nil]) { + NSLog(@"Unable to load Voice Pad"); + [self release]; + self = nil; + } else { + if (numberString!=nil) + [numberView setNumber:numberString]; + else + [numberView setNumber:@""]; + } + return view; +} +- (void)releaseView { + if (view!=nil) { + [view release]; + view = nil; + } +} + +- (IBAction)dial:(id)sender { + NSString *number = [numberView number]; + if ([number length]==0 && [sender tag]==0) { + [numberView setNumber:@"+"]; + } else { + NSString *numberAdd = nil; + switch ([sender tag]) { + case 10: + case 11: + break; + default: + numberAdd = [[NSNumber numberWithInt:[sender tag]] stringValue]; + break; + } + if (numberAdd!=nil) + number = [number stringByAppendingString:numberAdd]; + if (numberString!=nil) [numberString release]; + numberString = [[number readableNumber] copy]; + [numberView setNumber:numberString]; + } +} +- (IBAction)delete:(id)sender { + NSString *number = [numberView number]; + if ([number length]!=0) { + number = [number substringToIndex:[number length]-1]; + if (numberString!=nil) [numberString release]; + numberString = [[number readableNumber] copy]; + [numberView setNumber:numberString]; + } +} +- (IBAction)call:(id)sender { + if ([numberString isPhoneComplete]) { + [voiceUser call:[numberString phoneFormatWithAreaCode:[voiceUser areaCode]]]; + } else { + UIAlertView *theAlert = [[UIAlertView new] autorelease]; + [theAlert setTitle:@"Incorrect Number"]; + [theAlert setMessage:@"The phone number you have entered is incorrect."]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; + [theAlert show]; + } +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoiceUser.h b/Classes/VoiceMob/Voice/MGMVoiceUser.h new file mode 100644 index 0000000..76744da --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoiceUser.h @@ -0,0 +1,58 @@ +// +// MGMVoiceUser.h +// VoiceMob +// +// Created by Mr. Gecko on 9/28/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import + +@class MGMVoiceUser, MGMAccountController, MGMUser, MGMInstance, MGMProgressView; + +@protocol MGMVoiceUserTabProtocol ++ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser; +- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser; + +- (MGMVoiceUser *)voiceUser; + +- (UIView *)view; +- (void)releaseView; +@end + + +@interface MGMVoiceUser : NSObject { + MGMAccountController *accountController; + MGMUser *user; + MGMInstance *instance; + + int currentTab; + NSMutableArray *tabObjects; + + MGMProgressView *progressView; + IBOutlet UIView *view; + IBOutlet UIView *tabView; + IBOutlet UITabBar *tabBar; + + BOOL placingCall; + NSTimer *callTimer; + UIAlertView *callCancelView; +} ++ (id)voiceUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController; +- (id)initWithUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController; + +- (MGMAccountController *)accountController; +- (MGMUser *)user; +- (MGMInstance *)instance; +- (NSString *)title; +- (NSString *)areaCode; + +- (UIView *)view; +- (void)releaseView; + +- (void)loginSuccessful; +- (void)setInstanceInfo; + +- (BOOL)isPlacingCall; +- (void)call:(NSString *)theNumber; +@end \ No newline at end of file diff --git a/Classes/VoiceMob/Voice/MGMVoiceUser.m b/Classes/VoiceMob/Voice/MGMVoiceUser.m new file mode 100644 index 0000000..bda9519 --- /dev/null +++ b/Classes/VoiceMob/Voice/MGMVoiceUser.m @@ -0,0 +1,212 @@ +// +// MGMVoiceUser.m +// VoiceMob +// +// Created by Mr. Gecko on 9/28/10. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ +// + +#import "MGMVoiceUser.h" +#import "MGMVoicePad.h" +#import "MGMVoiceContacts.h" +#import "MGMProgressView.h" +#import "MGMAccountController.h" +#import "MGMVMAddons.h" +#import +#import + +@implementation MGMVoiceUser ++ (id)voiceUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController { + return [[[self alloc] initWithUser:theUser accountController:theAccountController] autorelease]; +} +- (id)initWithUser:(MGMUser *)theUser accountController:(MGMAccountController *)theAccountController { + if (self = [super init]) { + accountController = theAccountController; + user = [theUser retain]; + currentTab = 0; + tabObjects = [NSMutableArray new]; + [tabObjects addObject:[MGMVoicePad tabWithVoiceUser:self]]; + [tabObjects addObject:[MGMVoiceContacts tabWithVoiceUser:self]]; + + if ([user isStarted]) + instance = [[MGMInstance instanceWithUser:user delegate:self] retain]; + } + return self; +} +- (void)dealloc { + [self releaseView]; + if (user!=nil) + [user release]; + [super dealloc]; +} + +- (MGMAccountController *)accountController { + return accountController; +} +- (MGMUser *)user { + return user; +} +- (MGMInstance *)instance { + return instance; +} +- (NSString *)title { + if ([instance isLoggedIn]) + return [[instance userNumber] readableNumber]; + return [user settingForKey:MGMUserName]; +} +- (NSString *)areaCode { + if (![instance isLoggedIn]) + return nil; + return [instance userAreaCode]; +} + +- (UIView *)view { + if (view==nil) { + if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"VoiceUser"] owner:self options:nil]) { + NSLog(@"Unable to load Voice User"); + [self release]; + self = nil; + } else { + [tabView addSubview:[[tabObjects objectAtIndex:currentTab] view]]; + [tabBar setSelectedItem:[[tabBar items] objectAtIndex:currentTab]]; + if (![instance isLoggedIn]) { + CGSize contentSize = [view frame].size; + progressView = [[MGMProgressView alloc] initWithFrame:CGRectMake(0, 0, contentSize.width, contentSize.height)]; + [progressView setProgressTitle:@"Logging In"]; + [view addSubview:progressView]; + [progressView startProgess]; + [progressView becomeFirstResponder]; + } else { + [self setInstanceInfo]; + } + } + } + return view; +} +- (void)releaseView { + if (view!=nil) { + [view release]; + view = nil; + [[tabObjects objectAtIndex:currentTab] releaseView]; + } +} + +- (void)loginError:(NSError *)theError { + UIAlertView *theAlert = [[UIAlertView new] autorelease]; + [theAlert setTitle:@"Error logging in"]; + [theAlert setMessage:[theError localizedDescription]]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; + [theAlert show]; + + if (progressView!=nil) { + [progressView stopProgess]; + [progressView removeFromSuperview]; + [progressView release]; + progressView = nil; + } +} +- (void)loginSuccessful { + if (progressView!=nil) { + [progressView stopProgess]; + [progressView setNeedsDisplay]; + } + + [self setInstanceInfo]; + + if ([accountController isCurrent:self]) + [accountController setTitle:[[instance userNumber] readableNumber]]; + + if (progressView!=nil) { + [UIView beginAnimations:nil context:nil]; + [UIView setAnimationDuration:1.0]; + [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut]; + [UIView setAnimationDelegate:self]; + [UIView setAnimationDidStopSelector:@selector(progressFadeAnimationDidStop:finished:context:)]; + [progressView setAlpha:0.0]; + [UIView commitAnimations]; + } +} +- (void)setInstanceInfo { + +} +- (void)progressFadeAnimationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context { + if (progressView!=nil) { + [progressView removeFromSuperview]; + [progressView release]; + progressView = nil; + } +} + +- (void)updatedContacts { + [[tabObjects objectAtIndex:1] updatedContacts]; +} + +- (BOOL)isPlacingCall { + return (callTimer!=nil); +} +- (void)call:(NSString *)theNumber { + placingCall = YES; + callTimer = [[NSTimer scheduledTimerWithTimeInterval:20.0 target:self selector:@selector(callTimer) userInfo:nil repeats:NO] retain]; + [instance placeCall:theNumber usingPhone:0 delegate:self]; + callCancelView = [UIAlertView new]; + [callCancelView setTitle:@"Placing Call"]; + [callCancelView addButtonWithTitle:@"Cancel Call"]; + [callCancelView setDelegate:self]; + [callCancelView show]; +} +- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { + if (alertView==callCancelView) { + if (callTimer!=nil) { + [callTimer invalidate]; + [callTimer release]; + callTimer = nil; + } + [callCancelView release]; + callCancelView = nil; + [instance cancelCallWithDelegate:self]; + } +} +- (void)call:(NSDictionary *)theInfo didFailWithError:(NSError *)theError { + placingCall = NO; + if (callTimer!=nil) + [callTimer fire]; + UIAlertView *theAlert = [[UIAlertView new] autorelease]; + [theAlert setTitle:@"Call Failed"]; + [theAlert setMessage:[theError localizedDescription]]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; + [theAlert show]; +} +- (void)callDidFinish:(NSDictionary *)theInfo { + placingCall = NO; + NSLog(@"YEA! We Made The Call!"); +} +- (void)callCancel:(NSDictionary *)theInfo didFailWithError:(NSError *)theError { + UIAlertView *theAlert = [[UIAlertView new] autorelease]; + [theAlert setTitle:@"Call Cancel Failed"]; + [theAlert setMessage:[theError localizedDescription]]; + [theAlert addButtonWithTitle:MGMOkButtonTitle]; + [theAlert show]; +} +- (void)callTimer { + if (callTimer!=nil) { + [callTimer invalidate]; + [callTimer release]; + callTimer = nil; + } + [callCancelView dismissWithClickedButtonIndex:0 animated:YES]; + [callCancelView release]; + callCancelView = nil; +} + +- (void)tabBar:(UITabBar *)theTabBar didSelectItem:(UITabBarItem *)item { + int tabIndex = [[tabBar items] indexOfObject:item]; + if (tabIndex==currentTab) + return; + id tab = [tabObjects objectAtIndex:currentTab]; + currentTab = tabIndex; + id newTab = [tabObjects objectAtIndex:currentTab]; + [tabView addSubview:[newTab view]]; + [[tab view] removeFromSuperview]; + [tab releaseView]; +} +@end \ No newline at end of file diff --git a/Classes/VoiceMob/VoiceMob_Prefix.pch b/Classes/VoiceMob/VoiceMob_Prefix.pch index 7141456..0aea062 100644 --- a/Classes/VoiceMob/VoiceMob_Prefix.pch +++ b/Classes/VoiceMob/VoiceMob_Prefix.pch @@ -5,4 +5,5 @@ #ifdef __OBJC__ #import #import + #define MGMOkButtonTitle @"Ok" #endif diff --git a/Classes/VoiceMob/main.m b/Classes/VoiceMob/main.m index 47b929a..0f5dac7 100644 --- a/Classes/VoiceMob/main.m +++ b/Classes/VoiceMob/main.m @@ -3,7 +3,7 @@ // VoiceMob // // Created by Mr. Gecko on 9/24/10. -// Copyright Mr. Gecko's Media 2010. All rights reserved. +// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/ // #import diff --git a/Resources/VoiceMac/Preferences/English.lproj/AccountsPane.xib b/Resources/VoiceMac/Preferences/English.lproj/AccountsPane.xib index 53514d7..b6b85d3 100644 --- a/Resources/VoiceMac/Preferences/English.lproj/AccountsPane.xib +++ b/Resources/VoiceMac/Preferences/English.lproj/AccountsPane.xib @@ -12,7 +12,6 @@ YES - YES @@ -48,6 +47,7 @@ 12 {{176, 0}, {301, 220}} + YES @@ -686,6 +686,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{10, 172}, {76, 17}} + YES 68288064 @@ -702,6 +703,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{10, 144}, {76, 17}} + YES 68288064 @@ -718,6 +720,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{91, 170}, {181, 22}} + YES -1804468671 @@ -735,6 +738,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{91, 142}, {181, 22}} + YES 343014976 @@ -754,10 +758,12 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {285, 204}} + {{7, 6}, {287, 206}} + {0, 0} 67239424 @@ -779,6 +785,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {301, 220} + Google Contacts @@ -1516,6 +1523,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 4352 {174, 198} + YES @@ -1620,6 +1628,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{1, 1}, {174, 198}} + @@ -1630,6 +1639,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{263, 1}, {15, 80}} + _doScroller: 0.84210532903671265 @@ -1639,6 +1649,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA -2147483392 {{1, 81}, {277, 15}} + 1 _doScroller: @@ -1647,6 +1658,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {{0, 20}, {176, 200}} + 562 @@ -1657,8 +1669,9 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 - {{59, -1}, {116.271, 23}} + {{60, -1}, {116.271, 23}} + YES -2080244224 @@ -1679,6 +1692,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{30, -1}, {30, 23}} + YES -2080244224 @@ -1699,6 +1713,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA 268 {{0, -1}, {30, 23}} + YES -2080244224 @@ -1717,6 +1732,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA {477, 220} + NSView @@ -3725,13 +3741,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA AppKit.framework/Headers/NSMenuItemCell.h - - NSObject - - IBFrameworkSource - AddressBook.framework/Headers/ABActions.h - - NSObject @@ -3983,13 +3992,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA Growl.framework/Headers/GrowlApplicationBridge.h - - NSObject - - IBFrameworkSource - QTKit.framework/Headers/QTCaptureDecompressedAudioOutput.h - - NSObject @@ -4316,7 +4318,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA YES - ../../../VoiceMac.xcodeproj + ../../../../VoiceMac.xcodeproj 3 diff --git a/Resources/VoiceMob/AccountController_iPhone.xib b/Resources/VoiceMob/AccountController_iPhone.xib new file mode 100644 index 0000000..3c855a4 --- /dev/null +++ b/Resources/VoiceMob/AccountController_iPhone.xib @@ -0,0 +1,545 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {{0, 44}, {320, 416}} + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + 266 + {320, 44} + + NO + NO + IBCocoaTouchFramework + + YES + + Accounts + IBCocoaTouchFramework + 1 + + + + IBCocoaTouchFramework + + 5 + + + Settings + IBCocoaTouchFramework + 1 + + + + + + + 292 + {{80, 10}, {160, 24}} + + NO + YES + 7 + NO + IBCocoaTouchFramework + (555) 555-5555 + + Helvetica-Bold + 20 + 16 + + + 3 + MQA + + + + 3 + MC4zMzMzMzMzNDMzAA + + 1 + 10 + 1 + + + {320, 460} + + + + IBCocoaTouchFramework + + + + + YES + + + toolbar + + + + 29 + + + + contentView + + + + 30 + + + + view + + + + 31 + + + + titleField + + + + 32 + + + + showAccounts: + + + + 33 + + + + showSettings: + + + + 34 + + + + + YES + + 0 + + + + + + 1 + + + YES + + + + + + + + -1 + + + File's Owner + + + -2 + + + + + 5 + + + + + 14 + + + YES + + + + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 5.IBPluginDependency + + + YES + MGMAccountController + UIResponder + {{354, 276}, {320, 480}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 34 + + + + YES + + MGMAccountController + NSObject + + YES + + YES + showAccounts: + showSettings: + + + YES + id + id + + + + YES + + YES + showAccounts: + showSettings: + + + YES + + showAccounts: + id + + + showSettings: + id + + + + + YES + + YES + contentView + titleField + toolbar + view + + + YES + UIView + UILabel + UIToolbar + UIView + + + + YES + + YES + contentView + titleField + toolbar + view + + + YES + + contentView + UIView + + + titleField + UILabel + + + toolbar + UIToolbar + + + view + UIView + + + + + IBProjectSource + Classes/VoiceMob/MGMAccountController.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UILabel + UIView + + IBFrameworkSource + UIKit.framework/Headers/UILabel.h + + + + UIResponder + NSObject + + + + UIToolbar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIToolbar.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/AccountSetup_iPhone.xib b/Resources/VoiceMob/AccountSetup_iPhone.xib index 4e28934..bfd0eef 100644 --- a/Resources/VoiceMob/AccountSetup_iPhone.xib +++ b/Resources/VoiceMob/AccountSetup_iPhone.xib @@ -13,7 +13,6 @@ YES - YES @@ -155,7 +154,7 @@ IBCocoaTouchFramework - + 292 YES @@ -164,7 +163,6 @@ 274 {320, 373} - YES YES @@ -182,7 +180,6 @@ 292 {{154, 337}, {146, 16}} - NO YES @@ -205,13 +202,11 @@ {320, 373} - - IBCocoaTouchFramework - + 292 YES @@ -220,7 +215,6 @@ 274 {320, 116} - YES YES @@ -244,7 +238,6 @@ 292 {{20, 124}, {29, 29}} - NO 1 @@ -275,7 +268,6 @@ 292 {{20, 161}, {29, 29}} - NO 2 @@ -299,7 +291,6 @@ 292 {{20, 198}, {29, 29}} - NO 3 @@ -320,7 +311,6 @@ 292 {{57, 127}, {242, 21}} - NO 1 IBCocoaTouchFramework @@ -343,7 +333,6 @@ 292 {{58, 165}, {242, 21}} - NO 2 IBCocoaTouchFramework @@ -359,7 +348,6 @@ 292 {{58, 202}, {242, 21}} - NO 3 IBCocoaTouchFramework @@ -372,8 +360,6 @@ {320, 373} - - IBCocoaTouchFramework @@ -401,7 +387,7 @@ IBCocoaTouchFramework - + 292 YES @@ -478,6 +464,8 @@ YES 17 + 1 + 7 9 IBCocoaTouchFramework @@ -509,12 +497,11 @@ {320, 373} - IBCocoaTouchFramework - + 292 YES @@ -523,7 +510,6 @@ 274 {320, 121} - YES YES @@ -541,7 +527,6 @@ 292 {{20, 134}, {80, 21}} - NO YES @@ -560,7 +545,6 @@ 292 {{20, 173}, {80, 21}} - NO YES @@ -579,7 +563,6 @@ 292 {{108, 129}, {192, 31}} - NO YES @@ -595,6 +578,8 @@ YES 17 + 1 + 7 9 IBCocoaTouchFramework @@ -604,7 +589,6 @@ 292 {{108, 168}, {192, 31}} - NO YES @@ -627,8 +611,6 @@ {320, 373} - - IBCocoaTouchFramework @@ -716,6 +698,7 @@ YES 17 + 1 9 IBCocoaTouchFramework @@ -785,6 +768,8 @@ YES 17 + 1 + 3 9 IBCocoaTouchFramework @@ -829,6 +814,8 @@ YES 17 + 1 + 3 9 IBCocoaTouchFramework @@ -873,6 +860,7 @@ YES 17 + 1 9 IBCocoaTouchFramework @@ -1990,7 +1978,7 @@ com.apple.InterfaceBuilder.IBCocoaTouchPlugin {{42, 273}, {320, 373}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin - {{42, 273}, {320, 373}} + {{169, 126}, {320, 373}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin {{42, 273}, {320, 373}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -2628,7 +2616,7 @@ YES {29, 29} {29, 29} - {411, 512} + {320, 399} 117 diff --git a/Resources/VoiceMob/Accounts_iPhone.xib b/Resources/VoiceMob/Accounts_iPhone.xib new file mode 100644 index 0000000..5179e3f --- /dev/null +++ b/Resources/VoiceMob/Accounts_iPhone.xib @@ -0,0 +1,317 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {320, 416} + + + 3 + MQA + + YES + IBCocoaTouchFramework + YES + 1 + 0 + YES + 44 + + + + + YES + + + tableView + + + + 8 + + + + dataSource + + + + 9 + + + + delegate + + + + 10 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 7 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 7.IBEditorWindowLastContentRect + 7.IBPluginDependency + + + YES + MGMAccounts + UIResponder + {{591, 142}, {320, 416}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 10 + + + + YES + + MGMAccounts + NSObject + + tableView + UITableView + + + tableView + + tableView + UITableView + + + + IBProjectSource + Classes/VoiceMob/MGMAccounts.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/MainWindow_iPhone.xib b/Resources/VoiceMob/MainWindow_iPhone.xib index f9bcac9..18149f8 100644 --- a/Resources/VoiceMob/MainWindow_iPhone.xib +++ b/Resources/VoiceMob/MainWindow_iPhone.xib @@ -13,7 +13,6 @@ YES - YES @@ -95,6 +94,9 @@ 2 + + YES + @@ -164,7 +166,7 @@ - 9 + 13 diff --git a/Resources/VoiceMob/SIP/SIPUser_iPhone.xib b/Resources/VoiceMob/SIP/SIPUser_iPhone.xib new file mode 100644 index 0000000..c257063 --- /dev/null +++ b/Resources/VoiceMob/SIP/SIPUser_iPhone.xib @@ -0,0 +1,396 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 266 + {{0, 367}, {320, 49}} + + + 3 + MCAwAA + + IBCocoaTouchFramework + + YES + + Keypad + IBCocoaTouchFramework + + + + Contacts + IBCocoaTouchFramework + + + + History + IBCocoaTouchFramework + + + + + + + 274 + {320, 367} + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + {320, 416} + + + 3 + MQA + + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 10 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + 3 + + + YES + + + + + + + + 4 + + + + + 5 + + + + + 7 + + + + + 9 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 7.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + MGMSIPUser + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{665, 98}, {320, 416}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 10 + + + + YES + + MGMSIPUser + NSObject + + view + UIView + + + view + + view + UIView + + + + IBProjectSource + Classes/VoiceMob/SIP/MGMSIPUser.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIResponder + NSObject + + + + UITabBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITabBar.h + + + + UITabBarItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UITabBarItem.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/Info.plist b/Resources/VoiceMob/SMS Themes/default.vmt/Info.plist new file mode 100644 index 0000000..081e1b9 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/Info.plist @@ -0,0 +1,25 @@ + + + + + variants + + + name + White - Light Blue + folder + white-lightblue + rebuild + + date + MMMM d, yyyy h:mm:ss a + + + name + Bubbles + author + Mr. Gecko + site + http://mrgeckosmedia.com/ + + diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/footer.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/footer.html new file mode 100755 index 0000000..e69de29 diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/header.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/header.html new file mode 100755 index 0000000..e69de29 diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbl.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbl.png new file mode 100644 index 0000000..86c63ff Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbl.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbm.png new file mode 100644 index 0000000..08e3c4c Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbr.png new file mode 100644 index 0000000..5d4ec8d Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tbr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tml.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tml.png new file mode 100644 index 0000000..a19c5f4 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tml.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmm.png new file mode 100644 index 0000000..5ae9391 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmr.png new file mode 100644 index 0000000..6cd31da Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/tmr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttl.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttl.png new file mode 100644 index 0000000..02fd24a Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttl.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttm.png new file mode 100644 index 0000000..62f6ba2 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttr.png new file mode 100644 index 0000000..3bcbe12 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ttr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubl.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubl.png new file mode 100644 index 0000000..b1b44c5 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubl.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubm.png new file mode 100644 index 0000000..e76d037 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubr.png new file mode 100644 index 0000000..02d34f2 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/ubr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/uml.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/uml.png new file mode 100644 index 0000000..ea0902f Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/uml.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umm.png new file mode 100644 index 0000000..034315d Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umr.png new file mode 100644 index 0000000..5f00065 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/umr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utl.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utl.png new file mode 100644 index 0000000..f6df3ba Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utl.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utm.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utm.png new file mode 100644 index 0000000..ad748de Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utm.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utr.png b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utr.png new file mode 100644 index 0000000..137dcb5 Binary files /dev/null and b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/images/utr.png differ diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/content.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/content.html new file mode 100755 index 0000000..f582b0e --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/content.html @@ -0,0 +1,14 @@ +
+ + + + + +

%TIME%
+ + + + + +
   
 %TEXT% 
   
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/context.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/context.html new file mode 100755 index 0000000..f8c0b7b --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/context.html @@ -0,0 +1,14 @@ +
+ + + + + +

%TIME%
+ + + + + +
   
 %TEXT% 
   
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContent.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContent.html new file mode 100755 index 0000000..50f45d9 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContent.html @@ -0,0 +1,14 @@ +
+ + + + + +

%TIME%
+ + + + + +
   
 %TEXT% 
   
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContext.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContext.html new file mode 100755 index 0000000..aeacf3e --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/incoming/nextContext.html @@ -0,0 +1,14 @@ +
+ + + + + +

%TIME%
+ + + + + +
   
 %TEXT% 
   
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/content.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/content.html new file mode 100755 index 0000000..7bc24e3 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/content.html @@ -0,0 +1,14 @@ +
+ + + + + +
+ + + + + +
   
 %TEXT% 
   

%TIME%
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/context.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/context.html new file mode 100755 index 0000000..e8965b6 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/context.html @@ -0,0 +1,14 @@ +
+ + + + + +
+ + + + + +
   
 %TEXT% 
   

%TIME%
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContent.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContent.html new file mode 100755 index 0000000..e3c986d --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContent.html @@ -0,0 +1,14 @@ +
+ + + + + +
+ + + + + +
   
 %TEXT% 
   

%TIME%
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContext.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContext.html new file mode 100755 index 0000000..cadf9c1 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/outgoing/nextContext.html @@ -0,0 +1,14 @@ +
+ + + + + +
+ + + + + +
   
 %TEXT% 
   

%TIME%
+
\ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeFooter.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeFooter.html new file mode 100755 index 0000000..bf8cf50 --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeFooter.html @@ -0,0 +1,4 @@ + +%FOOTER% + + \ No newline at end of file diff --git a/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeHeader.html b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeHeader.html new file mode 100755 index 0000000..0e4779f --- /dev/null +++ b/Resources/VoiceMob/SMS Themes/default.vmt/white-lightblue/themeHeader.html @@ -0,0 +1,160 @@ + + + + + + +%HEADER% +
\ No newline at end of file diff --git a/Resources/VoiceMob/Sounds/default.vms/Info.plist b/Resources/VoiceMob/Sounds/default.vms/Info.plist new file mode 100644 index 0000000..686c15c --- /dev/null +++ b/Resources/VoiceMob/Sounds/default.vms/Info.plist @@ -0,0 +1,45 @@ + + + + + sounds + + + name + Bass + file + bass.mp3 + + + name + Bells + file + bells.mp3 + + + name + Ringtone + file + ringtone.mp3 + + + name + Hold Music 1 + file + hold1.mp3 + + + name + Hold Music 2 + file + hold2.mp3 + + + name + Voice Mac + author + Mr. Gecko + site + http://mrgeckosmedia.com/ + + diff --git a/Resources/VoiceMob/Sounds/default.vms/bass.mp3 b/Resources/VoiceMob/Sounds/default.vms/bass.mp3 new file mode 100644 index 0000000..ed31442 Binary files /dev/null and b/Resources/VoiceMob/Sounds/default.vms/bass.mp3 differ diff --git a/Resources/VoiceMob/Sounds/default.vms/bells.mp3 b/Resources/VoiceMob/Sounds/default.vms/bells.mp3 new file mode 100644 index 0000000..3ee4612 Binary files /dev/null and b/Resources/VoiceMob/Sounds/default.vms/bells.mp3 differ diff --git a/Resources/VoiceMob/Sounds/default.vms/hold1.mp3 b/Resources/VoiceMob/Sounds/default.vms/hold1.mp3 new file mode 100644 index 0000000..e38c894 Binary files /dev/null and b/Resources/VoiceMob/Sounds/default.vms/hold1.mp3 differ diff --git a/Resources/VoiceMob/Sounds/default.vms/hold2.mp3 b/Resources/VoiceMob/Sounds/default.vms/hold2.mp3 new file mode 100644 index 0000000..5c759d9 Binary files /dev/null and b/Resources/VoiceMob/Sounds/default.vms/hold2.mp3 differ diff --git a/Resources/VoiceMob/Sounds/default.vms/ringtone.mp3 b/Resources/VoiceMob/Sounds/default.vms/ringtone.mp3 new file mode 100644 index 0000000..7457981 Binary files /dev/null and b/Resources/VoiceMob/Sounds/default.vms/ringtone.mp3 differ diff --git a/Resources/VoiceMob/Voice/VoiceContacts_iPhone.xib b/Resources/VoiceMob/Voice/VoiceContacts_iPhone.xib new file mode 100644 index 0000000..0c7a215 --- /dev/null +++ b/Resources/VoiceMob/Voice/VoiceContacts_iPhone.xib @@ -0,0 +1,550 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {{0, 44}, {320, 323}} + + + 3 + MQA + + 2 + + + YES + IBCocoaTouchFramework + YES + 1 + 0 + YES + 60 + + + + 290 + {320, 44} + + 3 + IBCocoaTouchFramework + 1 + Search + YES + + IBCocoaTouchFramework + + + YES + Scope + Scope + + + + + 292 + {{0, 44}, {320, 152}} + + NO + IBCocoaTouchFramework + 0 + 0 + + Helvetica-Bold + 15 + 16 + + + 3 + MQA + + + 1 + MC4xOTYwNzg0MzQ2IDAuMzA5ODAzOTMyOSAwLjUyMTU2ODY1NgA + + + 3 + MC41AA + + + + {320, 367} + + + 3 + MQA + + + IBCocoaTouchFramework + + + + + YES + + + contactsTable + + + + 7 + + + + searchBar + + + + 8 + + + + view + + + + 9 + + + + dataSource + + + + 10 + + + + delegate + + + + 11 + + + + searchCancelButton + + + + 13 + + + + cancelSearch: + + + 7 + + 14 + + + + delegate + + + + 15 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 3 + + + YES + + + + + + + + 4 + + + + + 5 + + + + + 12 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 12.IBPluginDependency + 3.IBEditorWindowLastContentRect + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + + + YES + MGMVoiceContacts + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{279, 294}, {320, 367}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 15 + + + + YES + + MGMContactsController + NSObject + + cancelSearch: + id + + + cancelSearch: + + cancelSearch: + id + + + + YES + + YES + contactsTable + searchBar + searchCancelButton + + + YES + UITableView + UISearchBar + UIButton + + + + YES + + YES + contactsTable + searchBar + searchCancelButton + + + YES + + contactsTable + UITableView + + + searchBar + UISearchBar + + + searchCancelButton + UIButton + + + + + IBProjectSource + Classes/VoiceMob/MGMContactsController.h + + + + MGMContactsController + NSObject + + view + UIView + + + view + + view + UIView + + + + IBUserSource + + + + + MGMVoiceContacts + MGMContactsController + + view + UIView + + + view + + view + UIView + + + + IBProjectSource + Classes/VoiceMob/Voice/MGMVoiceContacts.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIButton + UIControl + + IBFrameworkSource + UIKit.framework/Headers/UIButton.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIResponder + NSObject + + + + UIScrollView + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIScrollView.h + + + + UISearchBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UISearchBar.h + + + + UITableView + UIScrollView + + IBFrameworkSource + UIKit.framework/Headers/UITableView.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/Voice/VoicePad_iPhone.xib b/Resources/VoiceMob/Voice/VoicePad_iPhone.xib new file mode 100644 index 0000000..f2d68f5 --- /dev/null +++ b/Resources/VoiceMob/Voice/VoicePad_iPhone.xib @@ -0,0 +1,801 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 274 + {{20, 90}, {88, 45}} + + + 3 + MAA + + 1 + IBCocoaTouchFramework + + + + 274 + {{20, 20}, {280, 62}} + + + -1 + IBCocoaTouchFramework + + + + 274 + {{116, 90}, {88, 45}} + + + 2 + IBCocoaTouchFramework + + + + 274 + {{212, 90}, {88, 45}} + + + 3 + IBCocoaTouchFramework + + + + 274 + {{20, 143}, {88, 45}} + + + 4 + IBCocoaTouchFramework + + + + 274 + {{116, 143}, {88, 45}} + + + 5 + IBCocoaTouchFramework + + + + 274 + {{212, 143}, {88, 45}} + + + 6 + IBCocoaTouchFramework + + + + 274 + {{20, 196}, {88, 45}} + + + 7 + IBCocoaTouchFramework + + + + 274 + {{116, 196}, {88, 45}} + + + 8 + IBCocoaTouchFramework + + + + 274 + {{212, 196}, {88, 45}} + + + 9 + IBCocoaTouchFramework + + + + 274 + {{20, 249}, {88, 45}} + + + 10 + IBCocoaTouchFramework + + + + 274 + {{116, 249}, {88, 45}} + + + IBCocoaTouchFramework + + + + 274 + {{212, 249}, {88, 45}} + + + 11 + IBCocoaTouchFramework + + + + 274 + {{20, 302}, {88, 45}} + + + 12 + IBCocoaTouchFramework + + + + 274 + {{116, 302}, {88, 45}} + + + 13 + IBCocoaTouchFramework + + + + 274 + {{212, 302}, {88, 45}} + + + 14 + IBCocoaTouchFramework + + + {320, 367} + + + 3 + MC4xMDAwMDAwMDE1AA + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 34 + + + + numberView + + + + 48 + + + + dial: + + + 7 + + 49 + + + + dial: + + + 7 + + 50 + + + + dial: + + + 7 + + 51 + + + + dial: + + + 7 + + 52 + + + + dial: + + + 7 + + 53 + + + + dial: + + + 7 + + 54 + + + + dial: + + + 7 + + 55 + + + + dial: + + + 7 + + 56 + + + + dial: + + + 7 + + 57 + + + + dial: + + + 7 + + 58 + + + + dial: + + + 7 + + 59 + + + + dial: + + + 7 + + 60 + + + + delete: + + + 7 + + 61 + + + + call: + + + 7 + + 62 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 18 + + + YES + + + + + + + + + + + + + + + + + + + + + 3 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + 23 + + + + + 24 + + + + + 25 + + + + + 26 + + + + + 27 + + + + + 28 + + + + + 29 + + + + + 30 + + + + + 31 + + + + + 32 + + + + + 33 + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 18.IBEditorWindowLastContentRect + 18.IBPluginDependency + 19.CustomClassName + 19.IBPluginDependency + 20.CustomClassName + 20.IBPluginDependency + 21.CustomClassName + 21.IBPluginDependency + 22.CustomClassName + 22.IBPluginDependency + 23.CustomClassName + 23.IBPluginDependency + 24.CustomClassName + 24.IBPluginDependency + 25.CustomClassName + 25.IBPluginDependency + 26.CustomClassName + 26.IBPluginDependency + 27.CustomClassName + 27.IBPluginDependency + 28.CustomClassName + 28.IBPluginDependency + 29.CustomClassName + 29.IBPluginDependency + 3.CustomClassName + 3.IBPluginDependency + 30.CustomClassName + 30.IBPluginDependency + 31.CustomClassName + 31.IBPluginDependency + 32.CustomClassName + 32.IBPluginDependency + 33.CustomClassName + 33.IBPluginDependency + + + YES + MGMVoicePad + UIResponder + {{536, 121}, {320, 367}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + MGMNumberView + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 62 + + + + YES + + MGMNumberView + UIControl + + IBProjectSource + Classes/VoiceMob/Views/MGMNumberView.h + + + + MGMVoicePad + NSObject + + YES + + YES + call: + delete: + dial: + + + YES + id + id + id + + + + YES + + YES + call: + delete: + dial: + + + YES + + call: + id + + + delete: + id + + + dial: + id + + + + + YES + + YES + numberView + view + + + YES + MGMNumberView + UIView + + + + YES + + YES + numberView + view + + + YES + + numberView + MGMNumberView + + + view + UIView + + + + + IBProjectSource + Classes/VoiceMob/Voice/MGMVoicePad.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIControl + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIControl.h + + + + UIResponder + NSObject + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/Voice/VoiceUser_iPhone.xib b/Resources/VoiceMob/Voice/VoiceUser_iPhone.xib new file mode 100644 index 0000000..cc3998b --- /dev/null +++ b/Resources/VoiceMob/Voice/VoiceUser_iPhone.xib @@ -0,0 +1,463 @@ + + + + 1024 + 10F569 + 788 + 1038.29 + 461.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 117 + + + YES + + + + YES + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + YES + + YES + + + YES + + + + YES + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + + YES + + + 266 + {{0, 367}, {320, 49}} + + + 3 + MCAwAA + + IBCocoaTouchFramework + + YES + + Keypad + IBCocoaTouchFramework + + + + Contacts + IBCocoaTouchFramework + + + + SMS Messages + IBCocoaTouchFramework + + + + Inbox + IBCocoaTouchFramework + + + + + + + 274 + {320, 367} + + + 3 + MQA + + IBCocoaTouchFramework + + + {320, 416} + + + 3 + MQA + + 2 + + + IBCocoaTouchFramework + + + + + YES + + + view + + + + 10 + + + + tabView + + + + 74 + + + + tabBar + + + + 75 + + + + delegate + + + + 76 + + + + + YES + + 0 + + + + + + -1 + + + File's Owner + + + -2 + + + + + 8 + + + YES + + + + + + + 3 + + + YES + + + + + + + + + 4 + + + + + 5 + + + + + 6 + + + + + 7 + + + + + 9 + + + YES + + + + + + + YES + + YES + -1.CustomClassName + -2.CustomClassName + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBEditorWindowLastContentRect + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + MGMVoiceUser + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + {{497, 127}, {320, 416}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 76 + + + + YES + + MGMVoiceUser + NSObject + + YES + + YES + tabBar + tabView + view + + + YES + UITabBar + UIView + UIView + + + + YES + + YES + tabBar + tabView + view + + + YES + + tabBar + UITabBar + + + tabView + UIView + + + view + UIView + + + + + IBProjectSource + Classes/VoiceMob/Voice/MGMVoiceUser.h + + + + + YES + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIAccessibility.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UINibLoading.h + + + + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIResponder.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UIResponder + NSObject + + + + UITabBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITabBar.h + + + + UITabBarItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UITabBarItem.h + + + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UITextField.h + + + + UIView + UIResponder + + IBFrameworkSource + UIKit.framework/Headers/UIView.h + + + + + 0 + IBCocoaTouchFramework + + com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS + + + + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 + + + YES + ../../../VoiceMob.xcodeproj + 3 + 117 + + diff --git a/Resources/VoiceMob/blankicon.png b/Resources/VoiceMob/blankicon.png new file mode 100644 index 0000000..750037a Binary files /dev/null and b/Resources/VoiceMob/blankicon.png differ diff --git a/VoiceMob.xcodeproj/project.pbxproj b/VoiceMob.xcodeproj/project.pbxproj index ce3ec18..0aab6a5 100755 --- a/VoiceMob.xcodeproj/project.pbxproj +++ b/VoiceMob.xcodeproj/project.pbxproj @@ -25,11 +25,29 @@ 2A1E99A3124D70A500D3BEAE /* RadioSelected.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A1E99A1124D70A500D3BEAE /* RadioSelected.png */; }; 2A1E99A6124D77F900D3BEAE /* MGMAccountSetup.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1E99A5124D77F900D3BEAE /* MGMAccountSetup.m */; }; 2A1E9A0F124D827B00D3BEAE /* VoiceMob Setup.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A1E9A0E124D827B00D3BEAE /* VoiceMob Setup.png */; }; - 2A1E9AEC124DA3CC00D3BEAE /* MGMSIPUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1E9AEB124DA3CC00D3BEAE /* MGMSIPUser.m */; }; 2A1E9B0F124DA4CB00D3BEAE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A1E9B0E124DA4CB00D3BEAE /* AudioToolbox.framework */; }; 2A1E9B13124DA4D700D3BEAE /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A1E9B12124DA4D700D3BEAE /* CoreAudio.framework */; }; 2A1E9B45124DA63C00D3BEAE /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A1E9B44124DA63C00D3BEAE /* CFNetwork.framework */; }; 2A1E9BA6124DB1AE00D3BEAE /* VoiceMob.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A1E9BA5124DB1AE00D3BEAE /* VoiceMob.png */; }; + 2A316C3412529555009998B6 /* MGMSIPUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A316C3212529555009998B6 /* MGMSIPUser.m */; }; + 2A316C3712529567009998B6 /* MGMVoiceUser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A316C3612529567009998B6 /* MGMVoiceUser.m */; }; + 2A316C49125296A5009998B6 /* SIPUser_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2A316C46125296A5009998B6 /* SIPUser_iPhone.xib */; }; + 2A316C4A125296A5009998B6 /* VoiceUser_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2A316C48125296A5009998B6 /* VoiceUser_iPhone.xib */; }; + 2A316DE71252C8BA009998B6 /* MGMProgressView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A316DE61252C8BA009998B6 /* MGMProgressView.m */; }; + 2A316F101252FBED009998B6 /* MGMNumberView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A316F0F1252FBED009998B6 /* MGMNumberView.m */; }; + 2A31708C1253987F009998B6 /* VoicePad_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2A31708B1253987F009998B6 /* VoicePad_iPhone.xib */; }; + 2A3170A712539BFA009998B6 /* MGMVoicePad.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A3170A612539BFA009998B6 /* MGMVoicePad.m */; }; + 2A354CD81251820C00454A75 /* Accounts_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2A354CD71251820C00454A75 /* Accounts_iPhone.xib */; }; + 2A354CDC1251830F00454A75 /* MGMAccounts.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A354CDB1251830F00454A75 /* MGMAccounts.m */; }; + 2A9067C71254302E0008461E /* VoiceContacts_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2A9067C61254302E0008461E /* VoiceContacts_iPhone.xib */; }; + 2A9067CB125430DA0008461E /* MGMVoiceContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A9067CA125430DA0008461E /* MGMVoiceContacts.m */; }; + 2A9067CE125431010008461E /* MGMContactsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A9067CD125431010008461E /* MGMContactsController.m */; }; + 2A906840125436130008461E /* MGMContactView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A90683F125436120008461E /* MGMContactView.m */; }; + 2A90693C1254CF040008461E /* SMS Themes in Resources */ = {isa = PBXBuildFile; fileRef = 2A9069071254CF040008461E /* SMS Themes */; }; + 2A90693D1254CF040008461E /* Sounds in Resources */ = {isa = PBXBuildFile; fileRef = 2A9069321254CF040008461E /* Sounds */; }; + 2A906A041254D4BB0008461E /* blankicon.png in Resources */ = {isa = PBXBuildFile; fileRef = 2A906A031254D4BB0008461E /* blankicon.png */; }; + 2ABD37AE1250D448004AAE00 /* AccountController_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2ABD37AD1250D448004AAE00 /* AccountController_iPhone.xib */; }; + 2ABD380412513B26004AAE00 /* MGMAccountController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2ABD380312513B26004AAE00 /* MGMAccountController.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -37,21 +55,21 @@ isa = PBXContainerItemProxy; containerPortal = 2A1E97C8124D25DE00D3BEAE /* VoiceBase.xcodeproj */; proxyType = 2; - remoteGlobalIDString = 8DC2EF5B0486A6940098B216 /* VoiceBase.framework */; + remoteGlobalIDString = 8DC2EF5B0486A6940098B216; remoteInfo = VoiceBase; }; 2A1E97D2124D25DE00D3BEAE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 2A1E97C8124D25DE00D3BEAE /* VoiceBase.xcodeproj */; proxyType = 2; - remoteGlobalIDString = 2AE6EE531249DA0B0006B5AC /* libVoiceBase.a */; + remoteGlobalIDString = 2AE6EE531249DA0B0006B5AC; remoteInfo = "VoiceBase Touch"; }; 2A1E97D4124D25E800D3BEAE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 2A1E97C8124D25DE00D3BEAE /* VoiceBase.xcodeproj */; proxyType = 1; - remoteGlobalIDString = 2AE6EE521249DA0B0006B5AC /* VoiceBase Touch */; + remoteGlobalIDString = 2AE6EE521249DA0B0006B5AC; remoteInfo = "VoiceBase Touch"; }; /* End PBXContainerItemProxy section */ @@ -81,12 +99,39 @@ 2A1E99A4124D77F900D3BEAE /* MGMAccountSetup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMAccountSetup.h; sourceTree = ""; }; 2A1E99A5124D77F900D3BEAE /* MGMAccountSetup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMAccountSetup.m; sourceTree = ""; }; 2A1E9A0E124D827B00D3BEAE /* VoiceMob Setup.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VoiceMob Setup.png"; sourceTree = ""; }; - 2A1E9AEA124DA3CC00D3BEAE /* MGMSIPUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMSIPUser.h; sourceTree = ""; }; - 2A1E9AEB124DA3CC00D3BEAE /* MGMSIPUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMSIPUser.m; sourceTree = ""; }; 2A1E9B0E124DA4CB00D3BEAE /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; 2A1E9B12124DA4D700D3BEAE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; 2A1E9B44124DA63C00D3BEAE /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = System/Library/Frameworks/CFNetwork.framework; sourceTree = SDKROOT; }; 2A1E9BA5124DB1AE00D3BEAE /* VoiceMob.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = VoiceMob.png; sourceTree = SOURCE_ROOT; }; + 2A316C3112529555009998B6 /* MGMSIPUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMSIPUser.h; sourceTree = ""; }; + 2A316C3212529555009998B6 /* MGMSIPUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMSIPUser.m; sourceTree = ""; }; + 2A316C3512529567009998B6 /* MGMVoiceUser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMVoiceUser.h; sourceTree = ""; }; + 2A316C3612529567009998B6 /* MGMVoiceUser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMVoiceUser.m; sourceTree = ""; }; + 2A316C46125296A5009998B6 /* SIPUser_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SIPUser_iPhone.xib; sourceTree = ""; }; + 2A316C48125296A5009998B6 /* VoiceUser_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VoiceUser_iPhone.xib; sourceTree = ""; }; + 2A316DE51252C8BA009998B6 /* MGMProgressView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMProgressView.h; sourceTree = ""; }; + 2A316DE61252C8BA009998B6 /* MGMProgressView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMProgressView.m; sourceTree = ""; }; + 2A316F0E1252FBED009998B6 /* MGMNumberView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMNumberView.h; sourceTree = ""; }; + 2A316F0F1252FBED009998B6 /* MGMNumberView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMNumberView.m; sourceTree = ""; }; + 2A31708B1253987F009998B6 /* VoicePad_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VoicePad_iPhone.xib; sourceTree = ""; }; + 2A3170A512539BFA009998B6 /* MGMVoicePad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMVoicePad.h; sourceTree = ""; }; + 2A3170A612539BFA009998B6 /* MGMVoicePad.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMVoicePad.m; sourceTree = ""; }; + 2A354CD71251820C00454A75 /* Accounts_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Accounts_iPhone.xib; sourceTree = ""; }; + 2A354CDA1251830F00454A75 /* MGMAccounts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMAccounts.h; sourceTree = ""; }; + 2A354CDB1251830F00454A75 /* MGMAccounts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMAccounts.m; sourceTree = ""; }; + 2A9067C61254302E0008461E /* VoiceContacts_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = VoiceContacts_iPhone.xib; sourceTree = ""; }; + 2A9067C9125430DA0008461E /* MGMVoiceContacts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMVoiceContacts.h; sourceTree = ""; }; + 2A9067CA125430DA0008461E /* MGMVoiceContacts.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMVoiceContacts.m; sourceTree = ""; }; + 2A9067CC125431010008461E /* MGMContactsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMContactsController.h; sourceTree = ""; }; + 2A9067CD125431010008461E /* MGMContactsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMContactsController.m; sourceTree = ""; }; + 2A90683E125436120008461E /* MGMContactView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMContactView.h; sourceTree = ""; }; + 2A90683F125436120008461E /* MGMContactView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMContactView.m; sourceTree = ""; }; + 2A9069071254CF040008461E /* SMS Themes */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "SMS Themes"; sourceTree = ""; }; + 2A9069321254CF040008461E /* Sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Sounds; sourceTree = ""; }; + 2A906A031254D4BB0008461E /* blankicon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = blankicon.png; sourceTree = ""; }; + 2ABD37AD1250D448004AAE00 /* AccountController_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AccountController_iPhone.xib; sourceTree = ""; }; + 2ABD380212513B25004AAE00 /* MGMAccountController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMAccountController.h; sourceTree = ""; }; + 2ABD380312513B26004AAE00 /* MGMAccountController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMAccountController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -163,12 +208,19 @@ children = ( 2A1E991D124D499800D3BEAE /* MGMVMAddons.h */, 2A1E991E124D499800D3BEAE /* MGMVMAddons.m */, + 2A9067CC125431010008461E /* MGMContactsController.h */, + 2A9067CD125431010008461E /* MGMContactsController.m */, 2A1E97D7124D261E00D3BEAE /* MGMController.h */, 2A1E97D8124D261E00D3BEAE /* MGMController.m */, 2A1E99A4124D77F900D3BEAE /* MGMAccountSetup.h */, 2A1E99A5124D77F900D3BEAE /* MGMAccountSetup.m */, - 2A1E9AEA124DA3CC00D3BEAE /* MGMSIPUser.h */, - 2A1E9AEB124DA3CC00D3BEAE /* MGMSIPUser.m */, + 2ABD380212513B25004AAE00 /* MGMAccountController.h */, + 2ABD380312513B26004AAE00 /* MGMAccountController.m */, + 2A354CDA1251830F00454A75 /* MGMAccounts.h */, + 2A354CDB1251830F00454A75 /* MGMAccounts.m */, + 2A316C3012529555009998B6 /* SIP */, + 2A316C3312529555009998B6 /* Voice */, + 2A316DE41252C8BA009998B6 /* Views */, ); name = Classes; path = Classes/VoiceMob; @@ -178,6 +230,7 @@ isa = PBXGroup; children = ( 2A1E9BA5124DB1AE00D3BEAE /* VoiceMob.png */, + 2A906A031254D4BB0008461E /* blankicon.png */, 2A1E9A0E124D827B00D3BEAE /* VoiceMob Setup.png */, 2A1E97C1124D22DA00D3BEAE /* Info.plist */, 2A1E9825124D2B3D00D3BEAE /* MainWindow_iPhone.xib */, @@ -185,6 +238,12 @@ 2A1E997B124D69DE00D3BEAE /* AccountSetup_iPhone.xib */, 2A1E99A0124D70A500D3BEAE /* Radio.png */, 2A1E99A1124D70A500D3BEAE /* RadioSelected.png */, + 2ABD37AD1250D448004AAE00 /* AccountController_iPhone.xib */, + 2A354CD71251820C00454A75 /* Accounts_iPhone.xib */, + 2A9069071254CF040008461E /* SMS Themes */, + 2A9069321254CF040008461E /* Sounds */, + 2A316C45125296A5009998B6 /* SIP */, + 2A316C47125296A5009998B6 /* Voice */, ); name = Resources; path = Resources/VoiceMob; @@ -199,6 +258,59 @@ name = Products; sourceTree = ""; }; + 2A316C3012529555009998B6 /* SIP */ = { + isa = PBXGroup; + children = ( + 2A316C3112529555009998B6 /* MGMSIPUser.h */, + 2A316C3212529555009998B6 /* MGMSIPUser.m */, + ); + path = SIP; + sourceTree = ""; + }; + 2A316C3312529555009998B6 /* Voice */ = { + isa = PBXGroup; + children = ( + 2A316C3512529567009998B6 /* MGMVoiceUser.h */, + 2A316C3612529567009998B6 /* MGMVoiceUser.m */, + 2A3170A512539BFA009998B6 /* MGMVoicePad.h */, + 2A3170A612539BFA009998B6 /* MGMVoicePad.m */, + 2A9067C9125430DA0008461E /* MGMVoiceContacts.h */, + 2A9067CA125430DA0008461E /* MGMVoiceContacts.m */, + ); + path = Voice; + sourceTree = ""; + }; + 2A316C45125296A5009998B6 /* SIP */ = { + isa = PBXGroup; + children = ( + 2A316C46125296A5009998B6 /* SIPUser_iPhone.xib */, + ); + path = SIP; + sourceTree = ""; + }; + 2A316C47125296A5009998B6 /* Voice */ = { + isa = PBXGroup; + children = ( + 2A316C48125296A5009998B6 /* VoiceUser_iPhone.xib */, + 2A31708B1253987F009998B6 /* VoicePad_iPhone.xib */, + 2A9067C61254302E0008461E /* VoiceContacts_iPhone.xib */, + ); + path = Voice; + sourceTree = ""; + }; + 2A316DE41252C8BA009998B6 /* Views */ = { + isa = PBXGroup; + children = ( + 2A316DE51252C8BA009998B6 /* MGMProgressView.h */, + 2A316DE61252C8BA009998B6 /* MGMProgressView.m */, + 2A316F0E1252FBED009998B6 /* MGMNumberView.h */, + 2A316F0F1252FBED009998B6 /* MGMNumberView.m */, + 2A90683E125436120008461E /* MGMContactView.h */, + 2A90683F125436120008461E /* MGMContactView.m */, + ); + path = Views; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -272,6 +384,15 @@ 2A1E99A3124D70A500D3BEAE /* RadioSelected.png in Resources */, 2A1E9A0F124D827B00D3BEAE /* VoiceMob Setup.png in Resources */, 2A1E9BA6124DB1AE00D3BEAE /* VoiceMob.png in Resources */, + 2ABD37AE1250D448004AAE00 /* AccountController_iPhone.xib in Resources */, + 2A354CD81251820C00454A75 /* Accounts_iPhone.xib in Resources */, + 2A316C49125296A5009998B6 /* SIPUser_iPhone.xib in Resources */, + 2A316C4A125296A5009998B6 /* VoiceUser_iPhone.xib in Resources */, + 2A31708C1253987F009998B6 /* VoicePad_iPhone.xib in Resources */, + 2A9067C71254302E0008461E /* VoiceContacts_iPhone.xib in Resources */, + 2A90693C1254CF040008461E /* SMS Themes in Resources */, + 2A90693D1254CF040008461E /* Sounds in Resources */, + 2A906A041254D4BB0008461E /* blankicon.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -286,7 +407,16 @@ 2A1E97D9124D261E00D3BEAE /* MGMController.m in Sources */, 2A1E991F124D499800D3BEAE /* MGMVMAddons.m in Sources */, 2A1E99A6124D77F900D3BEAE /* MGMAccountSetup.m in Sources */, - 2A1E9AEC124DA3CC00D3BEAE /* MGMSIPUser.m in Sources */, + 2ABD380412513B26004AAE00 /* MGMAccountController.m in Sources */, + 2A354CDC1251830F00454A75 /* MGMAccounts.m in Sources */, + 2A316C3412529555009998B6 /* MGMSIPUser.m in Sources */, + 2A316C3712529567009998B6 /* MGMVoiceUser.m in Sources */, + 2A316DE71252C8BA009998B6 /* MGMProgressView.m in Sources */, + 2A316F101252FBED009998B6 /* MGMNumberView.m in Sources */, + 2A3170A712539BFA009998B6 /* MGMVoicePad.m in Sources */, + 2A9067CB125430DA0008461E /* MGMVoiceContacts.m in Sources */, + 2A9067CE125431010008461E /* MGMContactsController.m in Sources */, + 2A906840125436130008461E /* MGMContactView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; };