Fixed issue with international login, made MGMXML for XML parsing, and ported VoiceBase for the iPhone.
This commit is contained in:
parent
7278b4e612
commit
17a82d13ac
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
||||||
#import <AddressBook/ABAddressBook.h>
|
#import <AddressBook/ABAddressBook.h>
|
||||||
#else
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
@ -93,18 +93,18 @@
|
|||||||
int phonesCount = ABMultiValueGetCount(phones);
|
int phonesCount = ABMultiValueGetCount(phones);
|
||||||
NSData *image = [(NSData *)ABPersonCopyImageData(person) autorelease];
|
NSData *image = [(NSData *)ABPersonCopyImageData(person) autorelease];
|
||||||
if (phonesCount>0) {
|
if (phonesCount>0) {
|
||||||
//if (image!=nil)
|
if (image!=nil)
|
||||||
// image = [image resizeTo:NSMakeSize(MGMABPhotoSize, MGMABPhotoSize)];
|
image = [image resizeTo:MGMABPhotoSize];
|
||||||
}
|
}
|
||||||
for (int p=0; p<phonesCount; p++) {
|
for (int p=0; p<phonesCount; p++) {
|
||||||
if (shouldStop) break;
|
if (shouldStop) break;
|
||||||
NSMutableDictionary *contact = [NSMutableDictionary dictionary];
|
NSMutableDictionary *contact = [NSMutableDictionary dictionary];
|
||||||
[contact setObject:name forKey:MGMABName];
|
[contact setObject:name forKey:MGMCName];
|
||||||
[contact setObject:company forKey:MGMABCompany];
|
[contact setObject:company forKey:MGMCCompany];
|
||||||
if (delegate!=nil)
|
if (delegate!=nil)
|
||||||
[contact setObject:[[(NSString *)ABMultiValueCopyValueAtIndex(phones, p) autorelease] phoneFormatWithAreaCode:[delegate areaCode]] forKey:MGMABNumber];
|
[contact setObject:[[(NSString *)ABMultiValueCopyValueAtIndex(phones, p) autorelease] phoneFormatWithAreaCode:[delegate areaCode]] forKey:MGMCNumber];
|
||||||
else
|
else
|
||||||
[contact setObject:[[(NSString *)ABMultiValueCopyValueAtIndex(phones, p) autorelease] phoneFormat] forKey:MGMABNumber];
|
[contact setObject:[[(NSString *)ABMultiValueCopyValueAtIndex(phones, p) autorelease] phoneFormat] forKey:MGMCNumber];
|
||||||
NSString *label = [(NSString *)ABMultiValueCopyLabelAtIndex(phones, p) autorelease];
|
NSString *label = [(NSString *)ABMultiValueCopyLabelAtIndex(phones, p) autorelease];
|
||||||
NSRange range = [label rangeOfString:@"<"];
|
NSRange range = [label rangeOfString:@"<"];
|
||||||
if (range.location!=NSNotFound) {
|
if (range.location!=NSNotFound) {
|
||||||
@ -116,9 +116,9 @@
|
|||||||
label = [string substringWithRange:NSMakeRange(0, range.location)];
|
label = [string substringWithRange:NSMakeRange(0, range.location)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[contact setObject:[label capitalizedString] forKey:MGMABLabel];
|
[contact setObject:[label capitalizedString] forKey:MGMCLabel];
|
||||||
if (image!=nil)
|
if (image!=nil)
|
||||||
[contact setObject:image forKey:MGMABPhoto];
|
[contact setObject:image forKey:MGMCPhoto];
|
||||||
if ([contactsSender respondsToSelector:@selector(gotContact:)]) [contactsSender gotContact:contact];
|
if ([contactsSender respondsToSelector:@selector(gotContact:)]) [contactsSender gotContact:contact];
|
||||||
}
|
}
|
||||||
CFRelease(phones);
|
CFRelease(phones);
|
||||||
@ -143,7 +143,7 @@
|
|||||||
NSData *image = [person imageData];
|
NSData *image = [person imageData];
|
||||||
if ([phones count]>0) {
|
if ([phones count]>0) {
|
||||||
if (image!=nil)
|
if (image!=nil)
|
||||||
image = [image resizeTo:NSMakeSize(MGMABPhotoSize, MGMABPhotoSize)];
|
image = [image resizeTo:MGMABPhotoSize];
|
||||||
}
|
}
|
||||||
for (int p=0; p<[phones count]; p++) {
|
for (int p=0; p<[phones count]; p++) {
|
||||||
if (shouldStop) break;
|
if (shouldStop) break;
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@protocol MGMContactsProtocol, MGMContactsOwnerDelegate;
|
@protocol MGMContactsProtocol, MGMContactsOwnerDelegate;
|
||||||
@class MGMUser, MGMLiteConnection;
|
@class MGMUser, MGMLiteConnection;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
||||||
#else
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#endif
|
#endif
|
||||||
@ -26,7 +26,12 @@ extern NSString * const MGMCContactID;
|
|||||||
|
|
||||||
extern NSString * const MGMCGoogleContactsUser;
|
extern NSString * const MGMCGoogleContactsUser;
|
||||||
|
|
||||||
extern const int MGMABPhotoSize;
|
extern const float MGMABPhotoSizePX;
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#define MGMABPhotoSize CGSizeMake(MGMABPhotoSizePX, MGMABPhotoSizePX)
|
||||||
|
#else
|
||||||
|
#define MGMABPhotoSize NSMakeSize(MGMABPhotoSizePX, MGMABPhotoSizePX)
|
||||||
|
#endif
|
||||||
|
|
||||||
@class MGMUser;
|
@class MGMUser;
|
||||||
|
|
||||||
|
@ -22,4 +22,4 @@ NSString * const MGMCContactID = @"contactid";
|
|||||||
|
|
||||||
NSString * const MGMCGoogleContactsUser = @"MGMCGoogleContactsUser";
|
NSString * const MGMCGoogleContactsUser = @"MGMCGoogleContactsUser";
|
||||||
|
|
||||||
const int MGMABPhotoSize = 64;
|
const float MGMABPhotoSizePX = 64.0;
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@class MGMUser, MGMURLConnectionManager;
|
@class MGMUser, MGMURLConnectionManager;
|
||||||
@protocol MGMContactsDelegate, MGMContactsOwnerDelegate;
|
@protocol MGMContactsDelegate, MGMContactsOwnerDelegate;
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#import "MGMContactsProtocol.h"
|
#import "MGMContactsProtocol.h"
|
||||||
#import "MGMInstance.h"
|
#import "MGMInstance.h"
|
||||||
#import "MGMAddons.h"
|
#import "MGMAddons.h"
|
||||||
|
#import "MGMXML.h"
|
||||||
#import <MGMUsers/MGMUsers.h>
|
#import <MGMUsers/MGMUsers.h>
|
||||||
|
|
||||||
NSString * const MGMGCAuthenticationURL = @"https://www.google.com/accounts/ClientLogin";
|
NSString * const MGMGCAuthenticationURL = @"https://www.google.com/accounts/ClientLogin";
|
||||||
@ -145,7 +146,7 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
}
|
}
|
||||||
if (contacts!=nil) [contacts release];
|
if (contacts!=nil) [contacts release];
|
||||||
contacts = [NSMutableArray new];
|
contacts = [NSMutableArray new];
|
||||||
NSXMLElement *XML = [[[[NSXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:NSXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
MGMXMLElement *XML = [(MGMXMLDocument *)[[[MGMXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:MGMXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
||||||
contactEntries = [[XML elementsForName:@"entry"] retain];
|
contactEntries = [[XML elementsForName:@"entry"] retain];
|
||||||
contactsIndex=0;
|
contactsIndex=0;
|
||||||
[self continueContacts];
|
[self continueContacts];
|
||||||
@ -164,7 +165,7 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
}
|
}
|
||||||
- (void)parseContact {
|
- (void)parseContact {
|
||||||
if (shouldStop) return;
|
if (shouldStop) return;
|
||||||
NSXMLElement *entry = [contactEntries objectAtIndex:contactsIndex];
|
MGMXMLElement *entry = [contactEntries objectAtIndex:contactsIndex];
|
||||||
NSArray *titles = [entry elementsForName:@"title"];
|
NSArray *titles = [entry elementsForName:@"title"];
|
||||||
NSString *name = @"";
|
NSString *name = @"";
|
||||||
if ([titles count]!=0)
|
if ([titles count]!=0)
|
||||||
@ -180,14 +181,14 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
NSData *image = nil;
|
NSData *image = nil;
|
||||||
if ([phones count]>0) {
|
if ([phones count]>0) {
|
||||||
if (contactPhoto!=nil) {
|
if (contactPhoto!=nil) {
|
||||||
image = [contactPhoto resizeTo:NSMakeSize(MGMABPhotoSize, MGMABPhotoSize)];
|
image = [contactPhoto resizeTo:MGMABPhotoSize];
|
||||||
[contactPhoto release];
|
[contactPhoto release];
|
||||||
contactPhoto = nil;
|
contactPhoto = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int p=0; p<[phones count]; p++) {
|
for (int p=0; p<[phones count]; p++) {
|
||||||
if (shouldStop) break;
|
if (shouldStop) break;
|
||||||
NSXMLElement *phone = [phones objectAtIndex:p];
|
MGMXMLElement *phone = [phones objectAtIndex:p];
|
||||||
NSMutableDictionary *contact = [NSMutableDictionary dictionary];
|
NSMutableDictionary *contact = [NSMutableDictionary dictionary];
|
||||||
[contact setObject:name forKey:MGMCName];
|
[contact setObject:name forKey:MGMCName];
|
||||||
[contact setObject:company forKey:MGMCCompany];
|
[contact setObject:company forKey:MGMCCompany];
|
||||||
@ -196,9 +197,9 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
else
|
else
|
||||||
[contact setObject:[[phone stringValue] phoneFormat] forKey:MGMCNumber];
|
[contact setObject:[[phone stringValue] phoneFormat] forKey:MGMCNumber];
|
||||||
NSString *label = @"";
|
NSString *label = @"";
|
||||||
NSXMLNode *labelXML = [phone attributeForName:@"label"];
|
MGMXMLNode *labelXML = [phone attributeForName:@"label"];
|
||||||
if (labelXML==nil) {
|
if (labelXML==nil) {
|
||||||
NSXMLNode *rel = [phone attributeForName:@"rel"];
|
MGMXMLNode *rel = [phone attributeForName:@"rel"];
|
||||||
if (rel!=nil) {
|
if (rel!=nil) {
|
||||||
NSString *string = [rel stringValue];
|
NSString *string = [rel stringValue];
|
||||||
NSRange range = [string rangeOfString:@"#"];
|
NSRange range = [string rangeOfString:@"#"];
|
||||||
@ -219,13 +220,13 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
- (void)continueContacts {
|
- (void)continueContacts {
|
||||||
for (; contactsIndex<[contactEntries count]; contactsIndex++) {
|
for (; contactsIndex<[contactEntries count]; contactsIndex++) {
|
||||||
if (shouldStop) break;
|
if (shouldStop) break;
|
||||||
NSXMLElement *entry = [contactEntries objectAtIndex:contactsIndex];
|
MGMXMLElement *entry = [contactEntries objectAtIndex:contactsIndex];
|
||||||
NSArray *phones = [entry elementsForName:@"gd:phoneNumber"];
|
NSArray *phones = [entry elementsForName:@"gd:phoneNumber"];
|
||||||
if ([phones count]!=0) {
|
if ([phones count]!=0) {
|
||||||
NSArray *links = [entry elementsForName:@"link"];
|
NSArray *links = [entry elementsForName:@"link"];
|
||||||
BOOL loadingPhoto = NO;
|
BOOL loadingPhoto = NO;
|
||||||
for (int i=0; i<[links count]; i++) {
|
for (int i=0; i<[links count]; i++) {
|
||||||
NSXMLNode *rel = [[links objectAtIndex:i] attributeForName:@"rel"];
|
MGMXMLNode *rel = [(MGMXMLElement *)[links objectAtIndex:i] attributeForName:@"rel"];
|
||||||
if (rel!=nil) {
|
if (rel!=nil) {
|
||||||
if ([[rel stringValue] containsString:@"#photo"]) {
|
if ([[rel stringValue] containsString:@"#photo"]) {
|
||||||
NSString *url = [[[links objectAtIndex:i] attributeForName:@"href"] stringValue];
|
NSString *url = [[[links objectAtIndex:i] attributeForName:@"href"] stringValue];
|
||||||
@ -296,7 +297,7 @@ const BOOL MGMGoogleContactsInvisible = YES;
|
|||||||
NSLog(@"MGMGoogleContacts Error: %@", theError);
|
NSLog(@"MGMGoogleContacts Error: %@", theError);
|
||||||
}
|
}
|
||||||
- (void)groupsDidFinish:(NSDictionary *)theInfo {
|
- (void)groupsDidFinish:(NSDictionary *)theInfo {
|
||||||
NSXMLElement *XML = [[[[NSXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:NSXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
MGMXMLElement *XML = [(MGMXMLDocument *)[[[MGMXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:MGMXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
||||||
NSLog(@"%@", XML);
|
NSLog(@"%@", XML);
|
||||||
gettingGroups = NO;
|
gettingGroups = NO;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
||||||
#else
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#endif
|
#endif
|
||||||
@ -18,9 +18,7 @@
|
|||||||
@interface NSString (MGMAddons)
|
@interface NSString (MGMAddons)
|
||||||
+ (NSString *)stringWithSeconds:(int)theSeconds;
|
+ (NSString *)stringWithSeconds:(int)theSeconds;
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
- (NSString *)flattenHTML;
|
- (NSString *)flattenHTML;
|
||||||
#endif
|
|
||||||
- (NSString *)replace:(NSString *)targetString with:(NSString *)replaceString;
|
- (NSString *)replace:(NSString *)targetString with:(NSString *)replaceString;
|
||||||
- (BOOL)containsString:(NSString *)string;
|
- (BOOL)containsString:(NSString *)string;
|
||||||
|
|
||||||
@ -40,12 +38,12 @@
|
|||||||
|
|
||||||
- (NSString *)addPercentEscapes;
|
- (NSString *)addPercentEscapes;
|
||||||
|
|
||||||
- (NSString *)truncateForWidth:(double)theWidth attributes:(NSDictionary *)theAttributes;
|
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
#if !TARGET_OS_IPHONE
|
||||||
NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *context);
|
- (NSString *)truncateForWidth:(double)theWidth attributes:(NSDictionary *)theAttributes;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *context);
|
||||||
|
|
||||||
- (BOOL)isIPAddress;
|
- (BOOL)isIPAddress;
|
||||||
|
|
||||||
#if MGMSIPENABLED
|
#if MGMSIPENABLED
|
||||||
@ -56,7 +54,7 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont
|
|||||||
|
|
||||||
@interface NSData (MGMAddons)
|
@interface NSData (MGMAddons)
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
|
- (NSData *)resizeTo:(CGSize)theSize;
|
||||||
#else
|
#else
|
||||||
- (NSData *)resizeTo:(NSSize)theSize;
|
- (NSData *)resizeTo:(NSSize)theSize;
|
||||||
#endif
|
#endif
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#import "MGMAddons.h"
|
#import "MGMAddons.h"
|
||||||
#import "MGMInbox.h"
|
#import "MGMInbox.h"
|
||||||
|
#import "MGMXML.h"
|
||||||
|
|
||||||
@implementation NSString (MGMAddons)
|
@implementation NSString (MGMAddons)
|
||||||
+ (NSString *)stringWithSeconds:(int)theSeconds {
|
+ (NSString *)stringWithSeconds:(int)theSeconds {
|
||||||
@ -29,14 +30,11 @@
|
|||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
- (NSString *)flattenHTML {
|
- (NSString *)flattenHTML {
|
||||||
NSString *xml = [NSString stringWithFormat:@"<d>%@</d>", self];
|
NSString *xml = [NSString stringWithFormat:@"<d>%@</d>", self];
|
||||||
NSXMLElement *xmlElement = [[[NSXMLElement alloc] initWithXMLString:xml error:nil] autorelease];
|
MGMXMLElement *xmlElement = [[[MGMXMLElement alloc] initWithXMLString:xml error:nil] autorelease];
|
||||||
return [xmlElement stringValue];
|
return [xmlElement stringValue];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
- (NSString *)replace:(NSString *)targetString with:(NSString *)replaceString {
|
- (NSString *)replace:(NSString *)targetString with:(NSString *)replaceString {
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSMutableString *temp = [NSMutableString new];
|
NSMutableString *temp = [NSMutableString new];
|
||||||
@ -1280,6 +1278,7 @@
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (NSString *)truncateForWidth:(double)theWidth attributes:(NSDictionary *)theAttributes {
|
- (NSString *)truncateForWidth:(double)theWidth attributes:(NSDictionary *)theAttributes {
|
||||||
NSString *endString = @"…";
|
NSString *endString = @"…";
|
||||||
NSString *truncatedString = self;
|
NSString *truncatedString = self;
|
||||||
@ -1299,8 +1298,8 @@
|
|||||||
|
|
||||||
return truncatedString;
|
return truncatedString;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !TARGET_OS_IPHONE
|
|
||||||
NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *context) {
|
NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *context) {
|
||||||
NSComparisonResult result = [[info1 objectForKey:MGMITime] compare:[info2 objectForKey:MGMITime]];
|
NSComparisonResult result = [[info1 objectForKey:MGMITime] compare:[info2 objectForKey:MGMITime]];
|
||||||
if (result==NSOrderedAscending) {
|
if (result==NSOrderedAscending) {
|
||||||
@ -1310,7 +1309,6 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
- (BOOL)isIPAddress {
|
- (BOOL)isIPAddress {
|
||||||
NSArray *components = [self componentsSeparatedByString:@"."];
|
NSArray *components = [self componentsSeparatedByString:@"."];
|
||||||
@ -1343,17 +1341,27 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont
|
|||||||
|
|
||||||
@implementation NSData (MGMAddons)
|
@implementation NSData (MGMAddons)
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
|
- (NSData *)resizeTo:(CGSize)theSize {
|
||||||
|
UIImage *image = [[UIImage alloc] initWithData:self];
|
||||||
#else
|
#else
|
||||||
- (NSData *)resizeTo:(NSSize)theSize {
|
- (NSData *)resizeTo:(NSSize)theSize {
|
||||||
NSImage *image = [[NSImage alloc] initWithData:self];
|
NSImage *image = [[NSImage alloc] initWithData:self];
|
||||||
|
#endif
|
||||||
if (image!=nil) {
|
if (image!=nil) {
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
CGSize size = [image size];
|
||||||
|
#else
|
||||||
NSSize size = [image size];
|
NSSize size = [image size];
|
||||||
|
#endif
|
||||||
float scaleFactor = 0.0;
|
float scaleFactor = 0.0;
|
||||||
float scaledWidth = theSize.width;
|
float scaledWidth = theSize.width;
|
||||||
float scaledHeight = theSize.height;
|
float scaledHeight = theSize.height;
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
if (!CGSizeEqualToSize(size, theSize)) {
|
||||||
|
#else
|
||||||
if (!NSEqualSizes(size, theSize)) {
|
if (!NSEqualSizes(size, theSize)) {
|
||||||
|
#endif
|
||||||
float widthFactor = theSize.width / size.width;
|
float widthFactor = theSize.width / size.width;
|
||||||
float heightFactor = theSize.height / size.height;
|
float heightFactor = theSize.height / size.height;
|
||||||
|
|
||||||
@ -1364,10 +1372,22 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont
|
|||||||
|
|
||||||
scaledWidth = size.width * scaleFactor;
|
scaledWidth = size.width * scaleFactor;
|
||||||
scaledHeight = size.height * scaleFactor;
|
scaledHeight = size.height * scaleFactor;
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
UIGraphicsBeginImageContext(CGSizeMake(scaledWidth, scaledHeight));
|
||||||
|
[image drawInRect:CGRectMake(0, 0, scaledWidth, scaledHeight)];
|
||||||
|
UIImage *newImage = [UIGraphicsGetImageFromCurrentImageContext() retain];
|
||||||
|
UIGraphicsEndImageContext();
|
||||||
|
[pool drain];
|
||||||
|
NSData *scaledData = UIImagePNGRepresentation(newImage);
|
||||||
|
[newImage release];
|
||||||
|
#else
|
||||||
NSImage *newImage = [[NSImage alloc] initWithSize:NSMakeSize(scaledWidth, scaledHeight)];
|
NSImage *newImage = [[NSImage alloc] initWithSize:NSMakeSize(scaledWidth, scaledHeight)];
|
||||||
|
|
||||||
[newImage lockFocus];
|
[newImage lockFocus];
|
||||||
NSGraphicsContext *graphicsContext = [NSGraphicsContext currentContext];
|
NSGraphicsContext *graphicsContext = [NSGraphicsContext currentContext];
|
||||||
[graphicsContext setImageInterpolation:NSImageInterpolationHigh];
|
[graphicsContext setImageInterpolation:NSImageInterpolationHigh];
|
||||||
@ -1376,10 +1396,14 @@ NSComparisonResult dateSort(NSDictionary *info1, NSDictionary *info2, void *cont
|
|||||||
[newImage unlockFocus];
|
[newImage unlockFocus];
|
||||||
NSData *scaledData = [newImage TIFFRepresentation];
|
NSData *scaledData = [newImage TIFFRepresentation];
|
||||||
[newImage release];
|
[newImage release];
|
||||||
|
#endif
|
||||||
[image release];
|
[image release];
|
||||||
return scaledData;
|
return scaledData;
|
||||||
}
|
}
|
||||||
return nil;
|
return nil;
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
}
|
||||||
|
#else
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@end
|
@end
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
||||||
#else
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#import "MGMInbox.h"
|
#import "MGMInbox.h"
|
||||||
#import "MGMInstance.h"
|
#import "MGMInstance.h"
|
||||||
#import "MGMAddons.h"
|
#import "MGMAddons.h"
|
||||||
|
#import "MGMXML.h"
|
||||||
#import <MGMUsers/MGMUsers.h>
|
#import <MGMUsers/MGMUsers.h>
|
||||||
|
|
||||||
NSString * const MGMIDelegate = @"delegate";
|
NSString * const MGMIDelegate = @"delegate";
|
||||||
@ -252,15 +253,15 @@ const BOOL MGMInboxInvisible = YES;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
- (void)requestDidFinish:(NSDictionary *)theInfo {
|
- (void)requestDidFinish:(NSDictionary *)theInfo {
|
||||||
NSXMLElement *XML = [[[[NSXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:NSXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
MGMXMLElement *XML = [(MGMXMLDocument *)[[[MGMXMLDocument alloc] initWithData:[theInfo objectForKey:MGMConnectionData] options:MGMXMLDocumentTidyXML error:nil] autorelease] rootElement];
|
||||||
NSDictionary *infoDic = [[[[XML elementsForName:@"json"] objectAtIndex:0] stringValue] parseJSON];
|
NSDictionary *infoDic = [[[[XML elementsForName:@"json"] objectAtIndex:0] stringValue] parseJSON];
|
||||||
NSDictionary *messagesInfo = [infoDic objectForKey:@"messages"];
|
NSDictionary *messagesInfo = [infoDic objectForKey:@"messages"];
|
||||||
NSArray *messagesInfoKeys = [messagesInfo allKeys];
|
NSArray *messagesInfoKeys = [messagesInfo allKeys];
|
||||||
NSXMLElement *html = [[[[NSXMLDocument alloc] initWithXMLString:[[[XML elementsForName:@"html"] objectAtIndex:0] stringValue] options:NSXMLDocumentTidyHTML error:nil] autorelease] rootElement];
|
MGMXMLElement *html = [(MGMXMLDocument *)[[[MGMXMLDocument alloc] initWithXMLString:[[[XML elementsForName:@"html"] objectAtIndex:0] stringValue] options:MGMXMLDocumentTidyHTML error:nil] autorelease] rootElement];
|
||||||
NSArray *messages = [(NSXMLElement *)[html childAtIndex:1] elementsForName:@"div"];
|
NSArray *messages = [(MGMXMLElement *)[html childAtIndex:0] elementsForName:@"div"];
|
||||||
NSMutableArray *info = [NSMutableArray array];
|
NSMutableArray *info = [NSMutableArray array];
|
||||||
for (unsigned int i=0; i<[messages count]; i++) {
|
for (unsigned int i=0; i<[messages count]; i++) {
|
||||||
NSXMLElement *message = [messages objectAtIndex:i];
|
MGMXMLElement *message = [messages objectAtIndex:i];
|
||||||
NSString *messageID = [[message attributeForName:MGMIID] stringValue];
|
NSString *messageID = [[message attributeForName:MGMIID] stringValue];
|
||||||
if (messageID) {
|
if (messageID) {
|
||||||
for (unsigned int m=0; m<[messagesInfoKeys count]; m++) {
|
for (unsigned int m=0; m<[messagesInfoKeys count]; m++) {
|
||||||
@ -291,7 +292,7 @@ const BOOL MGMInboxInvisible = YES;
|
|||||||
[messagesArray addObject:[self parseMessageWithHTML:messageString info:thisInfo]];
|
[messagesArray addObject:[self parseMessageWithHTML:messageString info:thisInfo]];
|
||||||
} else {
|
} else {
|
||||||
m++;
|
m++;
|
||||||
NSArray *moreMessages = [(NSXMLElement *)[messagesXML objectAtIndex:m] elementsForName:@"div"];
|
NSArray *moreMessages = [(MGMXMLElement *)[messagesXML objectAtIndex:m] elementsForName:@"div"];
|
||||||
for (unsigned int ms=0; ms<[moreMessages count]; ms++) {
|
for (unsigned int ms=0; ms<[moreMessages count]; ms++) {
|
||||||
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
NSString *messageString = [[moreMessages objectAtIndex:ms] XMLString];
|
NSString *messageString = [[moreMessages objectAtIndex:ms] XMLString];
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
#import <Foundation/Foundation.h>
|
#import <UIKit/UIKit.h>
|
||||||
#else
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#endif
|
#endif
|
||||||
@ -70,7 +70,6 @@ extern NSString * const MGMUCVoicemail;
|
|||||||
|
|
||||||
int webLoginTries;
|
int webLoginTries;
|
||||||
BOOL loggedIn;
|
BOOL loggedIn;
|
||||||
NSString *GALX;
|
|
||||||
|
|
||||||
NSString *XPCURL;
|
NSString *XPCURL;
|
||||||
NSString *XPCCD;
|
NSString *XPCCD;
|
||||||
@ -113,7 +112,6 @@ extern NSString * const MGMUCVoicemail;
|
|||||||
- (NSArray *)userPhoneNumbers;
|
- (NSArray *)userPhoneNumbers;
|
||||||
- (NSDictionary *)unreadCounts;
|
- (NSDictionary *)unreadCounts;
|
||||||
|
|
||||||
- (void)login;
|
|
||||||
- (BOOL)isLoggedIn;
|
- (BOOL)isLoggedIn;
|
||||||
- (void)checkTimer;
|
- (void)checkTimer;
|
||||||
- (void)creditTimer;
|
- (void)creditTimer;
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
NSString * const MGMVoiceBaseCopyright = @"Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/";
|
NSString * const MGMVoiceBaseCopyright = @"Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/";
|
||||||
|
|
||||||
NSString * const MGMVoiceIndexURL = @"https://www.google.com/voice/#inbox";
|
NSString * const MGMVoiceIndexURL = @"https://www.google.com/voice/#inbox";
|
||||||
NSString * const MGMLoginURL = @"https://www.google.com/accounts/ServiceLoginAuth?service=grandcentral";
|
NSString * const MGMLoginURL = @"https://www.google.com/accounts/ServiceLoginAuth";
|
||||||
NSString * const MGMLoginBody = @"ltmpl=bluebar&continue=https://www.google.com/voice/account/signin&GALX=%@&Email=%@&Passwd=%@&PersistentCookie=yes&rmShown=1";
|
|
||||||
NSString * const MGMXPCPath = @"/voice/xpc/?xpc=%7B%22cn%22%3A%22i70avDIMsA%22%2C%22tp%22%3Anull%2C%22pru%22%3A%22https%3A%2F%2Fwww.google.com%2Fvoice%2Fxpc%2Frelay%22%2C%22ppu%22%3A%22https%3A%2F%2Fwww.google.com%2Fvoice%2Fxpc%2Fblank%2F%22%2C%22lpu%22%3A%22https%3A%2F%2Fclients4.google.com%2Fvoice%2Fxpc%2Fblank%2F%22%7D";
|
NSString * const MGMXPCPath = @"/voice/xpc/?xpc=%7B%22cn%22%3A%22i70avDIMsA%22%2C%22tp%22%3Anull%2C%22pru%22%3A%22https%3A%2F%2Fwww.google.com%2Fvoice%2Fxpc%2Frelay%22%2C%22ppu%22%3A%22https%3A%2F%2Fwww.google.com%2Fvoice%2Fxpc%2Fblank%2F%22%2C%22lpu%22%3A%22https%3A%2F%2Fclients4.google.com%2Fvoice%2Fxpc%2Fblank%2F%22%7D";
|
||||||
NSString * const MGMCheckPath = @"/voice/xpc/checkMessages?r=%@";
|
NSString * const MGMCheckPath = @"/voice/xpc/checkMessages?r=%@";
|
||||||
NSString * const MGMCreditURL = @"https://www.google.com/voice/settings/billingcredit/";
|
NSString * const MGMCreditURL = @"https://www.google.com/voice/settings/billingcredit/";
|
||||||
@ -88,8 +87,6 @@ const BOOL MGMInstanceInvisible = YES;
|
|||||||
[inbox release];
|
[inbox release];
|
||||||
if (contacts!=nil)
|
if (contacts!=nil)
|
||||||
[contacts release];
|
[contacts release];
|
||||||
if (GALX!=nil)
|
|
||||||
[GALX release];
|
|
||||||
if (XPCURL!=nil)
|
if (XPCURL!=nil)
|
||||||
[XPCURL release];
|
[XPCURL release];
|
||||||
if (XPCCD!=nil)
|
if (XPCCD!=nil)
|
||||||
@ -210,7 +207,36 @@ const BOOL MGMInstanceInvisible = YES;
|
|||||||
}
|
}
|
||||||
- (void)indexDidFinish:(NSDictionary *)theInfo {
|
- (void)indexDidFinish:(NSDictionary *)theInfo {
|
||||||
NSString *returnedString = [[[NSString alloc] initWithData:[theInfo objectForKey:MGMConnectionData] encoding:NSUTF8StringEncoding] autorelease];
|
NSString *returnedString = [[[NSString alloc] initWithData:[theInfo objectForKey:MGMConnectionData] encoding:NSUTF8StringEncoding] autorelease];
|
||||||
if ([returnedString containsString:@"<div id=\"gaia_loginbox\">"]) {
|
if ([returnedString containsString:@"<title>Redirecting</title>"]) {
|
||||||
|
NSRange range;
|
||||||
|
NSString *redirectURL = MGMVoiceIndexURL;
|
||||||
|
range = [returnedString rangeOfString:@"http-equiv="];
|
||||||
|
if (range.location!=NSNotFound) {
|
||||||
|
NSString *string = [returnedString substringFromIndex:range.location + range.length];
|
||||||
|
range = [string rangeOfString:@"url="];
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
NSLog(@"failed 683476");
|
||||||
|
} else {
|
||||||
|
string = [string substringFromIndex:range.location + range.length];
|
||||||
|
range = [string rangeOfString:@"\""];
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
range = [string rangeOfString:@"'"];
|
||||||
|
}
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
NSLog(@"failed 683476");
|
||||||
|
} else {
|
||||||
|
string = [string substringWithRange:NSMakeRange(0, range.location)];
|
||||||
|
string = [string flattenHTML];
|
||||||
|
string = [string replace:@"\"" with:@""];
|
||||||
|
string = [string replace:@"'" with:@""];
|
||||||
|
//string = [string stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
redirectURL = [string replace:@"&amp;" with:@"&"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//NSLog(@"Redirecting to %@", redirectURL);
|
||||||
|
[connectionManager connectionWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:redirectURL]] delegate:self didFailWithError:@selector(index:didFailWithError:) didFinish:@selector(indexDidFinish:) invisible:MGMInstanceInvisible object:nil];
|
||||||
|
} else if ([returnedString containsString:@"<div id=\"gaia_loginbox\">"]) {
|
||||||
if (webLoginTries>2) {
|
if (webLoginTries>2) {
|
||||||
NSError *error = [NSError errorWithDomain:@"com.MrGeckosMedia.MGMInstance.Login" code:1 userInfo:[NSDictionary dictionaryWithObject:@"Unable to login. Please check your Credentials." forKey:NSLocalizedDescriptionKey]];
|
NSError *error = [NSError errorWithDomain:@"com.MrGeckosMedia.MGMInstance.Login" code:1 userInfo:[NSDictionary dictionaryWithObject:@"Unable to login. Please check your Credentials." forKey:NSLocalizedDescriptionKey]];
|
||||||
if ([delegate respondsToSelector:@selector(loginError:)]) {
|
if ([delegate respondsToSelector:@selector(loginError:)]) {
|
||||||
@ -220,19 +246,68 @@ const BOOL MGMInstanceInvisible = YES;
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSRange range = [returnedString rangeOfString:@"name=\"GALX\""];
|
webLoginTries++;
|
||||||
if (range.location!=NSNotFound) {
|
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:MGMLoginURL]];
|
||||||
NSString *string = [returnedString substringFromIndex:range.location+range.length];
|
[request setHTTPMethod:MGMPostMethod];
|
||||||
|
[request setValue:MGMURLForm forHTTPHeaderField:MGMContentType];
|
||||||
range = [string rangeOfString:@"value=\""];
|
NSMutableDictionary *parameters = [NSMutableDictionary dictionary];
|
||||||
if (range.location==NSNotFound) NSLog(@"failed 243");
|
[parameters setObject:(webLoginTries==2 ? [[user settingForKey:MGMUserName] stringByAppendingString:@"@gmail.com"] : [user settingForKey:MGMUserName]) forKey:@"Email"];
|
||||||
string = [string substringFromIndex:range.location+range.length];
|
[parameters setObject:[user password] forKey:@"Passwd"];
|
||||||
range = [string rangeOfString:@"\" />"];
|
[parameters setObject:@"yes" forKey:@"PersistentCookie"];
|
||||||
if (range.location==NSNotFound) NSLog(@"failed 532");
|
NSString *nameValue = @"name=\"%@\"";
|
||||||
if (GALX!=nil) [GALX release];
|
NSString *valueStart = @"value=\"";
|
||||||
GALX = [[string substringWithRange:NSMakeRange(0, range.location)] copy];
|
NSString *valueEnd = @"\"";
|
||||||
|
NSString *valueStartQ = @"value='";
|
||||||
|
NSString *valueEndQ = @"'";
|
||||||
|
NSArray *names = [NSArray arrayWithObjects:@"ltmpl", @"continue", @"followup", @"service", @"dsh", @"GALX", @"rmShown", nil];
|
||||||
|
for (int i=0; i<[names count]; i++) {
|
||||||
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];
|
||||||
|
NSString *nameString = [NSString stringWithFormat:nameValue, [names objectAtIndex:i]];
|
||||||
|
NSRange range = [returnedString rangeOfString:nameString];
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
nameString = [nameString replace:@"\"" with:@"'"];
|
||||||
|
range = [returnedString rangeOfString:nameString];
|
||||||
|
}
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
NSLog(@"Unable to find %@", [names objectAtIndex:i]);
|
||||||
|
} else {
|
||||||
|
NSString *string = [returnedString substringFromIndex:range.location+range.length];
|
||||||
|
range = [string rangeOfString:valueStart];
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
range = [string rangeOfString:valueStartQ];
|
||||||
|
if (range.location==NSNotFound) {
|
||||||
|
NSLog(@"Unable to find value for %@", [names objectAtIndex:i]);
|
||||||
|
[pool drain];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
string = [string substringFromIndex:range.location+range.length];
|
||||||
|
range = [string rangeOfString:valueEndQ];
|
||||||
|
} else {
|
||||||
|
string = [string substringFromIndex:range.location+range.length];
|
||||||
|
range = [string rangeOfString:valueEnd];
|
||||||
|
}
|
||||||
|
if (range.location==NSNotFound) NSLog(@"failed 532");
|
||||||
|
[parameters setObject:[[[string substringWithRange:NSMakeRange(0, range.location)] copy] autorelease] forKey:[names objectAtIndex:i]];
|
||||||
|
}
|
||||||
|
[pool drain];
|
||||||
}
|
}
|
||||||
[self login];
|
|
||||||
|
#if MGMInstanceDebug
|
||||||
|
NSMutableDictionary *parametersDebug = [[parameters mutableCopy] autorelease];
|
||||||
|
[parametersDebug removeObjectForKey:@"Passwd"];
|
||||||
|
NSLog(@"%@", parametersDebug);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
NSArray *parametersKeys = [parameters allKeys];
|
||||||
|
NSMutableString *bodyString = [NSMutableString string];
|
||||||
|
for (int i=0; i<[parametersKeys count]; i++) {
|
||||||
|
if (i!=0)
|
||||||
|
[bodyString appendString:@"&"];
|
||||||
|
[bodyString appendFormat:@"%@=%@", [[parametersKeys objectAtIndex:i] addPercentEscapes], [[parameters objectForKey:[parametersKeys objectAtIndex:i]] addPercentEscapes]];
|
||||||
|
}
|
||||||
|
|
||||||
|
[request setHTTPBody:[bodyString dataUsingEncoding:NSUTF8StringEncoding]];
|
||||||
|
[connectionManager connectionWithRequest:request delegate:self didFailWithError:@selector(index:didFailWithError:) didFinish:@selector(indexDidFinish:) invisible:MGMInstanceInvisible object:nil];
|
||||||
} else {
|
} else {
|
||||||
NSString *string, *guser = @"", *phonesInfo = @"";
|
NSString *string, *guser = @"", *phonesInfo = @"";
|
||||||
NSRange range;
|
NSRange range;
|
||||||
@ -416,14 +491,6 @@ const BOOL MGMInstanceInvisible = YES;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- (void)login {
|
|
||||||
webLoginTries++;
|
|
||||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:MGMLoginURL]];
|
|
||||||
[request setHTTPMethod:MGMPostMethod];
|
|
||||||
[request setValue:MGMURLForm forHTTPHeaderField:MGMContentType];
|
|
||||||
[request setHTTPBody:[[NSString stringWithFormat:MGMLoginBody, GALX, [(webLoginTries==2 ? [[user settingForKey:MGMUserName] stringByAppendingString:@"@gmail.com"] : [user settingForKey:MGMUserName]) addPercentEscapes], [[user password] addPercentEscapes]] dataUsingEncoding:NSUTF8StringEncoding]];
|
|
||||||
[connectionManager connectionWithRequest:request delegate:self didFailWithError:@selector(index:didFailWithError:) didFinish:@selector(indexDidFinish:) invisible:MGMInstanceInvisible object:nil];
|
|
||||||
}
|
|
||||||
- (BOOL)isLoggedIn {
|
- (BOOL)isLoggedIn {
|
||||||
return loggedIn;
|
return loggedIn;
|
||||||
}
|
}
|
||||||
|
50
Classes/VoiceBase/MGMSound.h
Normal file
50
Classes/VoiceBase/MGMSound.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
//
|
||||||
|
// MGMSound.h
|
||||||
|
// VoiceBase
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/23/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <AVFoundation/AVFoundation.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@class MGMSound;
|
||||||
|
|
||||||
|
@protocol MGMSoundDelegate <NSObject>
|
||||||
|
- (void)soundDidFinishPlaying:(MGMSound *)theSound;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface MGMSound : NSObject
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
<AVAudioPlayerDelegate>
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
AVAudioPlayer *sound;
|
||||||
|
#else
|
||||||
|
NSSound *sound;
|
||||||
|
#endif
|
||||||
|
id<MGMSoundDelegate> delegate;
|
||||||
|
|
||||||
|
BOOL loops;
|
||||||
|
}
|
||||||
|
- (id)initWithContentsOfFile:(NSString *)theFile;
|
||||||
|
- (id)initWithContentsOfURL:(NSURL *)theURL;
|
||||||
|
- (id)initWithData:(NSData *)theData;
|
||||||
|
|
||||||
|
- (void)setDelegate:(id)theDelegate;
|
||||||
|
- (id<MGMSoundDelegate>)delegate;
|
||||||
|
|
||||||
|
- (void)setLoops:(BOOL)shouldLoop;
|
||||||
|
- (BOOL)loops;
|
||||||
|
|
||||||
|
- (void)play;
|
||||||
|
- (void)pause;
|
||||||
|
- (void)stop;
|
||||||
|
- (BOOL)isPlaying;
|
||||||
|
@end
|
99
Classes/VoiceBase/MGMSound.m
Normal file
99
Classes/VoiceBase/MGMSound.m
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
//
|
||||||
|
// MGMSound.m
|
||||||
|
// VoiceBase
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/23/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMSound.h"
|
||||||
|
|
||||||
|
@implementation MGMSound
|
||||||
|
- (id)init {
|
||||||
|
if (self = [super init]) {
|
||||||
|
loops = NO;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (id)initWithContentsOfFile:(NSString *)theFile {
|
||||||
|
return [self initWithContentsOfURL:[NSURL fileURLWithPath:theFile]];
|
||||||
|
}
|
||||||
|
- (id)initWithContentsOfURL:(NSURL *)theURL {
|
||||||
|
if (self = [self init]) {
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
sound = [[AVAudioPlayer alloc] initWithContentsOfURL:theURL error:nil];
|
||||||
|
#else
|
||||||
|
sound = [[NSSound alloc] initWithContentsOfURL:theURL byReference:YES];
|
||||||
|
#endif
|
||||||
|
[sound setDelegate:self];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (id)initWithData:(NSData *)theData {
|
||||||
|
if (self = [self init]) {
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
sound = [[AVAudioPlayer alloc] initWithData:theData error:nil];
|
||||||
|
#else
|
||||||
|
sound = [[NSSound alloc] initWithData:theData];
|
||||||
|
#endif
|
||||||
|
[sound setDelegate:self];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (void)dealloc {
|
||||||
|
if (sound!=nil) {
|
||||||
|
[sound stop];
|
||||||
|
[sound release];
|
||||||
|
}
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setDelegate:(id)theDelegate {
|
||||||
|
delegate = theDelegate;
|
||||||
|
}
|
||||||
|
- (id<MGMSoundDelegate>)delegate {
|
||||||
|
return delegate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag {
|
||||||
|
if (loops) {
|
||||||
|
[sound stop];
|
||||||
|
[sound play];
|
||||||
|
} else {
|
||||||
|
if (delegate!=nil && [delegate respondsToSelector:@selector(soundDidFinishPlaying:)]) [delegate soundDidFinishPlaying:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
- (void)sound:(NSSound *)theSound didFinishPlaying:(BOOL)finishedPlaying {
|
||||||
|
if (finishedPlaying) {
|
||||||
|
if (loops) {
|
||||||
|
[sound stop];
|
||||||
|
[sound play];
|
||||||
|
} else {
|
||||||
|
if (delegate!=nil && [delegate respondsToSelector:@selector(soundDidFinishPlaying:)]) [delegate soundDidFinishPlaying:self];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
- (void)setLoops:(BOOL)shouldLoop {
|
||||||
|
loops = shouldLoop;
|
||||||
|
}
|
||||||
|
- (BOOL)loops {
|
||||||
|
return loops;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)play {
|
||||||
|
[sound play];
|
||||||
|
}
|
||||||
|
- (void)pause {
|
||||||
|
[sound pause];
|
||||||
|
}
|
||||||
|
- (void)stop {
|
||||||
|
[sound stop];
|
||||||
|
}
|
||||||
|
- (BOOL)isPlaying {
|
||||||
|
return [sound isPlaying];
|
||||||
|
}
|
||||||
|
@end
|
@ -6,10 +6,16 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MGMThemeManagerDebug 0
|
#define MGMThemeManagerDebug 0
|
||||||
|
|
||||||
|
@class MGMSound;
|
||||||
|
|
||||||
extern NSString * const MGMTThemeChangedNotification;
|
extern NSString * const MGMTThemeChangedNotification;
|
||||||
extern NSString * const MGMTUpdatedSMSThemeNotification;
|
extern NSString * const MGMTUpdatedSMSThemeNotification;
|
||||||
|
|
||||||
@ -81,7 +87,7 @@ extern NSString * const MGMM4AExt;
|
|||||||
- (NSString *)currentSoundPath:(NSString *)theSoundName;
|
- (NSString *)currentSoundPath:(NSString *)theSoundName;
|
||||||
- (NSString *)nameOfSound:(NSString *)theSoundName;
|
- (NSString *)nameOfSound:(NSString *)theSoundName;
|
||||||
- (BOOL)setSound:(NSString *)theSoundName withPath:(NSString *)thePath;
|
- (BOOL)setSound:(NSString *)theSoundName withPath:(NSString *)thePath;
|
||||||
- (NSSound *)playSound:(NSString *)theSoundName;
|
- (MGMSound *)playSound:(NSString *)theSoundName;
|
||||||
|
|
||||||
- (NSString *)themesFolderPath;
|
- (NSString *)themesFolderPath;
|
||||||
- (BOOL)setupCurrentTheme;
|
- (BOOL)setupCurrentTheme;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#import "MGMThemeManager.h"
|
#import "MGMThemeManager.h"
|
||||||
#import "MGMInbox.h"
|
#import "MGMInbox.h"
|
||||||
#import "MGMAddons.h"
|
#import "MGMAddons.h"
|
||||||
|
#import "MGMSound.h"
|
||||||
#import <MGMUsers/MGMUsers.h>
|
#import <MGMUsers/MGMUsers.h>
|
||||||
|
|
||||||
NSString * const MGMTThemeChangedNotification = @"MGMTThemeChangedNotification";
|
NSString * const MGMTThemeChangedNotification = @"MGMTThemeChangedNotification";
|
||||||
@ -159,9 +160,11 @@ NSString * const MGMM4AExt = @"m4a";
|
|||||||
NSString *supportPath = [[MGMUser applicationSupportPath] stringByAppendingPathComponent:MGMTSoundsFolder];
|
NSString *supportPath = [[MGMUser applicationSupportPath] stringByAppendingPathComponent:MGMTSoundsFolder];
|
||||||
NSFileManager<NSFileManagerProtocol> *manager = [NSFileManager defaultManager];
|
NSFileManager<NSFileManagerProtocol> *manager = [NSFileManager defaultManager];
|
||||||
if (![manager fileExistsAtPath:supportPath]) {
|
if (![manager fileExistsAtPath:supportPath]) {
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
if ([manager respondsToSelector:@selector(createDirectoryAtPath:attributes:)])
|
if ([manager respondsToSelector:@selector(createDirectoryAtPath:attributes:)])
|
||||||
[manager createDirectoryAtPath:supportPath attributes:nil];
|
[manager createDirectoryAtPath:supportPath attributes:nil];
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
[manager createDirectoryAtPath:supportPath withIntermediateDirectories:YES attributes:nil error:nil];
|
[manager createDirectoryAtPath:supportPath withIntermediateDirectories:YES attributes:nil error:nil];
|
||||||
}
|
}
|
||||||
return supportPath;
|
return supportPath;
|
||||||
@ -293,29 +296,30 @@ NSString * const MGMM4AExt = @"m4a";
|
|||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MGMTSoundChangedNotification object:theSoundName];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MGMTSoundChangedNotification object:theSoundName];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
- (NSSound *)playSound:(NSString *)theSoundName {
|
- (MGMSound *)playSound:(NSString *)theSoundName {
|
||||||
NSSound *sound = nil;
|
MGMSound *sound = nil;
|
||||||
NSFileManager *manager = [NSFileManager defaultManager];
|
NSFileManager *manager = [NSFileManager defaultManager];
|
||||||
NSString *path = [self currentSoundPath:theSoundName];
|
NSString *path = [self currentSoundPath:theSoundName];
|
||||||
if ([manager fileExistsAtPath:path]) {
|
if ([manager fileExistsAtPath:path]) {
|
||||||
sound = [[NSSound alloc] initWithContentsOfFile:path byReference:YES];
|
sound = [[MGMSound alloc] initWithContentsOfFile:path];
|
||||||
[sound setDelegate:self];
|
[sound setDelegate:self];
|
||||||
[sound play];
|
[sound performSelectorOnMainThread:@selector(play) withObject:nil waitUntilDone:NO];
|
||||||
}
|
}
|
||||||
return sound;
|
return sound;
|
||||||
}
|
}
|
||||||
- (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)finishedPlaying {
|
- (void)soundDidFinishPlaying:(MGMSound *)theSound {
|
||||||
if (finishedPlaying)
|
[theSound release];
|
||||||
[sound release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)themesFolderPath {
|
- (NSString *)themesFolderPath {
|
||||||
NSString *supportPath = [[MGMUser applicationSupportPath] stringByAppendingPathComponent:MGMTThemeFolder];
|
NSString *supportPath = [[MGMUser applicationSupportPath] stringByAppendingPathComponent:MGMTThemeFolder];
|
||||||
NSFileManager<NSFileManagerProtocol> *manager = [NSFileManager defaultManager];
|
NSFileManager<NSFileManagerProtocol> *manager = [NSFileManager defaultManager];
|
||||||
if (![manager fileExistsAtPath:supportPath]) {
|
if (![manager fileExistsAtPath:supportPath]) {
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
if ([manager respondsToSelector:@selector(createDirectoryAtPath:attributes:)])
|
if ([manager respondsToSelector:@selector(createDirectoryAtPath:attributes:)])
|
||||||
[manager createDirectoryAtPath:supportPath attributes:nil];
|
[manager createDirectoryAtPath:supportPath attributes:nil];
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
[manager createDirectoryAtPath:supportPath withIntermediateDirectories:YES attributes:nil error:nil];
|
[manager createDirectoryAtPath:supportPath withIntermediateDirectories:YES attributes:nil error:nil];
|
||||||
}
|
}
|
||||||
return supportPath;
|
return supportPath;
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if MGMSIPENABLED
|
#if MGMSIPENABLED
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
#import <pjsua-lib/pjsua.h>
|
#import <pjsua-lib/pjsua.h>
|
||||||
#import <SystemConfiguration/SystemConfiguration.h>
|
#import <SystemConfiguration/SystemConfiguration.h>
|
||||||
|
|
||||||
@ -97,7 +101,9 @@ typedef enum {
|
|||||||
|
|
||||||
NSMutableArray *accounts;
|
NSMutableArray *accounts;
|
||||||
NSMutableArray *restartAccounts;
|
NSMutableArray *restartAccounts;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
NSArray *audioDevices;
|
NSArray *audioDevices;
|
||||||
|
#endif
|
||||||
|
|
||||||
int ringbackCount;
|
int ringbackCount;
|
||||||
|
|
||||||
@ -143,10 +149,12 @@ typedef enum {
|
|||||||
- (float)micVolume;
|
- (float)micVolume;
|
||||||
- (void)setMicVolume:(float)theVolume;
|
- (void)setMicVolume:(float)theVolume;
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (BOOL)setInputSoundDevice:(int)theInputDevice outputSoundDevice:(int)theOutputDevice;
|
- (BOOL)setInputSoundDevice:(int)theInputDevice outputSoundDevice:(int)theOutputDevice;
|
||||||
- (BOOL)stopSound;
|
- (BOOL)stopSound;
|
||||||
- (void)updateAudioDevices;
|
- (void)updateAudioDevices;
|
||||||
- (NSArray *)audioDevices;
|
- (NSArray *)audioDevices;
|
||||||
|
#endif
|
||||||
|
|
||||||
- (void)receivedNewCall:(MGMSIPCall *)theCall;
|
- (void)receivedNewCall:(MGMSIPCall *)theCall;
|
||||||
- (void)startingNewCall:(MGMSIPCall *)theCall;
|
- (void)startingNewCall:(MGMSIPCall *)theCall;
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
#import "MGMSIPCall.h"
|
#import "MGMSIPCall.h"
|
||||||
#import "MGMAddons.h"
|
#import "MGMAddons.h"
|
||||||
#import <SystemConfiguration/SystemConfiguration.h>
|
#import <SystemConfiguration/SystemConfiguration.h>
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
#import <CoreAudio/CoreAudio.h>
|
#import <CoreAudio/CoreAudio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
NSString * const MGMSIPCopyright = @"Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/";
|
NSString * const MGMSIPCopyright = @"Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/";
|
||||||
|
|
||||||
@ -206,6 +208,7 @@ static void MGMSIPDetectedNAT(const pj_stun_nat_detect_result *result) {
|
|||||||
[pool drain];
|
[pool drain];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
static void MGMNetworkNotification(SCDynamicStoreRef store, NSArray *changedKeys, void *info) {
|
static void MGMNetworkNotification(SCDynamicStoreRef store, NSArray *changedKeys, void *info) {
|
||||||
for (int i=0; i<[changedKeys count]; ++i) {
|
for (int i=0; i<[changedKeys count]; ++i) {
|
||||||
NSString *key = [changedKeys objectAtIndex:i];
|
NSString *key = [changedKeys objectAtIndex:i];
|
||||||
@ -228,6 +231,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
[pool drain];
|
[pool drain];
|
||||||
return noErr;
|
return noErr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface MGMSIP (MGMPrivate)
|
@interface MGMSIP (MGMPrivate)
|
||||||
|
|
||||||
@ -249,6 +253,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
accounts = [NSMutableArray new];
|
accounts = [NSMutableArray new];
|
||||||
shouldRestart = NO;
|
shouldRestart = NO;
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
store = SCDynamicStoreCreate(kCFAllocatorDefault, CFBundleGetIdentifier(CFBundleGetMainBundle()), (SCDynamicStoreCallBack)MGMNetworkNotification, NULL);
|
store = SCDynamicStoreCreate(kCFAllocatorDefault, CFBundleGetIdentifier(CFBundleGetMainBundle()), (SCDynamicStoreCallBack)MGMNetworkNotification, NULL);
|
||||||
if (!store) {
|
if (!store) {
|
||||||
NSLog(@"Unable to create store for system configuration %s", SCErrorString(SCError()));
|
NSLog(@"Unable to create store for system configuration %s", SCErrorString(SCError()));
|
||||||
@ -264,6 +269,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
CFRelease(storeRunLoop);
|
CFRelease(storeRunLoop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -359,8 +365,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
[pool drain];
|
[pool drain];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pj_thread_desc PJThreadDesc;
|
|
||||||
[self registerThread:&PJThreadDesc];
|
|
||||||
|
|
||||||
PJPool = pjsua_pool_create("MGMSIP-pjsua", 1000, 1000);
|
PJPool = pjsua_pool_create("MGMSIP-pjsua", 1000, 1000);
|
||||||
|
|
||||||
@ -393,6 +397,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
|
|
||||||
sipConfig.max_calls = MGMSIPMaxCalls;
|
sipConfig.max_calls = MGMSIPMaxCalls;
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
if ([defaults boolForKey:MGMSIPNameServersEnabled]) {
|
if ([defaults boolForKey:MGMSIPNameServersEnabled]) {
|
||||||
SCDynamicStoreRef dynamicStore = SCDynamicStoreCreate(NULL, CFBundleGetIdentifier(CFBundleGetMainBundle()), NULL, NULL);
|
SCDynamicStoreRef dynamicStore = SCDynamicStoreCreate(NULL, CFBundleGetIdentifier(CFBundleGetMainBundle()), NULL, NULL);
|
||||||
CFPropertyListRef DNSSettings = SCDynamicStoreCopyValue(dynamicStore, CFSTR("State:/Network/Global/DNS"));
|
CFPropertyListRef DNSSettings = SCDynamicStoreCopyValue(dynamicStore, CFSTR("State:/Network/Global/DNS"));
|
||||||
@ -409,6 +414,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
sipConfig.nameserver[i] = [[nameServers objectAtIndex:i] PJString];
|
sipConfig.nameserver[i] = [[nameServers objectAtIndex:i] PJString];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if ([defaults objectForKey:MGMSIPOutboundProxy]!=nil && ![[defaults objectForKey:MGMSIPOutboundProxy] isEqual:@""]) {
|
if ([defaults objectForKey:MGMSIPOutboundProxy]!=nil && ![[defaults objectForKey:MGMSIPOutboundProxy] isEqual:@""]) {
|
||||||
sipConfig.outbound_proxy_cnt = 1;
|
sipConfig.outbound_proxy_cnt = 1;
|
||||||
@ -428,7 +434,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
status = pjsua_init(&sipConfig, &loggingConfig, &mediaConfig);
|
status = pjsua_init(&sipConfig, &loggingConfig, &mediaConfig);
|
||||||
if (status!=PJ_SUCCESS) {
|
if (status!=PJ_SUCCESS) {
|
||||||
NSLog(@"Error initializing PJSUA");
|
NSLog(@"Error initializing PJSUA");
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[self stop];
|
[self stop];
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
@ -440,7 +445,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
status = pjmedia_tonegen_create2(PJPool, &name, mediaConfig.clock_rate, mediaConfig.channel_count, samplesPerFrame, 16, PJMEDIA_TONEGEN_LOOP, &ringbackPort);
|
status = pjmedia_tonegen_create2(PJPool, &name, mediaConfig.clock_rate, mediaConfig.channel_count, samplesPerFrame, 16, PJMEDIA_TONEGEN_LOOP, &ringbackPort);
|
||||||
if (status!=PJ_SUCCESS) {
|
if (status!=PJ_SUCCESS) {
|
||||||
NSLog(@"Error creating ringback tones");
|
NSLog(@"Error creating ringback tones");
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[self stop];
|
[self stop];
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
@ -459,7 +463,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
status = pjsua_conf_add_port(PJPool, ringbackPort, &ringbackSlot);
|
status = pjsua_conf_add_port(PJPool, ringbackPort, &ringbackSlot);
|
||||||
if (status!=PJ_SUCCESS) {
|
if (status!=PJ_SUCCESS) {
|
||||||
NSLog(@"Error adding ringback tone");
|
NSLog(@"Error adding ringback tone");
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[self stop];
|
[self stop];
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
@ -474,7 +477,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &transportConfig, &UDPTransport);
|
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &transportConfig, &UDPTransport);
|
||||||
if (status!=PJ_SUCCESS) {
|
if (status!=PJ_SUCCESS) {
|
||||||
NSLog(@"Error creating transport");
|
NSLog(@"Error creating transport");
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[self stop];
|
[self stop];
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
@ -497,7 +499,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
status = pjsua_start();
|
status = pjsua_start();
|
||||||
if (status!=PJ_SUCCESS) {
|
if (status!=PJ_SUCCESS) {
|
||||||
NSLog(@"Error starting PJSUA");
|
NSLog(@"Error starting PJSUA");
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[self stop];
|
[self stop];
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
@ -508,10 +509,12 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
|
|
||||||
pjsua_conf_adjust_tx_level(0, [defaults floatForKey:MGMSIPVolume]);
|
pjsua_conf_adjust_tx_level(0, [defaults floatForKey:MGMSIPVolume]);
|
||||||
pjsua_conf_adjust_rx_level(0, [defaults floatForKey:MGMSIPMicVolume]);
|
pjsua_conf_adjust_rx_level(0, [defaults floatForKey:MGMSIPMicVolume]);
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDevices, &MGMAudioDevicesChanged, self);
|
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDevices, &MGMAudioDevicesChanged, self);
|
||||||
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDefaultInputDevice, &MGMAudioDevicesChanged, self);
|
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDefaultInputDevice, &MGMAudioDevicesChanged, self);
|
||||||
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDefaultOutputDevice, &MGMAudioDevicesChanged, self);
|
AudioHardwareAddPropertyListener(kAudioHardwarePropertyDefaultOutputDevice, &MGMAudioDevicesChanged, self);
|
||||||
[self updateAudioDevices];
|
[self updateAudioDevices];
|
||||||
|
#endif
|
||||||
|
|
||||||
[accounts makeObjectsPerformSelector:@selector(login)];
|
[accounts makeObjectsPerformSelector:@selector(login)];
|
||||||
|
|
||||||
@ -519,7 +522,6 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
|
|
||||||
NSLog(@"MGMSIP Started");
|
NSLog(@"MGMSIP Started");
|
||||||
|
|
||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
|
||||||
[lock unlock];
|
[lock unlock];
|
||||||
[pool drain];
|
[pool drain];
|
||||||
}
|
}
|
||||||
@ -563,9 +565,11 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
|
|
||||||
state = MGMSIPStoppedState;
|
state = MGMSIPStoppedState;
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDevices, &MGMAudioDevicesChanged);
|
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDevices, &MGMAudioDevicesChanged);
|
||||||
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDefaultInputDevice, &MGMAudioDevicesChanged);
|
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDefaultInputDevice, &MGMAudioDevicesChanged);
|
||||||
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDefaultOutputDevice, &MGMAudioDevicesChanged);
|
AudioHardwareRemovePropertyListener(kAudioHardwarePropertyDefaultOutputDevice, &MGMAudioDevicesChanged);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (delegate!=nil && [delegate respondsToSelector:@selector(SIPStopped)]) [delegate SIPStopped];
|
if (delegate!=nil && [delegate respondsToSelector:@selector(SIPStopped)]) [delegate SIPStopped];
|
||||||
|
|
||||||
@ -767,6 +771,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
bzero(&PJThreadDesc, sizeof(pj_thread_desc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (BOOL)setInputSoundDevice:(int)theInputDevice outputSoundDevice:(int)theOutputDevice {
|
- (BOOL)setInputSoundDevice:(int)theInputDevice outputSoundDevice:(int)theOutputDevice {
|
||||||
if (state!=MGMSIPStartedState)
|
if (state!=MGMSIPStartedState)
|
||||||
return NO;
|
return NO;
|
||||||
@ -958,6 +963,7 @@ static OSStatus MGMAudioDevicesChanged(AudioHardwarePropertyID propertyID, void
|
|||||||
- (NSArray *)audioDevices {
|
- (NSArray *)audioDevices {
|
||||||
return audioDevices;
|
return audioDevices;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
- (void)receivedNewCall:(MGMSIPCall *)theCall {
|
- (void)receivedNewCall:(MGMSIPCall *)theCall {
|
||||||
if (delegate!=nil && [delegate respondsToSelector:@selector(receivedNewCall:)]) [delegate receivedNewCall:theCall];
|
if (delegate!=nil && [delegate respondsToSelector:@selector(receivedNewCall:)]) [delegate receivedNewCall:theCall];
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if MGMSIPENABLED
|
#if MGMSIPENABLED
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern NSString * const MGMSIPAccountFullName;
|
extern NSString * const MGMSIPAccountFullName;
|
||||||
extern NSString * const MGMSIPAccountUserName;
|
extern NSString * const MGMSIPAccountUserName;
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if MGMSIPENABLED
|
#if MGMSIPENABLED
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
#import <pjsua-lib/pjsua.h>
|
#import <pjsua-lib/pjsua.h>
|
||||||
|
|
||||||
@class MGMSIPCall, MGMSIPAccount, MGMSIPURL;
|
@class MGMSIPCall, MGMSIPAccount, MGMSIPURL;
|
||||||
|
@ -7,7 +7,11 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#if MGMSIPENABLED
|
#if MGMSIPENABLED
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface MGMSIPURL : NSObject {
|
@interface MGMSIPURL : NSObject {
|
||||||
NSString *fullName;
|
NSString *fullName;
|
||||||
|
@ -7,6 +7,24 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <MGMAddons.h>
|
||||||
|
#import <MGMInstance.h>
|
||||||
|
#import <MGMInbox.h>
|
||||||
|
#import <MGMContactsProtocol.h>
|
||||||
|
#import <MGMContacts.h>
|
||||||
|
#import <MGMAddressBook.h>
|
||||||
|
#import <MGMGoogleContacts.h>
|
||||||
|
#import <MGMSound.h>
|
||||||
|
#import <MGMThemeManager.h>
|
||||||
|
#import <MGMXML.h>
|
||||||
|
|
||||||
|
//MGMSIP Stuff
|
||||||
|
#import <MGMSIP.h>
|
||||||
|
#import <MGMSIPAccount.h>
|
||||||
|
#import <MGMSIPCall.h>
|
||||||
|
#import <MGMSIPURL.h>
|
||||||
|
#else
|
||||||
#import <VoiceBase/MGMAddons.h>
|
#import <VoiceBase/MGMAddons.h>
|
||||||
#import <VoiceBase/MGMInstance.h>
|
#import <VoiceBase/MGMInstance.h>
|
||||||
#import <VoiceBase/MGMInbox.h>
|
#import <VoiceBase/MGMInbox.h>
|
||||||
@ -14,10 +32,13 @@
|
|||||||
#import <VoiceBase/MGMContacts.h>
|
#import <VoiceBase/MGMContacts.h>
|
||||||
#import <VoiceBase/MGMAddressBook.h>
|
#import <VoiceBase/MGMAddressBook.h>
|
||||||
#import <VoiceBase/MGMGoogleContacts.h>
|
#import <VoiceBase/MGMGoogleContacts.h>
|
||||||
|
#import <VoiceBase/MGMSound.h>
|
||||||
#import <VoiceBase/MGMThemeManager.h>
|
#import <VoiceBase/MGMThemeManager.h>
|
||||||
|
#import <VoiceBase/MGMXML.h>
|
||||||
|
|
||||||
//MGMSIP Stuff
|
//MGMSIP Stuff
|
||||||
#import <VoiceBase/MGMSIP.h>
|
#import <VoiceBase/MGMSIP.h>
|
||||||
#import <VoiceBase/MGMSIPAccount.h>
|
#import <VoiceBase/MGMSIPAccount.h>
|
||||||
#import <VoiceBase/MGMSIPCall.h>
|
#import <VoiceBase/MGMSIPCall.h>
|
||||||
#import <VoiceBase/MGMSIPURL.h>
|
#import <VoiceBase/MGMSIPURL.h>
|
||||||
|
#endif
|
8
Classes/VoiceBase/VoiceBaseTouch_Prefix.pch
Normal file
8
Classes/VoiceBase/VoiceBaseTouch_Prefix.pch
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
//
|
||||||
|
// Prefix header for all source files of the 'MGMUsers' target in the 'MGMUsers' project.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef __OBJC__
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#endif
|
15
Classes/VoiceBase/XML/MGMXML.h
Normal file
15
Classes/VoiceBase/XML/MGMXML.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/*
|
||||||
|
* MGMXML.h
|
||||||
|
* MGMXML
|
||||||
|
*
|
||||||
|
* Created by Mr. Gecko on 9/22/10.
|
||||||
|
* Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <VoiceBase/MGMXMLNode.h>
|
||||||
|
#import <VoiceBase/MGMXMLElement.h>
|
||||||
|
#import <VoiceBase/MGMXMLDocument.h>
|
||||||
|
#import <VoiceBase/MGMXMLDTD.h>
|
||||||
|
#import <VoiceBase/MGMXMLDTDNode.h>
|
||||||
|
#import <VoiceBase/MGMXMLNodeOptions.h>
|
25
Classes/VoiceBase/XML/MGMXMLAddons.h
Normal file
25
Classes/VoiceBase/XML/MGMXMLAddons.h
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLAddons.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <libxml/parser.h>
|
||||||
|
#import <libxml/tree.h>
|
||||||
|
|
||||||
|
@interface NSValue (MGMXMLAddons)
|
||||||
|
+ (id)valueWithXMLError:(xmlErrorPtr)error;
|
||||||
|
- (xmlErrorPtr)xmlErrorValue;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface NSString (MGMXMLAddons)
|
||||||
|
+ (NSString *)stringWithXMLString:(const xmlChar *)xmlString;
|
||||||
|
- (const xmlChar *)xmlString;
|
||||||
|
@end
|
29
Classes/VoiceBase/XML/MGMXMLAddons.m
Normal file
29
Classes/VoiceBase/XML/MGMXMLAddons.m
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLAddons.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLAddons.h"
|
||||||
|
|
||||||
|
@implementation NSValue (MGMXMLAddons)
|
||||||
|
+ (id)valueWithXMLError:(xmlErrorPtr)error {
|
||||||
|
return [NSValue valueWithBytes:error objCType:@encode(xmlErrorPtr)];
|
||||||
|
}
|
||||||
|
- (xmlErrorPtr)xmlErrorValue {
|
||||||
|
xmlErrorPtr error;
|
||||||
|
[self getValue:&error];
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation NSString (MGMXMLAddons)
|
||||||
|
+ (NSString *)stringWithXMLString:(const xmlChar *)xmlString {
|
||||||
|
return [[[NSString alloc] initWithBytes:(const char *)xmlString length:strlen((const char *)xmlString) encoding:NSUTF8StringEncoding] autorelease];
|
||||||
|
}
|
||||||
|
- (const xmlChar *)xmlString {
|
||||||
|
return (const xmlChar *)[self UTF8String];
|
||||||
|
}
|
||||||
|
@end
|
38
Classes/VoiceBase/XML/MGMXMLDTD.h
Normal file
38
Classes/VoiceBase/XML/MGMXMLDTD.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDTD.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <VoiceBase/MGMXMLNode.h>
|
||||||
|
|
||||||
|
@interface MGMXMLDTD : MGMXMLNode {
|
||||||
|
|
||||||
|
}
|
||||||
|
//- (id)initWithContentsOfURL:(NSURL *)url options:(NSUInteger)mask error:(NSError **)error;
|
||||||
|
//- (id)initWithData:(NSData *)data options:(NSUInteger)mask error:(NSError **)error; //primitive
|
||||||
|
//- (void)setPublicID:(NSString *)publicID; //primitive
|
||||||
|
//- (NSString *)publicID; //primitive
|
||||||
|
//- (void)setSystemID:(NSString *)systemID; //primitive
|
||||||
|
//- (NSString *)systemID; //primitive
|
||||||
|
|
||||||
|
//- (void)insertChild:(MGMXMLNode *)child atIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)insertChildren:(NSArray *)children atIndex:(NSUInteger)index;
|
||||||
|
//- (void)removeChildAtIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)setChildren:(NSArray *)children; //primitive
|
||||||
|
//- (void)addChild:(MGMXMLNode *)child;
|
||||||
|
//- (void)replaceChildAtIndex:(NSUInteger)index withNode:(MGMXMLNode *)node;
|
||||||
|
|
||||||
|
//- (MGMXMLDTDNode *)entityDeclarationForName:(NSString *)name; //primitive
|
||||||
|
//- (MGMXMLDTDNode *)notationDeclarationForName:(NSString *)name; //primitive
|
||||||
|
//- (MGMXMLDTDNode *)elementDeclarationForName:(NSString *)name; //primitive
|
||||||
|
//- (MGMXMLDTDNode *)attributeDeclarationForName:(NSString *)name elementName:(NSString *)elementName; //primitive
|
||||||
|
//+ (MGMXMLDTDNode *)predefinedEntityDeclarationForName:(NSString *)name;
|
||||||
|
@end
|
13
Classes/VoiceBase/XML/MGMXMLDTD.m
Normal file
13
Classes/VoiceBase/XML/MGMXMLDTD.m
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDTD.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLDTD.h"
|
||||||
|
|
||||||
|
@implementation MGMXMLDTD
|
||||||
|
|
||||||
|
@end
|
29
Classes/VoiceBase/XML/MGMXMLDTDNode.h
Normal file
29
Classes/VoiceBase/XML/MGMXMLDTDNode.h
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDTDNode.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <VoiceBase/MGMXMLNode.h>
|
||||||
|
|
||||||
|
@interface MGMXMLDTDNode : MGMXMLNode {
|
||||||
|
|
||||||
|
}
|
||||||
|
//- (id)initWithXMLString:(NSString *)string; //primitive
|
||||||
|
//- (void)setDTDKind:(MGMXMLDTDNodeKind)kind; //primitive
|
||||||
|
//- (MGMXMLDTDNodeKind)DTDKind; //primitive
|
||||||
|
//- (BOOL)isExternal; //primitive
|
||||||
|
//- (void)setPublicID:(NSString *)publicID; //primitive
|
||||||
|
//- (NSString *)publicID; //primitive
|
||||||
|
//- (void)setSystemID:(NSString *)systemID; //primitive
|
||||||
|
//- (NSString *)systemID; //primitive
|
||||||
|
//- (void)setNotationName:(NSString *)notationName; //primitive
|
||||||
|
//- (NSString *)notationName; //primitive
|
||||||
|
@end
|
13
Classes/VoiceBase/XML/MGMXMLDTDNode.m
Normal file
13
Classes/VoiceBase/XML/MGMXMLDTDNode.m
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDTDNode.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLDTDNode.h"
|
||||||
|
|
||||||
|
@implementation MGMXMLDTDNode
|
||||||
|
|
||||||
|
@end
|
57
Classes/VoiceBase/XML/MGMXMLDocument.h
Normal file
57
Classes/VoiceBase/XML/MGMXMLDocument.h
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDocument.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <VoiceBase/MGMXMLNode.h>
|
||||||
|
|
||||||
|
#define MGMXMLDocPtr (xmlDocPtr)commonXML
|
||||||
|
|
||||||
|
@interface MGMXMLDocument : MGMXMLNode {
|
||||||
|
|
||||||
|
}
|
||||||
|
- (id)initWithXMLString:(NSString *)string options:(NSUInteger)mask error:(NSError **)error;
|
||||||
|
- (id)initWithContentsOfURL:(NSURL *)url options:(NSUInteger)mask error:(NSError **)error;
|
||||||
|
- (id)initWithData:(NSData *)data options:(NSUInteger)mask error:(NSError **)error; //primitive
|
||||||
|
//- (id)initWithRootElement:(MGMXMLElement *)element;
|
||||||
|
|
||||||
|
//+ (Class)replacementClassForClass:(Class)cls;
|
||||||
|
//- (void)setCharacterEncoding:(NSString *)encoding; //primitive
|
||||||
|
//- (NSString *)characterEncoding; //primitive
|
||||||
|
//- (void)setVersion:(NSString *)version; //primitive
|
||||||
|
//- (NSString *)version; //primitive
|
||||||
|
//- (void)setStandalone:(BOOL)standalone; //primitive
|
||||||
|
//- (BOOL)isStandalone; //primitive
|
||||||
|
//- (void)setDocumentContentKind:(MGMXMLDocumentContentKind)kind; //primitive
|
||||||
|
//- (MGMXMLDocumentContentKind)documentContentKind; //primitive
|
||||||
|
//- (void)setMIMEType:(NSString *)MIMEType; //primitive
|
||||||
|
//- (NSString *)MIMEType; //primitive
|
||||||
|
//- (void)setDTD:(MGMXMLDTD *)documentTypeDeclaration; //primitive
|
||||||
|
//- (MGMXMLDTD *)DTD; //primitive
|
||||||
|
- (void)setRootElement:(MGMXMLNode *)root;
|
||||||
|
- (MGMXMLElement *)rootElement; //primitive
|
||||||
|
|
||||||
|
//- (void)insertChild:(MGMXMLNode *)child atIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)insertChildren:(NSArray *)children atIndex:(NSUInteger)index;
|
||||||
|
//- (void)removeChildAtIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)setChildren:(NSArray *)children; //primitive
|
||||||
|
//- (void)addChild:(MGMXMLNode *)child;
|
||||||
|
//- (void)replaceChildAtIndex:(NSUInteger)index withNode:(MGMXMLNode *)node;
|
||||||
|
|
||||||
|
- (NSData *)XMLData;
|
||||||
|
- (NSData *)XMLDataWithOptions:(NSUInteger)options;
|
||||||
|
|
||||||
|
//- (id)objectByApplyingXSLT:(NSData *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
|
||||||
|
//- (id)objectByApplyingXSLTString:(NSString *)xslt arguments:(NSDictionary *)arguments error:(NSError **)error;
|
||||||
|
//- (id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(NSDictionary *)argument error:(NSError **)error;
|
||||||
|
|
||||||
|
//- (BOOL)validateAndReturnError:(NSError **)error;
|
||||||
|
@end
|
68
Classes/VoiceBase/XML/MGMXMLDocument.m
Normal file
68
Classes/VoiceBase/XML/MGMXMLDocument.m
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLDocument.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLDocument.h"
|
||||||
|
#import "MGMXMLElement.h"
|
||||||
|
#import <libxml/HTMLtree.h>
|
||||||
|
#import <libxml/HTMLparser.h>
|
||||||
|
|
||||||
|
@implementation MGMXMLDocument
|
||||||
|
- (id)initWithXMLString:(NSString *)string options:(NSUInteger)mask error:(NSError **)error {
|
||||||
|
NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
return [self initWithData:data options:mask error:error];
|
||||||
|
}
|
||||||
|
- (id)initWithContentsOfURL:(NSURL *)url options:(NSUInteger)mask error:(NSError **)error {
|
||||||
|
NSData *data = [NSData dataWithContentsOfURL:url];
|
||||||
|
return [self initWithData:data options:mask error:error];
|
||||||
|
}
|
||||||
|
- (id)initWithData:(NSData *)data options:(NSUInteger)mask error:(NSError **)error {
|
||||||
|
if (self = [super init]) {
|
||||||
|
if (data==nil || [data length]<=0) {
|
||||||
|
if (error!=nil) *error = [NSError errorWithDomain:MGMXMLErrorDomain code:0 userInfo:[NSDictionary dictionaryWithObject:@"Data has no length." forKey:NSLocalizedDescriptionKey]];
|
||||||
|
[self release];
|
||||||
|
self = nil;
|
||||||
|
} else {
|
||||||
|
xmlKeepBlanksDefault(0);
|
||||||
|
|
||||||
|
xmlDocPtr document = NULL;
|
||||||
|
if (mask & MGMXMLDocumentTidyHTML) {
|
||||||
|
document = htmlReadMemory([data bytes], [data length], NULL, NULL, XML_PARSE_RECOVER | HTML_PARSE_NONET);
|
||||||
|
} else {
|
||||||
|
document = xmlParseMemory([data bytes], [data length]);
|
||||||
|
}
|
||||||
|
if (document==NULL) {
|
||||||
|
if (error!=nil) *error = [NSError errorWithDomain:MGMXMLErrorDomain code:1 userInfo:[NSDictionary dictionaryWithObject:@"Unable to parse document." forKey:NSLocalizedDescriptionKey]];
|
||||||
|
[self release];
|
||||||
|
self = nil;
|
||||||
|
} else {
|
||||||
|
[self setTypeXMLPtr:(xmlTypPtr)document];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setRootElement:(MGMXMLNode *)root {
|
||||||
|
if ([root kind]==MGMXMLNamespaceKind)
|
||||||
|
return;
|
||||||
|
xmlDocSetRootElement(MGMXMLDocPtr, (xmlNodePtr)[root commonXML]);
|
||||||
|
}
|
||||||
|
- (MGMXMLElement *)rootElement {
|
||||||
|
xmlNodePtr element = xmlDocGetRootElement(MGMXMLDocPtr);
|
||||||
|
if (element!=NULL)
|
||||||
|
return [MGMXMLElement nodeWithTypeXMLPtr:(xmlTypPtr)element];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSData *)XMLData {
|
||||||
|
return [[self XMLStringWithOptions:0] dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
}
|
||||||
|
- (NSData *)XMLDataWithOptions:(NSUInteger)options {
|
||||||
|
return [[self XMLStringWithOptions:options] dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
|
}
|
||||||
|
@end
|
50
Classes/VoiceBase/XML/MGMXMLElement.h
Normal file
50
Classes/VoiceBase/XML/MGMXMLElement.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLElement.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <VoiceBase/MGMXMLNode.h>
|
||||||
|
|
||||||
|
@interface MGMXMLElement : MGMXMLNode {
|
||||||
|
|
||||||
|
}
|
||||||
|
//- (id)initWithName:(NSString *)name;
|
||||||
|
//- (id)initWithName:(NSString *)name URI:(NSString *)URI; //primitive
|
||||||
|
//- (id)initWithName:(NSString *)name stringValue:(NSString *)string;
|
||||||
|
- (id)initWithXMLString:(NSString *)string error:(NSError **)error;
|
||||||
|
|
||||||
|
- (NSArray *)elementsForName:(NSString *)name;
|
||||||
|
- (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString *)URI;
|
||||||
|
|
||||||
|
- (void)addAttribute:(MGMXMLNode *)attribute; //primitive
|
||||||
|
- (void)removeAttributeForName:(NSString *)name; //primitive
|
||||||
|
//- (void)setAttributes:(NSArray *)attributes; //primitive
|
||||||
|
//- (void)setAttributesAsDictionary:(NSDictionary *)attributes;
|
||||||
|
- (NSArray *)attributes; //primitive
|
||||||
|
- (MGMXMLNode *)attributeForName:(NSString *)name;
|
||||||
|
//- (MGMXMLNode *)attributeForLocalName:(NSString *)localName URI:(NSString *)URI; //primitive
|
||||||
|
|
||||||
|
//- (void)addNamespace:(MGMXMLNode *)aNamespace; //primitive
|
||||||
|
//- (void)removeNamespaceForPrefix:(NSString *)name; //primitive
|
||||||
|
//- (void)setNamespaces:(NSArray *)namespaces; //primitive
|
||||||
|
//- (NSArray *)namespaces; //primitive
|
||||||
|
//- (MGMXMLNode *)namespaceForPrefix:(NSString *)name;
|
||||||
|
//- (MGMXMLNode *)resolveNamespaceForName:(NSString *)name;
|
||||||
|
- (NSString *)resolvePrefixForNamespaceURI:(NSString *)namespaceURI;
|
||||||
|
|
||||||
|
//- (void)insertChild:(MGMXMLNode *)child atIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)insertChildren:(NSArray *)children atIndex:(NSUInteger)index;
|
||||||
|
//- (void)removeChildAtIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (void)setChildren:(NSArray *)children; //primitive
|
||||||
|
//- (void)addChild:(MGMXMLNode *)child;
|
||||||
|
//- (void)replaceChildAtIndex:(NSUInteger)index withNode:(MGMXMLNode *)node;
|
||||||
|
//- (void)normalizeAdjacentTextNodesPreservingCDATA:(BOOL)preserve;
|
||||||
|
@end
|
127
Classes/VoiceBase/XML/MGMXMLElement.m
Normal file
127
Classes/VoiceBase/XML/MGMXMLElement.m
Normal file
@ -0,0 +1,127 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLElement.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLElement.h"
|
||||||
|
#import "MGMXMLDocument.h"
|
||||||
|
#import "MGMXMLAddons.h"
|
||||||
|
|
||||||
|
@implementation MGMXMLElement
|
||||||
|
- (id)initWithXMLString:(NSString *)string error:(NSError **)error {
|
||||||
|
MGMXMLDocument *document = [[MGMXMLDocument alloc] initWithXMLString:string options:0 error:error];
|
||||||
|
MGMXMLElement *element = nil;
|
||||||
|
if (document!=nil) {
|
||||||
|
element = [[document rootElement] retain];
|
||||||
|
if (element!=nil)
|
||||||
|
[element detach];
|
||||||
|
[document release];
|
||||||
|
}
|
||||||
|
return element;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray *)elementsForName:(NSString *)name URI:(NSString *)URI resolvingNamespacePrefix:(BOOL)resolveNamespacePrefix {
|
||||||
|
NSMutableArray *elements = [NSMutableArray array];
|
||||||
|
|
||||||
|
if (resolveNamespacePrefix && URI!=nil) {
|
||||||
|
NSString *prefix = [self resolvePrefixForNamespaceURI:URI];
|
||||||
|
if (prefix!=nil)
|
||||||
|
name = [NSString stringWithFormat:@"%@:%@", prefix, name];
|
||||||
|
}
|
||||||
|
NSString *localName = [[self class] localNameForName:name];
|
||||||
|
BOOL hasPrefix = ([[self class] prefixForName:localName]!=nil);
|
||||||
|
|
||||||
|
xmlNodePtr child = MGMXMLNodePtr->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
if (child->type==MGMXMLElementKind) {
|
||||||
|
BOOL shouldAddElement = NO;
|
||||||
|
if (URI==nil) {
|
||||||
|
shouldAddElement = xmlStrEqual(child->name, [name xmlString]);
|
||||||
|
} else {
|
||||||
|
if (hasPrefix && xmlStrEqual(child->name, [name xmlString]))
|
||||||
|
shouldAddElement = YES;
|
||||||
|
else if (child->ns!=NULL)
|
||||||
|
shouldAddElement = xmlStrEqual(child->name, [(hasPrefix ? localName : name) xmlString]) && xmlStrEqual(child->ns->href, [URI xmlString]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (shouldAddElement)
|
||||||
|
[elements addObject:[MGMXMLElement nodeWithTypeXMLPtr:(xmlTypPtr)child]];
|
||||||
|
}
|
||||||
|
|
||||||
|
child = child->next;
|
||||||
|
}
|
||||||
|
return elements;
|
||||||
|
}
|
||||||
|
- (NSArray *)elementsForName:(NSString *)name {
|
||||||
|
NSString *localName = [[self class] localNameForName:name];
|
||||||
|
NSString *prefix = [[self class] prefixForName:name];
|
||||||
|
NSString *uri = nil;
|
||||||
|
if (prefix!=nil) {
|
||||||
|
xmlNsPtr namespace = xmlSearchNs(MGMXMLNodePtr->doc, MGMXMLNodePtr, [prefix xmlString]);
|
||||||
|
if (namespace!=NULL)
|
||||||
|
uri = [NSString stringWithXMLString:namespace->href];
|
||||||
|
}
|
||||||
|
|
||||||
|
return [self elementsForName:localName URI:uri resolvingNamespacePrefix:NO];
|
||||||
|
}
|
||||||
|
- (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString *)URI {
|
||||||
|
return [self elementsForName:localName URI:URI resolvingNamespacePrefix:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)addAttribute:(MGMXMLNode *)attribute {
|
||||||
|
if ([attribute kind]==MGMXMLAttributeKind && [attribute commonXML]->parent!=NULL) {
|
||||||
|
[self removeAttributeForName:[attribute name]];
|
||||||
|
xmlAddChild(MGMXMLNodePtr, (xmlNodePtr)[attribute commonXML]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- (void)removeAttributeForName:(NSString *)name {
|
||||||
|
xmlAttrPtr attribute = MGMXMLNodePtr->properties;
|
||||||
|
while (attribute!=NULL) {
|
||||||
|
if (xmlStrEqual(attribute->name, [name xmlString])) {
|
||||||
|
[[self class] detatchAttribute:attribute fromNode:MGMXMLNodePtr];
|
||||||
|
|
||||||
|
if(attribute->_private == NULL)
|
||||||
|
xmlFreeProp(attribute);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
attribute = attribute->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- (NSArray *)attributes {
|
||||||
|
NSMutableArray *attributes = [NSMutableArray array];
|
||||||
|
xmlAttrPtr attribute = MGMXMLNodePtr->properties;
|
||||||
|
while (attribute!=NULL) {
|
||||||
|
[attributes addObject:[MGMXMLNode nodeWithTypeXMLPtr:(xmlTypPtr)attribute]];
|
||||||
|
attribute = attribute->next;
|
||||||
|
}
|
||||||
|
return attributes;
|
||||||
|
}
|
||||||
|
- (MGMXMLNode *)attributeForName:(NSString *)name {
|
||||||
|
xmlAttrPtr attribute = MGMXMLNodePtr->properties;
|
||||||
|
while (attribute!=NULL) {
|
||||||
|
if (xmlStrEqual(attribute->name, [name xmlString]))
|
||||||
|
return [MGMXMLNode nodeWithTypeXMLPtr:(xmlTypPtr)attribute];
|
||||||
|
attribute = attribute->next;
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)resolvePrefixForNamespaceURI:(NSString *)namespaceURI {
|
||||||
|
xmlNodePtr child = MGMXMLNodePtr;
|
||||||
|
while (child!=NULL) {
|
||||||
|
xmlNsPtr namespace = child->nsDef;
|
||||||
|
while (namespace!=NULL) {
|
||||||
|
if (xmlStrEqual(namespace->href, [namespaceURI xmlString])) {
|
||||||
|
if (namespace->prefix!=NULL)
|
||||||
|
return [NSString stringWithXMLString:namespace->prefix];
|
||||||
|
}
|
||||||
|
namespace = namespace->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
@end
|
146
Classes/VoiceBase/XML/MGMXMLNode.h
Normal file
146
Classes/VoiceBase/XML/MGMXMLNode.h
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLNode.h
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <VoiceBase/MGMXMLNodeOptions.h>
|
||||||
|
#import <libxml/parser.h>
|
||||||
|
#import <libxml/tree.h>
|
||||||
|
#import <libxml/xpath.h>
|
||||||
|
#import <libxml/xpathInternals.h>
|
||||||
|
#import <libxml/HTMLtree.h>
|
||||||
|
#import <libxml/HTMLparser.h>
|
||||||
|
|
||||||
|
#define MGMXMLNodePtr ((xmlNodePtr)commonXML)
|
||||||
|
#define MGMXMLAttrPtr ((xmlAttrPtr)commonXML)
|
||||||
|
#define MGMXMLDTDPtr ((xmlDtdPtr)commonXML)
|
||||||
|
|
||||||
|
@class MGMXMLDocument, MGMXMLElement;
|
||||||
|
|
||||||
|
extern NSString * const MGMXMLErrorDomain;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
MGMXMLInvalidKind = 0,
|
||||||
|
MGMXMLDocumentKind = XML_DOCUMENT_NODE,
|
||||||
|
MGMXMLElementKind = XML_ELEMENT_NODE,
|
||||||
|
MGMXMLAttributeKind = XML_ATTRIBUTE_NODE,
|
||||||
|
MGMXMLNamespaceKind = XML_NAMESPACE_DECL,
|
||||||
|
MGMXMLProcessingInstructionKind = XML_PI_NODE,
|
||||||
|
MGMXMLCommentKind = XML_COMMENT_NODE,
|
||||||
|
MGMXMLTextKind = XML_TEXT_NODE,
|
||||||
|
MGMXMLDTDKind = XML_DTD_NODE,
|
||||||
|
MGMXMLEntityDeclarationKind = XML_ENTITY_DECL,
|
||||||
|
MGMXMLAttributeDeclarationKind = XML_ATTRIBUTE_DECL,
|
||||||
|
MGMXMLElementDeclarationKind = XML_ELEMENT_DECL,
|
||||||
|
MGMXMLNotationDeclarationKind = XML_NOTATION_NODE
|
||||||
|
} MGMXMLNodeKind;
|
||||||
|
|
||||||
|
//The common XML structure that has type.
|
||||||
|
typedef struct _xmlTyp xmlTyp;
|
||||||
|
typedef xmlTyp *xmlTypPtr;
|
||||||
|
struct _xmlTyp {
|
||||||
|
void *trash;
|
||||||
|
xmlElementType type;
|
||||||
|
};
|
||||||
|
|
||||||
|
//The common XML structure.
|
||||||
|
typedef struct _xmlCom xmlCom;
|
||||||
|
typedef xmlCom *xmlComPtr;
|
||||||
|
struct _xmlCom {
|
||||||
|
void *_private;
|
||||||
|
xmlElementType type;
|
||||||
|
char *name;
|
||||||
|
struct _xmlNode *children;
|
||||||
|
struct _xmlNode *last;
|
||||||
|
struct _xmlNode *parent;
|
||||||
|
struct _xmlNode *next;
|
||||||
|
struct _xmlNode *prev;
|
||||||
|
struct _xmlDoc *doc;
|
||||||
|
};
|
||||||
|
|
||||||
|
@interface MGMXMLNode : NSObject {
|
||||||
|
xmlComPtr commonXML;
|
||||||
|
xmlNsPtr namespaceXML;
|
||||||
|
xmlNodePtr parentNode;
|
||||||
|
MGMXMLNodeKind type;
|
||||||
|
}
|
||||||
|
+ (id)nodeWithTypeXMLPtr:(xmlTypPtr)theXMLPtr;
|
||||||
|
- (id)initWithTypeXMLPtr:(xmlTypPtr)theXMLPtr;
|
||||||
|
+ (void)stripDocumentFromAttribute:(xmlAttrPtr)theAttribute;
|
||||||
|
+ (void)stripDocumentFromNode:(xmlNodePtr)theNode;
|
||||||
|
+ (void)removeAttributesFromNode:(xmlNodePtr)theNode;
|
||||||
|
+ (void)removeNamespacesFromNode:(xmlNodePtr)theNode;
|
||||||
|
+ (void)removeChildrenFromNode:(xmlNodePtr)theNode;
|
||||||
|
+ (void)freeNode:(xmlNodePtr)theNode;
|
||||||
|
- (void)setTypeXMLPtr:(xmlTypPtr)theXMLPtr;
|
||||||
|
+ (BOOL)isNode:(MGMXMLNodeKind)theType;
|
||||||
|
- (BOOL)isNode;
|
||||||
|
+ (NSError *)lastError;
|
||||||
|
- (NSError *)lastError;
|
||||||
|
//- (id)initWithKind:(MGMXMLNodeKind)kind;
|
||||||
|
//- (id)initWithKind:(MGMXMLNodeKind)kind options:(NSUInteger)options; //primitive
|
||||||
|
//+ (id)document;
|
||||||
|
//+ (id)documentWithRootElement:(MGMXMLElement *)element;
|
||||||
|
//+ (id)elementWithName:(NSString *)name;
|
||||||
|
//+ (id)elementWithName:(NSString *)name URI:(NSString *)URI;
|
||||||
|
//+ (id)elementWithName:(NSString *)name stringValue:(NSString *)string;
|
||||||
|
//+ (id)elementWithName:(NSString *)name children:(NSArray *)children attributes:(NSArray *)attributes;
|
||||||
|
//+ (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)commentWithStringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)textWithStringValue:(NSString *)stringValue;
|
||||||
|
//+ (id)DTDNodeWithXMLString:(NSString *)string;
|
||||||
|
|
||||||
|
- (MGMXMLNodeKind)kind;
|
||||||
|
- (xmlComPtr)commonXML;
|
||||||
|
- (xmlNsPtr)nameSpaceXML;
|
||||||
|
- (void)setName:(NSString *)name;
|
||||||
|
- (NSString *)name;
|
||||||
|
//- (void)setObjectValue:(id)value; //primitive
|
||||||
|
//- (id)objectValue; //primitive
|
||||||
|
//- (void)setStringValue:(NSString *)string;
|
||||||
|
//- (void)setStringValue:(NSString *)string resolvingEntities:(BOOL)resolve; //primitive
|
||||||
|
- (NSString *)stringValue; //primitive
|
||||||
|
|
||||||
|
//- (NSUInteger)index; //primitive
|
||||||
|
//- (NSUInteger)level;
|
||||||
|
- (MGMXMLDocument *)rootDocument;
|
||||||
|
- (MGMXMLNode *)parent; //primitive
|
||||||
|
//- (NSUInteger)childCount; //primitive
|
||||||
|
//- (NSArray *)children; //primitive
|
||||||
|
- (MGMXMLNode *)childAtIndex:(NSUInteger)index; //primitive
|
||||||
|
//- (MGMXMLNode *)previousSibling;
|
||||||
|
//- (MGMXMLNode *)nextSibling;
|
||||||
|
//- (MGMXMLNode *)previousNode;
|
||||||
|
//- (MGMXMLNode *)nextNode;
|
||||||
|
+ (void)detatchAttribute:(xmlAttrPtr)theAttribute fromNode:(xmlNodePtr)theNode;
|
||||||
|
- (void)detach; //primitive
|
||||||
|
//- (NSString *)XPath;
|
||||||
|
|
||||||
|
//- (NSString *)localName; //primitive
|
||||||
|
//- (NSString *)prefix; //primitive
|
||||||
|
//- (void)setURI:(NSString *)URI; //primitive
|
||||||
|
//- (NSString *)URI; //primitive
|
||||||
|
+ (NSString *)localNameForName:(NSString *)name;
|
||||||
|
+ (NSString *)prefixForName:(NSString *)name;
|
||||||
|
//+ (MGMXMLNode *)predefinedNamespaceForPrefix:(NSString *)name;
|
||||||
|
|
||||||
|
- (NSString *)description;
|
||||||
|
- (NSString *)XMLString;
|
||||||
|
- (NSString *)XMLStringWithOptions:(NSUInteger)options;
|
||||||
|
//- (NSString *)canonicalXMLStringPreservingComments:(BOOL)comments;
|
||||||
|
|
||||||
|
- (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error;
|
||||||
|
//- (NSArray *)objectsForXQuery:(NSString *)xquery constants:(NSDictionary *)constants error:(NSError **)error;
|
||||||
|
//- (NSArray *)objectsForXQuery:(NSString *)xquery error:(NSError **)error;
|
||||||
|
@end
|
488
Classes/VoiceBase/XML/MGMXMLNode.m
Normal file
488
Classes/VoiceBase/XML/MGMXMLNode.m
Normal file
@ -0,0 +1,488 @@
|
|||||||
|
//
|
||||||
|
// MGMXMLNode.m
|
||||||
|
// MGMXML
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/22/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "MGMXMLNode.h"
|
||||||
|
#import "MGMXMLAddons.h"
|
||||||
|
#import "MGMXMLDocument.h"
|
||||||
|
#import "MGMXMLElement.h"
|
||||||
|
#import "MGMXMLNodeOptions.h"
|
||||||
|
|
||||||
|
NSString * const MGMXMLErrorDomain = @"MGMXMLErrorDomain";
|
||||||
|
NSString * const MGMXMLLastError = @"MGMXMLLastError";
|
||||||
|
|
||||||
|
static NSMutableDictionary *MGMXMLInfo = nil;
|
||||||
|
|
||||||
|
static void MGMXMLErrorHandler(void *userData, xmlErrorPtr error) {
|
||||||
|
NSAutoreleasePool *pool = [NSAutoreleasePool new];;
|
||||||
|
if (error==NULL) {
|
||||||
|
[MGMXMLInfo removeObjectForKey:MGMXMLLastError];
|
||||||
|
} else {
|
||||||
|
[MGMXMLInfo setObject:[NSValue valueWithXMLError:error] forKey:MGMXMLLastError];
|
||||||
|
}
|
||||||
|
[pool drain];
|
||||||
|
}
|
||||||
|
|
||||||
|
@implementation MGMXMLNode
|
||||||
|
+ (void)initialize {
|
||||||
|
if (MGMXMLInfo==nil) {
|
||||||
|
MGMXMLInfo = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
initGenericErrorDefaultFunc(NULL);
|
||||||
|
xmlSetStructuredErrorFunc(NULL, MGMXMLErrorHandler);
|
||||||
|
xmlKeepBlanksDefault(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)init {
|
||||||
|
if (self = [super init]) {
|
||||||
|
commonXML = NULL;
|
||||||
|
namespaceXML = NULL;
|
||||||
|
parentNode = NULL;
|
||||||
|
type = MGMXMLInvalidKind;
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
+ (id)nodeWithTypeXMLPtr:(xmlTypPtr)theXMLPtr {
|
||||||
|
return [[[self alloc] initWithTypeXMLPtr:theXMLPtr] autorelease];
|
||||||
|
}
|
||||||
|
- (id)initWithTypeXMLPtr:(xmlTypPtr)theXMLPtr {
|
||||||
|
if (self = [self init]) {
|
||||||
|
if (theXMLPtr->type==MGMXMLNamespaceKind) {
|
||||||
|
xmlNsPtr xmlPtr = (xmlNsPtr)theXMLPtr;
|
||||||
|
if (xmlPtr->_private!=NULL) {
|
||||||
|
[self release];
|
||||||
|
self = nil;
|
||||||
|
return [(MGMXMLNode *)xmlPtr->_private retain];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
xmlComPtr comXML = (xmlComPtr)theXMLPtr;
|
||||||
|
if (comXML->_private!=NULL) {
|
||||||
|
[self release];
|
||||||
|
self = nil;
|
||||||
|
return [(MGMXMLNode *)comXML->_private retain];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self setTypeXMLPtr:theXMLPtr];
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
- (void)clearParent {
|
||||||
|
parentNode = NULL;
|
||||||
|
}
|
||||||
|
- (void)freeXML {
|
||||||
|
if (namespaceXML!=NULL) {
|
||||||
|
namespaceXML->_private = NULL;
|
||||||
|
|
||||||
|
if (parentNode==NULL)
|
||||||
|
xmlFreeNs(namespaceXML);
|
||||||
|
namespaceXML = NULL;
|
||||||
|
parentNode = NULL;
|
||||||
|
}
|
||||||
|
if (commonXML!=NULL) {
|
||||||
|
commonXML->_private = NULL;
|
||||||
|
|
||||||
|
if (commonXML->parent==NULL) {
|
||||||
|
if (type==MGMXMLDocumentKind) {
|
||||||
|
xmlNodePtr child = commonXML->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
xmlNodePtr nextChild = child->next;
|
||||||
|
if (child->type == XML_ELEMENT_NODE) {
|
||||||
|
if (child->prev!=NULL)
|
||||||
|
child->prev->next = child->next;
|
||||||
|
if (child->next!=NULL)
|
||||||
|
child->next->prev = child->prev;
|
||||||
|
if (commonXML->children==child)
|
||||||
|
commonXML->children = child->next;
|
||||||
|
if (commonXML->last==child)
|
||||||
|
commonXML->last = child->prev;
|
||||||
|
[[self class] freeNode:child];
|
||||||
|
}
|
||||||
|
child = nextChild;
|
||||||
|
}
|
||||||
|
xmlFreeDoc(MGMXMLDocPtr);
|
||||||
|
} else if (type==MGMXMLAttributeKind) {
|
||||||
|
xmlFreeProp(MGMXMLAttrPtr);
|
||||||
|
} else if (type==MGMXMLDTDKind) {
|
||||||
|
xmlFreeDtd(MGMXMLDTDPtr);
|
||||||
|
} else {
|
||||||
|
[[self class] freeNode:MGMXMLNodePtr];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
commonXML = NULL;
|
||||||
|
}
|
||||||
|
type = MGMXMLInvalidKind;
|
||||||
|
}
|
||||||
|
- (void)dealloc {
|
||||||
|
[self freeXML];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
+ (void)stripDocumentFromAttribute:(xmlAttrPtr)theAttribute {
|
||||||
|
xmlNodePtr child = theAttribute->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
child->doc = NULL;
|
||||||
|
child = child->next;
|
||||||
|
}
|
||||||
|
theAttribute->doc = NULL;
|
||||||
|
}
|
||||||
|
+ (void)stripDocumentFromNode:(xmlNodePtr)theNode {
|
||||||
|
xmlAttrPtr attribute = theNode->properties;
|
||||||
|
while (attribute!=NULL) {
|
||||||
|
[self stripDocumentFromAttribute:attribute];
|
||||||
|
attribute = attribute->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlNodePtr child = theNode->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
[self stripDocumentFromNode:child];
|
||||||
|
child = child->next;
|
||||||
|
}
|
||||||
|
theNode->doc = NULL;
|
||||||
|
}
|
||||||
|
+ (void)removeAttributesFromNode:(xmlNodePtr)theNode {
|
||||||
|
xmlAttrPtr attribute = theNode->properties;
|
||||||
|
while (attribute!=NULL) {
|
||||||
|
xmlAttrPtr nextAttribute = attribute->next;
|
||||||
|
|
||||||
|
if (attribute->_private==NULL) {
|
||||||
|
xmlFreeProp(attribute);
|
||||||
|
} else {
|
||||||
|
attribute->parent = NULL;
|
||||||
|
attribute->prev = NULL;
|
||||||
|
attribute->next = NULL;
|
||||||
|
if (attribute->doc!=NULL) [self stripDocumentFromAttribute:attribute];
|
||||||
|
}
|
||||||
|
attribute = nextAttribute;
|
||||||
|
}
|
||||||
|
theNode->properties = NULL;
|
||||||
|
}
|
||||||
|
+ (void)removeNamespacesFromNode:(xmlNodePtr)theNode {
|
||||||
|
xmlNsPtr namespace = theNode->nsDef;
|
||||||
|
while (namespace!=NULL){
|
||||||
|
xmlNsPtr nextNamespace = namespace->next;
|
||||||
|
if (namespace->_private!=NULL) {
|
||||||
|
[(MGMXMLNode *)namespace->_private clearParent];
|
||||||
|
namespace->next = NULL;
|
||||||
|
} else {
|
||||||
|
xmlFreeNs(namespace);
|
||||||
|
}
|
||||||
|
namespace = nextNamespace;
|
||||||
|
}
|
||||||
|
theNode->nsDef = NULL;
|
||||||
|
theNode->ns = NULL;
|
||||||
|
}
|
||||||
|
+ (void)removeChildrenFromNode:(xmlNodePtr)theNode {
|
||||||
|
xmlNodePtr child = theNode->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
xmlNodePtr nextChild = child->next;
|
||||||
|
[self freeNode:child];
|
||||||
|
child = nextChild;
|
||||||
|
}
|
||||||
|
theNode->children = NULL;
|
||||||
|
theNode->last = NULL;
|
||||||
|
}
|
||||||
|
+ (void)freeNode:(xmlNodePtr)theNode {
|
||||||
|
if (![[self class] isNode:theNode->type]) {
|
||||||
|
NSLog(@"Cannot free node as it is the wrong type %d.", theNode->type);
|
||||||
|
} else {
|
||||||
|
if (theNode->_private==NULL) {
|
||||||
|
[self removeAttributesFromNode:theNode];
|
||||||
|
[self removeNamespacesFromNode:theNode];
|
||||||
|
[self removeChildrenFromNode:theNode];
|
||||||
|
|
||||||
|
xmlFreeNode(theNode);
|
||||||
|
} else {
|
||||||
|
theNode->parent = NULL;
|
||||||
|
theNode->prev = NULL;
|
||||||
|
theNode->next = NULL;
|
||||||
|
if (theNode->doc!=NULL) [self stripDocumentFromNode:theNode];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setTypeXMLPtr:(xmlTypPtr)theXMLPtr {
|
||||||
|
[self freeXML];
|
||||||
|
type = theXMLPtr->type;
|
||||||
|
if (type==XML_HTML_DOCUMENT_NODE)
|
||||||
|
type = MGMXMLDocumentKind;
|
||||||
|
if (type==MGMXMLNamespaceKind) {
|
||||||
|
namespaceXML = (xmlNsPtr)theXMLPtr;
|
||||||
|
namespaceXML->_private = self;
|
||||||
|
} else {
|
||||||
|
commonXML = (xmlComPtr)theXMLPtr;
|
||||||
|
commonXML->_private = self;
|
||||||
|
if (type==MGMXMLDocumentKind && [self isMemberOfClass:[MGMXMLNode class]])
|
||||||
|
self->isa = [MGMXMLDocument class];
|
||||||
|
else if (type==MGMXMLElementKind && [self isMemberOfClass:[MGMXMLNode class]])
|
||||||
|
self->isa = [MGMXMLElement class];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ (BOOL)isNode:(MGMXMLNodeKind)theType {
|
||||||
|
switch (theType) {
|
||||||
|
case MGMXMLElementKind:
|
||||||
|
case MGMXMLProcessingInstructionKind:
|
||||||
|
case MGMXMLCommentKind:
|
||||||
|
case MGMXMLTextKind:
|
||||||
|
case XML_CDATA_SECTION_NODE:
|
||||||
|
return YES;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
- (BOOL)isNode {
|
||||||
|
return [[self class] isNode:type];
|
||||||
|
}
|
||||||
|
+ (NSError *)lastError {
|
||||||
|
if ([MGMXMLInfo objectForKey:MGMXMLLastError]!=nil) {
|
||||||
|
xmlErrorPtr lastError = [[MGMXMLInfo objectForKey:MGMXMLLastError] xmlErrorValue];
|
||||||
|
NSString *description = [[NSString stringWithUTF8String:lastError->message] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||||
|
return [NSError errorWithDomain:MGMXMLErrorDomain code:lastError->code userInfo:[NSDictionary dictionaryWithObject:description forKey:NSLocalizedDescriptionKey]];
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
- (NSError *)lastError {
|
||||||
|
return [[self class] lastError];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (MGMXMLNodeKind)kind {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
- (xmlComPtr)commonXML {
|
||||||
|
return commonXML;
|
||||||
|
}
|
||||||
|
- (xmlNsPtr)nameSpaceXML {
|
||||||
|
return namespaceXML;
|
||||||
|
}
|
||||||
|
- (void)setName:(NSString *)name {
|
||||||
|
if (type==MGMXMLNamespaceKind) {
|
||||||
|
if (namespaceXML->prefix!=NULL)
|
||||||
|
xmlFree((xmlChar *)namespaceXML->prefix);
|
||||||
|
namespaceXML->prefix = xmlStrdup([name xmlString]);
|
||||||
|
} else {
|
||||||
|
xmlNodeSetName(MGMXMLNodePtr, [name xmlString]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- (NSString *)name {
|
||||||
|
if (type==MGMXMLNamespaceKind) {
|
||||||
|
if (namespaceXML->prefix!=NULL)
|
||||||
|
return [NSString stringWithXMLString:namespaceXML->prefix];
|
||||||
|
} else {
|
||||||
|
if (MGMXMLNodePtr->name!=NULL)
|
||||||
|
return [NSString stringWithXMLString:(xmlChar *)MGMXMLNodePtr->name];
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
- (NSString *)stringValue {
|
||||||
|
if (type==MGMXMLNamespaceKind) {
|
||||||
|
return [NSString stringWithXMLString:namespaceXML->href];
|
||||||
|
} else if (type==MGMXMLAttributeKind) {
|
||||||
|
if (MGMXMLAttrPtr->children!=NULL)
|
||||||
|
return [NSString stringWithXMLString:MGMXMLAttrPtr->children->content];
|
||||||
|
} else if ([self isNode]) {
|
||||||
|
xmlChar *contentString = xmlNodeGetContent(MGMXMLNodePtr);
|
||||||
|
NSString *stringValue = [NSString stringWithXMLString:contentString];
|
||||||
|
xmlFree(contentString);
|
||||||
|
return stringValue;
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (MGMXMLDocument *)rootDocument {
|
||||||
|
if (MGMXMLNodePtr->doc!=NULL)
|
||||||
|
return [MGMXMLDocument nodeWithTypeXMLPtr:(xmlTypPtr)MGMXMLNodePtr->doc];
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
- (MGMXMLNode *)parent {
|
||||||
|
return [MGMXMLNode nodeWithTypeXMLPtr:(xmlTypPtr)MGMXMLNodePtr->parent];
|
||||||
|
}
|
||||||
|
- (MGMXMLNode *)childAtIndex:(NSUInteger)index {
|
||||||
|
if (type==MGMXMLNamespaceKind)
|
||||||
|
return nil;
|
||||||
|
|
||||||
|
NSUInteger i = 0;
|
||||||
|
xmlNodePtr child = commonXML->children;
|
||||||
|
while (child!=NULL) {
|
||||||
|
if (i==index)
|
||||||
|
return [MGMXMLNode nodeWithTypeXMLPtr:(xmlTypPtr)child];
|
||||||
|
i++;
|
||||||
|
child = child->next;
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
+ (void)detatchAttribute:(xmlAttrPtr)theAttribute fromNode:(xmlNodePtr)theNode {
|
||||||
|
if (theAttribute->prev==NULL && theAttribute->next==NULL) {
|
||||||
|
theNode->properties = NULL;
|
||||||
|
} else if (theAttribute->prev==NULL) {
|
||||||
|
theNode->properties = theAttribute->next;
|
||||||
|
theAttribute->next->prev = NULL;
|
||||||
|
} else if (theAttribute->next==NULL) {
|
||||||
|
theAttribute->prev->next = NULL;
|
||||||
|
} else {
|
||||||
|
theAttribute->prev->next = theAttribute->next;
|
||||||
|
theAttribute->next->prev = theAttribute->prev;
|
||||||
|
}
|
||||||
|
theAttribute->parent = NULL;
|
||||||
|
theAttribute->prev = NULL;
|
||||||
|
theAttribute->next = NULL;
|
||||||
|
if (theAttribute->doc!=NULL) [[self class] stripDocumentFromAttribute:theAttribute];
|
||||||
|
}
|
||||||
|
- (void)detach {
|
||||||
|
if (type==MGMXMLNamespaceKind) {
|
||||||
|
if (parentNode!=NULL) {
|
||||||
|
xmlNsPtr previousNamespace = NULL;
|
||||||
|
xmlNsPtr currentNamespace = parentNode->nsDef;
|
||||||
|
while (currentNamespace!=NULL) {
|
||||||
|
if (currentNamespace==namespaceXML) {
|
||||||
|
if (previousNamespace!=NULL)
|
||||||
|
previousNamespace->next = currentNamespace->next;
|
||||||
|
else
|
||||||
|
parentNode->nsDef = currentNamespace->next;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
previousNamespace = currentNamespace;
|
||||||
|
currentNamespace = currentNamespace->next;
|
||||||
|
}
|
||||||
|
namespaceXML->next = NULL;
|
||||||
|
if (parentNode->ns==namespaceXML)
|
||||||
|
parentNode->ns = NULL;
|
||||||
|
parentNode = NULL;
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (commonXML->parent==NULL) return;
|
||||||
|
|
||||||
|
if (type==MGMXMLAttributeKind) {
|
||||||
|
[[self class] detatchAttribute:MGMXMLAttrPtr fromNode:MGMXMLAttrPtr->parent];
|
||||||
|
} else if ([self isNode]) {
|
||||||
|
if (commonXML->prev==NULL && commonXML->next==NULL) {
|
||||||
|
commonXML->parent->children = NULL;
|
||||||
|
commonXML->parent->last = NULL;
|
||||||
|
} else if (commonXML->prev==NULL) {
|
||||||
|
commonXML->parent->children = commonXML->next;
|
||||||
|
commonXML->next->prev = NULL;
|
||||||
|
} else if (commonXML->next==NULL) {
|
||||||
|
commonXML->parent->last = commonXML->prev;
|
||||||
|
commonXML->prev->next = NULL;
|
||||||
|
} else {
|
||||||
|
commonXML->prev->next = commonXML->next;
|
||||||
|
commonXML->next->prev = commonXML->prev;
|
||||||
|
}
|
||||||
|
commonXML->parent = NULL;
|
||||||
|
commonXML->prev = NULL;
|
||||||
|
commonXML->next = NULL;
|
||||||
|
if (commonXML->doc!=NULL) [[self class] stripDocumentFromNode:MGMXMLNodePtr];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (NSString *)localNameForName:(NSString *)name {
|
||||||
|
if (name!=nil && [name length]>0) {
|
||||||
|
NSRange range = [name rangeOfString:@":"];
|
||||||
|
if (range.location!=NSNotFound)
|
||||||
|
return [name substringFromIndex:range.location+range.length];
|
||||||
|
else
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
+ (NSString *)prefixForName:(NSString *)name {
|
||||||
|
if (name!=nil && [name length]>0) {
|
||||||
|
NSRange range = [name rangeOfString:@":"];
|
||||||
|
if (range.location!=NSNotFound)
|
||||||
|
return [name substringToIndex:range.location];
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)description {
|
||||||
|
return [self XMLString];
|
||||||
|
}
|
||||||
|
- (NSString *)XMLString {
|
||||||
|
return [self XMLStringWithOptions:0];
|
||||||
|
}
|
||||||
|
- (NSString *)XMLStringWithOptions:(NSUInteger)options {
|
||||||
|
if(options & MGMXMLNodeCompactEmptyElement)
|
||||||
|
xmlSaveNoEmptyTags = 0;
|
||||||
|
else
|
||||||
|
xmlSaveNoEmptyTags = 1;
|
||||||
|
|
||||||
|
int format = 0;
|
||||||
|
if (options & MGMXMLNodePrettyPrint) {
|
||||||
|
format = 1;
|
||||||
|
xmlIndentTreeOutput = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlBufferPtr bufferPtr = xmlBufferCreate();
|
||||||
|
if (type==MGMXMLNamespaceKind)
|
||||||
|
xmlNodeDump(bufferPtr, NULL, MGMXMLNodePtr, 0, format);
|
||||||
|
else
|
||||||
|
xmlNodeDump(bufferPtr, commonXML->doc, MGMXMLNodePtr, 0, format);
|
||||||
|
|
||||||
|
NSString *result = [NSString stringWithXMLString:bufferPtr->content];
|
||||||
|
if (type!=MGMXMLTextKind)
|
||||||
|
result = [result stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
|
||||||
|
xmlBufferFree(bufferPtr);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSArray *)nodesForXPath:(NSString *)xpath error:(NSError **)error {
|
||||||
|
BOOL shouldRemoveDocument = NO;
|
||||||
|
xmlDocPtr document;
|
||||||
|
if ([self isNode]) {
|
||||||
|
document = MGMXMLNodePtr->doc;
|
||||||
|
if (document==NULL) {
|
||||||
|
shouldRemoveDocument = YES;
|
||||||
|
document = xmlNewDoc(NULL);
|
||||||
|
xmlDocSetRootElement(document, MGMXMLNodePtr);
|
||||||
|
}
|
||||||
|
} else if (type==MGMXMLDocumentKind) {
|
||||||
|
document = MGMXMLDocPtr;
|
||||||
|
} else {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlXPathContextPtr xPathContext = xmlXPathNewContext(document);
|
||||||
|
xPathContext->node = MGMXMLNodePtr;
|
||||||
|
|
||||||
|
xmlNodePtr rootNode = document->children;
|
||||||
|
if (rootNode!=NULL) {
|
||||||
|
xmlNsPtr namespace = rootNode->nsDef;
|
||||||
|
while (namespace!=NULL) {
|
||||||
|
xmlXPathRegisterNs(xPathContext, namespace->prefix, namespace->href);
|
||||||
|
namespace = namespace->next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlXPathObjectPtr xPathObject = xmlXPathEvalExpression([xpath xmlString], xPathContext);
|
||||||
|
|
||||||
|
NSMutableArray *nodes = [NSMutableArray array];
|
||||||
|
|
||||||
|
if (xPathObject==NULL) {
|
||||||
|
if (error!=nil) *error = [self lastError];
|
||||||
|
nodes = nil;
|
||||||
|
} else {
|
||||||
|
int count = xmlXPathNodeSetGetLength(xPathObject->nodesetval);
|
||||||
|
if (count!=0) {
|
||||||
|
for (int i=0; i<count; i++)
|
||||||
|
[nodes addObject:[MGMXMLNode nodeWithTypeXMLPtr:(xmlTypPtr)xPathObject->nodesetval->nodeTab[i]]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (xPathObject) xmlXPathFreeObject(xPathObject);
|
||||||
|
if (xPathContext) xmlXPathFreeContext(xPathContext);
|
||||||
|
|
||||||
|
if (shouldRemoveDocument) {
|
||||||
|
xmlUnlinkNode(MGMXMLNodePtr);
|
||||||
|
xmlFreeDoc(document);
|
||||||
|
[[self class] stripDocumentFromNode:MGMXMLNodePtr];
|
||||||
|
}
|
||||||
|
|
||||||
|
return nodes;
|
||||||
|
}
|
||||||
|
@end
|
53
Classes/VoiceBase/XML/MGMXMLNodeOptions.h
Normal file
53
Classes/VoiceBase/XML/MGMXMLNodeOptions.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* MGMXMLNodeOptions.h
|
||||||
|
* MGMXML
|
||||||
|
*
|
||||||
|
* Created by Mr. Gecko on 9/22/10.
|
||||||
|
* Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum {
|
||||||
|
MGMXMLNodeOptionsNone = 0,
|
||||||
|
|
||||||
|
MGMXMLNodeIsCDATA = 1 << 0,
|
||||||
|
MGMXMLNodeExpandEmptyElement = 1 << 1,
|
||||||
|
MGMXMLNodeCompactEmptyElement = 1 << 2,
|
||||||
|
MGMXMLNodeUseSingleQuotes = 1 << 3,
|
||||||
|
MGMXMLNodeUseDoubleQuotes = 1 << 4,
|
||||||
|
|
||||||
|
MGMXMLDocumentTidyHTML = 1 << 9,
|
||||||
|
MGMXMLDocumentTidyXML = 1 << 10,
|
||||||
|
|
||||||
|
MGMXMLDocumentValidate = 1 << 13,
|
||||||
|
|
||||||
|
MGMXMLDocumentXInclude = 1 << 16,
|
||||||
|
|
||||||
|
MGMXMLNodePrettyPrint = 1 << 17,
|
||||||
|
MGMXMLDocumentIncludeContentTypeDeclaration = 1 << 18,
|
||||||
|
|
||||||
|
MGMXMLNodePreserveNamespaceOrder = 1 << 20,
|
||||||
|
MGMXMLNodePreserveAttributeOrder = 1 << 21,
|
||||||
|
MGMXMLNodePreserveEntities = 1 << 22,
|
||||||
|
MGMXMLNodePreservePrefixes = 1 << 23,
|
||||||
|
MGMXMLNodePreserveCDATA = 1 << 24,
|
||||||
|
MGMXMLNodePreserveWhitespace = 1 << 25,
|
||||||
|
MGMXMLNodePreserveDTD = 1 << 26,
|
||||||
|
MGMXMLNodePreserveCharacterReferences = 1 << 27,
|
||||||
|
MGMXMLNodePreserveEmptyElements =
|
||||||
|
(MGMXMLNodeExpandEmptyElement | MGMXMLNodeCompactEmptyElement),
|
||||||
|
MGMXMLNodePreserveQuotes =
|
||||||
|
(MGMXMLNodeUseSingleQuotes | MGMXMLNodeUseDoubleQuotes),
|
||||||
|
MGMXMLNodePreserveAll = (
|
||||||
|
MGMXMLNodePreserveNamespaceOrder |
|
||||||
|
MGMXMLNodePreserveAttributeOrder |
|
||||||
|
MGMXMLNodePreserveEntities |
|
||||||
|
MGMXMLNodePreservePrefixes |
|
||||||
|
MGMXMLNodePreserveCDATA |
|
||||||
|
MGMXMLNodePreserveEmptyElements |
|
||||||
|
MGMXMLNodePreserveQuotes |
|
||||||
|
MGMXMLNodePreserveWhitespace |
|
||||||
|
MGMXMLNodePreserveDTD |
|
||||||
|
MGMXMLNodePreserveCharacterReferences |
|
||||||
|
0xFFF00000)
|
||||||
|
};
|
@ -61,7 +61,7 @@
|
|||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||||
if (shouldRestart) {
|
if (shouldRestart) {
|
||||||
NSAlert *alert = [[NSAlert new] autorelease];
|
/*NSAlert *alert = [[NSAlert new] autorelease];
|
||||||
[alert setMessageText:@"Restart Required"];
|
[alert setMessageText:@"Restart Required"];
|
||||||
[alert setInformativeText:@"You have changed some settings that requires you to restart VoiceMac for them to take place, do you want to restart VoiceMac now?"];
|
[alert setInformativeText:@"You have changed some settings that requires you to restart VoiceMac for them to take place, do you want to restart VoiceMac now?"];
|
||||||
[alert addButtonWithTitle:@"Yes"];
|
[alert addButtonWithTitle:@"Yes"];
|
||||||
@ -73,7 +73,7 @@
|
|||||||
NSString *relaunchPath = [[[NSBundle bundleWithIdentifier:@"org.andymatuschak.Sparkle"] resourcePath] stringByAppendingPathComponent:@"relaunch"];
|
NSString *relaunchPath = [[[NSBundle bundleWithIdentifier:@"org.andymatuschak.Sparkle"] resourcePath] stringByAppendingPathComponent:@"relaunch"];
|
||||||
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
|
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
|
||||||
[[NSApplication sharedApplication] terminate:self];
|
[[NSApplication sharedApplication] terminate:self];
|
||||||
}
|
}*/
|
||||||
[[MGMSIP sharedSIP] restart];
|
[[MGMSIP sharedSIP] restart];
|
||||||
}
|
}
|
||||||
if (mainView!=nil)
|
if (mainView!=nil)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <MGMUsers/MGMUsers.h>
|
#import <MGMUsers/MGMUsers.h>
|
||||||
|
|
||||||
@class MGMThemeManager, WebView;
|
@class MGMSound, MGMThemeManager, WebView;
|
||||||
|
|
||||||
@interface MGMSoundsPane : MGMPreferencesPane {
|
@interface MGMSoundsPane : MGMPreferencesPane {
|
||||||
MGMThemeManager *themeManager;
|
MGMThemeManager *themeManager;
|
||||||
@ -37,7 +37,7 @@
|
|||||||
IBOutlet NSPopUpButton *SIPSound5PopUp;
|
IBOutlet NSPopUpButton *SIPSound5PopUp;
|
||||||
IBOutlet NSButton *SIPSound5AuthorButton;
|
IBOutlet NSButton *SIPSound5AuthorButton;
|
||||||
NSMutableDictionary *sounds;
|
NSMutableDictionary *sounds;
|
||||||
NSSound *soundPlayer;
|
MGMSound *soundPlayer;
|
||||||
|
|
||||||
IBOutlet NSWindow *browserWindow;
|
IBOutlet NSWindow *browserWindow;
|
||||||
IBOutlet WebView *browser;
|
IBOutlet WebView *browser;
|
||||||
|
@ -204,12 +204,10 @@ NSString * const MGMNoAuthor = @"No Author Found";
|
|||||||
}
|
}
|
||||||
[self reload:soundName];
|
[self reload:soundName];
|
||||||
}
|
}
|
||||||
- (void)sound:(NSSound *)sound didFinishPlaying:(BOOL)finishedPlaying {
|
- (void)soundDidFinishPlaying:(MGMSound *)theSound {
|
||||||
if (finishedPlaying) {
|
if (soundPlayer!=nil) {
|
||||||
if (soundPlayer!=nil) {
|
[soundPlayer release];
|
||||||
[soundPlayer release];
|
soundPlayer = nil;
|
||||||
soundPlayer = nil;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- (IBAction)stopSound:(id)sender {
|
- (IBAction)stopSound:(id)sender {
|
||||||
|
@ -63,21 +63,21 @@ NSString * const MGMSIPUserAreaCode = @"MGMVSIPUserAreaCode";
|
|||||||
}
|
}
|
||||||
- (void)dealloc {
|
- (void)dealloc {
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
|
if (calls!=nil) {
|
||||||
|
[calls removeAllObjects];
|
||||||
|
[calls release];
|
||||||
|
}
|
||||||
|
if (account!=nil) {
|
||||||
|
[account setDelegate:nil];
|
||||||
|
[account logout];
|
||||||
|
[account release];
|
||||||
|
}
|
||||||
if (contacts!=nil) {
|
if (contacts!=nil) {
|
||||||
[contacts stop];
|
[contacts stop];
|
||||||
[contacts release];
|
[contacts release];
|
||||||
}
|
}
|
||||||
if (user!=nil)
|
if (user!=nil)
|
||||||
[user release];
|
[user release];
|
||||||
if (account!=nil) {
|
|
||||||
[account setDelegate:nil];
|
|
||||||
[account logout];
|
|
||||||
[account release];
|
|
||||||
}
|
|
||||||
if (calls!=nil) {
|
|
||||||
[calls removeAllObjects];
|
|
||||||
[calls release];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)registerSettings {
|
- (void)registerSettings {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Contributing to VoiceMac.
|
Contributing to VoiceMac.
|
||||||
Contributing to MGMSIP is exactly the same as VoiceMac. However there may not be an about box.
If you want to contribute to VoiceMac, here is what I will do:
1. Add your name (and email if provided) to the change describing what you changed.
2. Add your name (and email/website if provided) to the contributors section.
|
Contributing to MGMSIP and MGMXML is exactly the same as VoiceMac. However there may not be an about box.
If you want to contribute to VoiceMac, here is what I will do:
1. Add your name (and email if provided) to the change describing what you changed.
2. Add your name (and email/website if provided) to the contributors section.
|
||||||
|
|
||||||
Terms for adding:
|
Terms for adding:
|
||||||
1. The patch must not disrupt up the functionality of VoiceMac.
2. The patch must provide useful changes.
|
1. The patch must not disrupt up the functionality of VoiceMac.
2. The patch must provide useful changes.
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface MGMHTTPCookieStorage : NSObject {
|
@interface MGMHTTPCookieStorage : NSObject {
|
||||||
@private
|
@private
|
||||||
@ -14,7 +18,9 @@
|
|||||||
NSHTTPCookieAcceptPolicy policy;
|
NSHTTPCookieAcceptPolicy policy;
|
||||||
NSMutableArray *cookieJar;
|
NSMutableArray *cookieJar;
|
||||||
}
|
}
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
+ (void)override;
|
+ (void)override;
|
||||||
|
#endif
|
||||||
+ (void)setCookieJarPath:(NSString *)thePath;
|
+ (void)setCookieJarPath:(NSString *)thePath;
|
||||||
+ (MGMHTTPCookieStorage *)sharedHTTPCookieStorage;
|
+ (MGMHTTPCookieStorage *)sharedHTTPCookieStorage;
|
||||||
+ (MGMHTTPCookieStorage *)sharedCookieStorageWithPath:(NSString *)thePath;
|
+ (MGMHTTPCookieStorage *)sharedCookieStorageWithPath:(NSString *)thePath;
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface NSString (MGMJSON)
|
@interface NSString (MGMJSON)
|
||||||
- (id)parseJSON;
|
- (id)parseJSON;
|
||||||
|
@ -6,11 +6,23 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
#import <Security/Security.h>
|
#import <Security/Security.h>
|
||||||
|
|
||||||
@class MGMKeychainItem;
|
@class MGMKeychainItem;
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
typedef enum {
|
||||||
|
kSecGenericPasswordItemClass,
|
||||||
|
kSecInternetPasswordItemClass,
|
||||||
|
kSecCertificateItemClass
|
||||||
|
} SecItemClass;
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface MGMKeychain : NSObject {
|
@interface MGMKeychain : NSObject {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,22 +6,128 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
#import <Security/Security.h>
|
#import <Security/Security.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
typedef enum {
|
||||||
|
kSecCreationDateItemAttr,
|
||||||
|
kSecModDateItemAttr,
|
||||||
|
kSecDescriptionItemAttr,
|
||||||
|
kSecCommentItemAttr,
|
||||||
|
kSecCreatorItemAttr,
|
||||||
|
kSecTypeItemAttr,
|
||||||
|
kSecLabelItemAttr,
|
||||||
|
kSecInvisibleItemAttr,
|
||||||
|
kSecNegativeItemAttr,
|
||||||
|
kSecAccountItemAttr,
|
||||||
|
kSecServiceItemAttr,
|
||||||
|
kSecGenericItemAttr,
|
||||||
|
kSecSecurityDomainItemAttr,
|
||||||
|
kSecServerItemAttr,
|
||||||
|
kSecAuthenticationTypeItemAttr,
|
||||||
|
kSecPortItemAttr,
|
||||||
|
kSecProtocolItemAttr,
|
||||||
|
kSecCertificateType,
|
||||||
|
kSecCertificateEncoding
|
||||||
|
} SecItemAttributes;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
kSecAuthenticationTypeNTLM,
|
||||||
|
kSecAuthenticationTypeMSN,
|
||||||
|
kSecAuthenticationTypeDPA,
|
||||||
|
kSecAuthenticationTypeRPA,
|
||||||
|
kSecAuthenticationTypeHTTPBasic,
|
||||||
|
kSecAuthenticationTypeHTTPDigest,
|
||||||
|
kSecAuthenticationTypeHTMLForm,
|
||||||
|
kSecAuthenticationTypeDefault
|
||||||
|
} SecAuthenticationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
kSecProtocolTypeFTP,
|
||||||
|
kSecProtocolTypeFTPAccount,
|
||||||
|
kSecProtocolTypeHTTP,
|
||||||
|
kSecProtocolTypeIRC,
|
||||||
|
kSecProtocolTypeNNTP,
|
||||||
|
kSecProtocolTypePOP3,
|
||||||
|
kSecProtocolTypeSMTP,
|
||||||
|
kSecProtocolTypeSOCKS,
|
||||||
|
kSecProtocolTypeIMAP,
|
||||||
|
kSecProtocolTypeLDAP,
|
||||||
|
kSecProtocolTypeAppleTalk,
|
||||||
|
kSecProtocolTypeAFP,
|
||||||
|
kSecProtocolTypeTelnet,
|
||||||
|
kSecProtocolTypeSSH,
|
||||||
|
kSecProtocolTypeFTPS,
|
||||||
|
kSecProtocolTypeHTTPS,
|
||||||
|
kSecProtocolTypeHTTPProxy,
|
||||||
|
kSecProtocolTypeHTTPSProxy,
|
||||||
|
kSecProtocolTypeFTPProxy,
|
||||||
|
kSecProtocolTypeSMB,
|
||||||
|
kSecProtocolTypeRTSP,
|
||||||
|
kSecProtocolTypeRTSPProxy,
|
||||||
|
kSecProtocolTypeDAAP,
|
||||||
|
kSecProtocolTypeEPPC,
|
||||||
|
kSecProtocolTypeIPP,
|
||||||
|
kSecProtocolTypeNNTPS,
|
||||||
|
kSecProtocolTypeLDAPS,
|
||||||
|
kSecProtocolTypeTelnetS,
|
||||||
|
kSecProtocolTypeIMAPS,
|
||||||
|
kSecProtocolTypeIRCS,
|
||||||
|
kSecProtocolTypePOP3S
|
||||||
|
} SecProtocolType;
|
||||||
|
|
||||||
|
|
||||||
|
// From OS X cssmtype.h
|
||||||
|
typedef enum {
|
||||||
|
CSSM_CERT_UNKNOWN = 0x00,
|
||||||
|
CSSM_CERT_X_509v1 = 0x01,
|
||||||
|
CSSM_CERT_X_509v2 = 0x02,
|
||||||
|
CSSM_CERT_X_509v3 = 0x03
|
||||||
|
} CSSM_CERT_TYPE;
|
||||||
|
typedef enum {
|
||||||
|
CSSM_CERT_ENCODING_UNKNOWN = 0x00,
|
||||||
|
CSSM_CERT_ENCODING_CUSTOM = 0x01,
|
||||||
|
CSSM_CERT_ENCODING_BER = 0x02,
|
||||||
|
CSSM_CERT_ENCODING_DER = 0x03
|
||||||
|
} CSSM_CERT_ENCODING;
|
||||||
|
#endif
|
||||||
|
|
||||||
@interface MGMKeychainItem : NSObject {
|
@interface MGMKeychainItem : NSObject {
|
||||||
@private
|
@private
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
NSMutableDictionary *keychainItem;
|
||||||
|
SecItemClass itemClass;
|
||||||
|
#else
|
||||||
SecKeychainItemRef keychainItem;
|
SecKeychainItemRef keychainItem;
|
||||||
|
#endif
|
||||||
int error;
|
int error;
|
||||||
}
|
}
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
+ (id)itemWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
|
||||||
|
- (id)initWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
|
||||||
|
- (NSDictionary *)keychainItem;
|
||||||
|
#else
|
||||||
+ (id)itemWithRef:(SecKeychainItemRef)theItem;
|
+ (id)itemWithRef:(SecKeychainItemRef)theItem;
|
||||||
- (id)initWithRef:(SecKeychainItemRef)theItem;
|
- (id)initWithRef:(SecKeychainItemRef)theItem;
|
||||||
- (SecKeychainItemRef)keychainItem;
|
- (SecKeychainItemRef)keychainItem;
|
||||||
|
#endif
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
- (NSString *)attributeKey:(SecItemAttributes)theAttribute;
|
||||||
|
#endif
|
||||||
- (SecItemClass)kind;
|
- (SecItemClass)kind;
|
||||||
- (NSString *)kindString;
|
- (NSString *)kindString;
|
||||||
- (BOOL)isInternetItem;
|
- (BOOL)isInternetItem;
|
||||||
- (BOOL)isGenericItem;
|
- (BOOL)isGenericItem;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (BOOL)isAppleShareItem;
|
- (BOOL)isAppleShareItem;
|
||||||
|
#endif
|
||||||
- (BOOL)isCertificate;
|
- (BOOL)isCertificate;
|
||||||
- (int)error;
|
- (int)error;
|
||||||
- (NSData *)data;
|
- (NSData *)data;
|
||||||
@ -33,10 +139,10 @@
|
|||||||
- (NSData *)attributeData:(int)theAttribute;
|
- (NSData *)attributeData:(int)theAttribute;
|
||||||
- (void)setString:(NSString *)theString forAttribute:(int)theAttribute;
|
- (void)setString:(NSString *)theString forAttribute:(int)theAttribute;
|
||||||
- (NSString *)attributeString:(int)theAttribute;
|
- (NSString *)attributeString:(int)theAttribute;
|
||||||
- (void)setCreationDate:(NSCalendarDate *)theDate;
|
- (void)setCreationDate:(NSDate *)theDate;
|
||||||
- (NSCalendarDate *)creationDate;
|
- (NSDate *)creationDate;
|
||||||
- (void)setModifiedDate:(NSCalendarDate *)theDate;
|
- (void)setModifiedDate:(NSDate *)theDate;
|
||||||
- (NSCalendarDate *)modifiedDate;
|
- (NSDate *)modifiedDate;
|
||||||
- (void)setDescription:(NSString *)theDescription;
|
- (void)setDescription:(NSString *)theDescription;
|
||||||
- (NSString *)description;
|
- (NSString *)description;
|
||||||
- (void)setComment:(NSString *)theComment;
|
- (void)setComment:(NSString *)theComment;
|
||||||
@ -51,8 +157,10 @@
|
|||||||
- (BOOL)isVisible;
|
- (BOOL)isVisible;
|
||||||
- (void)setPasswordValid:(BOOL)isPasswordValid;
|
- (void)setPasswordValid:(BOOL)isPasswordValid;
|
||||||
- (BOOL)isPasswordValid;
|
- (BOOL)isPasswordValid;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (void)setHasCustomIcon:(BOOL)hasCustomIcon;
|
- (void)setHasCustomIcon:(BOOL)hasCustomIcon;
|
||||||
- (BOOL)hasCustomIcon;
|
- (BOOL)hasCustomIcon;
|
||||||
|
#endif
|
||||||
- (void)setAccount:(NSString *)theAccount;
|
- (void)setAccount:(NSString *)theAccount;
|
||||||
- (NSString *)account;
|
- (NSString *)account;
|
||||||
- (void)setService:(NSString *)theService;
|
- (void)setService:(NSString *)theService;
|
||||||
@ -65,15 +173,17 @@
|
|||||||
- (NSString *)server;
|
- (NSString *)server;
|
||||||
- (void)setAuthenticationType:(SecAuthenticationType)theAuthenticationType;
|
- (void)setAuthenticationType:(SecAuthenticationType)theAuthenticationType;
|
||||||
- (SecAuthenticationType)authenticationType;
|
- (SecAuthenticationType)authenticationType;
|
||||||
- (NSString*)authenticationTypeString;
|
- (NSString *)authenticationTypeString;
|
||||||
- (void)setPort:(UInt16)thePort;
|
- (void)setPort:(UInt16)thePort;
|
||||||
- (UInt16)port;
|
- (UInt16)port;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (void)setVolume:(NSString *)theVolume;
|
- (void)setVolume:(NSString *)theVolume;
|
||||||
- (NSString *)volume;
|
- (NSString *)volume;
|
||||||
- (void)setAddress:(NSString *)theAddress;
|
- (void)setAddress:(NSString *)theAddress;
|
||||||
- (NSString *)address;
|
- (NSString *)address;
|
||||||
- (void)setSignature:(SecAFPServerSignature *)theSignature;
|
- (void)setSignature:(SecAFPServerSignature *)theSignature;
|
||||||
- (SecAFPServerSignature *)signature;
|
- (SecAFPServerSignature *)signature;
|
||||||
|
#endif
|
||||||
- (void)setProtocol:(SecProtocolType)theProtocol;
|
- (void)setProtocol:(SecProtocolType)theProtocol;
|
||||||
- (SecProtocolType)protocol;
|
- (SecProtocolType)protocol;
|
||||||
- (NSString *)protocolString;
|
- (NSString *)protocolString;
|
||||||
@ -81,13 +191,15 @@
|
|||||||
- (CSSM_CERT_TYPE)certificateType;
|
- (CSSM_CERT_TYPE)certificateType;
|
||||||
- (void)setCertificateEncoding:(CSSM_CERT_ENCODING)theCertificateEncoding;
|
- (void)setCertificateEncoding:(CSSM_CERT_ENCODING)theCertificateEncoding;
|
||||||
- (CSSM_CERT_ENCODING)certificateEncoding;
|
- (CSSM_CERT_ENCODING)certificateEncoding;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
- (void)setCRLType:(CSSM_CRL_TYPE)theCRLType;
|
- (void)setCRLType:(CSSM_CRL_TYPE)theCRLType;
|
||||||
- (CSSM_CRL_TYPE)CRLType;
|
- (CSSM_CRL_TYPE)CRLType;
|
||||||
- (NSString*)CRLTypeString;
|
- (NSString *)CRLTypeString;
|
||||||
- (void)setCRLEncoding:(CSSM_CRL_ENCODING)theCRLEncoding;
|
- (void)setCRLEncoding:(CSSM_CRL_ENCODING)theCRLEncoding;
|
||||||
- (CSSM_CRL_ENCODING)CRLEncoding;
|
- (CSSM_CRL_ENCODING)CRLEncoding;
|
||||||
- (NSString*)CRLEncodingString;
|
- (NSString *)CRLEncodingString;
|
||||||
- (void)setAlias:(BOOL)isAlias;
|
- (void)setAlias:(BOOL)isAlias;
|
||||||
- (BOOL)isAlias;
|
- (BOOL)isAlias;
|
||||||
|
#endif
|
||||||
- (void)remove;
|
- (void)remove;
|
||||||
@end
|
@end
|
@ -6,8 +6,13 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <sqlite3.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <MGMUsers/sqlite3.h>
|
#import <MGMUsers/sqlite3.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MGMLiteDebug 0
|
#define MGMLiteDebug 0
|
||||||
|
|
||||||
|
@ -6,9 +6,13 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <sqlite3.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
#import <MGMUsers/sqlite3.h>
|
#import <MGMUsers/sqlite3.h>
|
||||||
|
#endif
|
||||||
@class MGMLiteConnection;
|
@class MGMLiteConnection;
|
||||||
|
|
||||||
@interface MGMLiteResult : NSObject {
|
@interface MGMLiteResult : NSObject {
|
||||||
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern NSString * const MGMUserStartNotification;
|
extern NSString * const MGMUserStartNotification;
|
||||||
extern NSString * const MGMUserDoneNotification;
|
extern NSString * const MGMUserDoneNotification;
|
||||||
|
@ -7,6 +7,18 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
|
#import <MGMUsers/MGMKeychainItem.h>
|
||||||
|
#import <MGMUsers/MGMUser.h>
|
||||||
|
#import <MGMUsers/MGMHTTPCookieStorage.h>
|
||||||
|
#import <MGMUsers/MGMURLConnectionManager.h>
|
||||||
|
#import <MGMUsers/MGMJSON.h>
|
||||||
|
#import <MGMUsers/MGMLiteConnection.h>
|
||||||
|
#import <MGMUsers/MGMLiteResult.h>
|
||||||
|
#import <MGMUsers/MGMWhitePages.h>
|
||||||
|
#import <MGMUsers/MGMMD5.h>
|
||||||
|
#else
|
||||||
#import <MGMUsers/MGMKeychain.h>
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
#import <MGMUsers/MGMKeychainItem.h>
|
#import <MGMUsers/MGMKeychainItem.h>
|
||||||
#import <MGMUsers/MGMUser.h>
|
#import <MGMUsers/MGMUser.h>
|
||||||
@ -19,4 +31,5 @@
|
|||||||
#import <MGMUsers/MGMLiteResult.h>
|
#import <MGMUsers/MGMLiteResult.h>
|
||||||
#import <MGMUsers/MGMWhitePages.h>
|
#import <MGMUsers/MGMWhitePages.h>
|
||||||
#import <MGMUsers/MGMTaskManager.h>
|
#import <MGMUsers/MGMTaskManager.h>
|
||||||
#import <MGMUsers/MGMMD5.h>
|
#import <MGMUsers/MGMMD5.h>
|
||||||
|
#endif
|
@ -6,7 +6,11 @@
|
|||||||
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
extern NSString * const MGMWPDelegate;
|
extern NSString * const MGMWPDelegate;
|
||||||
extern NSString * const MGMWPDidFindInfo;
|
extern NSString * const MGMWPDidFindInfo;
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
40
Libraries/include/MGMUsers/MGMHTTPCookieStorage.h
Normal file
40
Libraries/include/MGMUsers/MGMHTTPCookieStorage.h
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// MGMHTTPCookieStorage.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 12/28/08.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@interface MGMHTTPCookieStorage : NSObject {
|
||||||
|
@private
|
||||||
|
NSString *cookiesPath;
|
||||||
|
NSHTTPCookieAcceptPolicy policy;
|
||||||
|
NSMutableArray *cookieJar;
|
||||||
|
}
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
+ (void)override;
|
||||||
|
#endif
|
||||||
|
+ (void)setCookieJarPath:(NSString *)thePath;
|
||||||
|
+ (MGMHTTPCookieStorage *)sharedHTTPCookieStorage;
|
||||||
|
+ (MGMHTTPCookieStorage *)sharedCookieStorageWithPath:(NSString *)thePath;
|
||||||
|
+ (void)releaseShared;
|
||||||
|
+ (MGMHTTPCookieStorage *)cookieStorageWithPath:(NSString *)thePath;
|
||||||
|
- (id)initWithPath:(NSString *)thePath;
|
||||||
|
- (NSArray *)cookies;
|
||||||
|
- (void)removeAllCookies;
|
||||||
|
- (void)setNewPath:(NSString *)thePath;
|
||||||
|
- (void)setCookie:(NSHTTPCookie *)theCookie;
|
||||||
|
- (void)setCookies:(NSArray *)theCookies;
|
||||||
|
- (void)deleteCookie:(NSHTTPCookie *)theCookie;
|
||||||
|
- (NSArray *)cookiesForURL:(NSURL *)theURL;
|
||||||
|
- (void)setCookies:(NSArray *)theCookies forURL:(NSURL *)theURL mainDocumentURL:(NSURL *)theMainDocumentURL;
|
||||||
|
- (NSHTTPCookieAcceptPolicy)cookieAcceptPolicy;
|
||||||
|
- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)cookieAcceptPolicy;
|
||||||
|
@end
|
62
Libraries/include/MGMUsers/MGMJSON.h
Normal file
62
Libraries/include/MGMUsers/MGMJSON.h
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// MGMJSON.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 7/31/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@interface NSString (MGMJSON)
|
||||||
|
- (id)parseJSON;
|
||||||
|
- (NSString *)JSONValue;
|
||||||
|
@end
|
||||||
|
@interface NSData (MGMJSON)
|
||||||
|
- (id)parseJSON;
|
||||||
|
@end
|
||||||
|
@interface NSNumber (MGMJSON)
|
||||||
|
- (NSString *)JSONValue;
|
||||||
|
@end
|
||||||
|
@interface NSNull (MGMJSON)
|
||||||
|
- (NSString *)JSONValue;
|
||||||
|
@end
|
||||||
|
@interface NSDictionary (MGMJSON)
|
||||||
|
- (NSString *)JSONValue;
|
||||||
|
@end
|
||||||
|
@interface NSArray (MGMJSON)
|
||||||
|
- (NSString *)JSONValue;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface MGMJSON : NSObject {
|
||||||
|
@private
|
||||||
|
NSMutableCharacterSet *escapeSet;
|
||||||
|
NSString *JSONString;
|
||||||
|
unsigned long position;
|
||||||
|
unsigned long length;
|
||||||
|
}
|
||||||
|
- (id)initWithString:(NSString *)theString;
|
||||||
|
- (id)parse;
|
||||||
|
- (void)skipWhitespace;
|
||||||
|
- (void)skipDigits;
|
||||||
|
- (id)parseForObject;
|
||||||
|
- (NSDictionary *)parseForDictionary;
|
||||||
|
- (NSArray *)parseForArray;
|
||||||
|
- (NSString *)parseForString;
|
||||||
|
- (unichar)parseForUnicodeChar;
|
||||||
|
- (NSNumber *)parseForYES;
|
||||||
|
- (id)parseForNONULL;
|
||||||
|
- (NSNumber *)parseForNumber;
|
||||||
|
|
||||||
|
- (NSString *)convert:(id)theObject;
|
||||||
|
- (NSString *)writeString:(NSString *)theString;
|
||||||
|
- (NSString *)writeNumber:(NSNumber *)theNumber;
|
||||||
|
- (NSString *)writeBool:(NSNumber *)theNumber;
|
||||||
|
- (NSString *)writeNull:(NSNull *)theNull;
|
||||||
|
- (NSString *)writeDictionary:(NSDictionary *)theDictionary;
|
||||||
|
- (NSString *)writeArray:(NSArray *)theArray;
|
||||||
|
@end
|
35
Libraries/include/MGMUsers/MGMKeychain.h
Normal file
35
Libraries/include/MGMUsers/MGMKeychain.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
//
|
||||||
|
// MGMKeychain.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 4/3/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <Security/Security.h>
|
||||||
|
|
||||||
|
@class MGMKeychainItem;
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
typedef enum {
|
||||||
|
kSecGenericPasswordItemClass,
|
||||||
|
kSecInternetPasswordItemClass,
|
||||||
|
kSecCertificateItemClass
|
||||||
|
} SecItemClass;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@interface MGMKeychain : NSObject {
|
||||||
|
|
||||||
|
}
|
||||||
|
+ (BOOL)itemExists:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount;
|
||||||
|
+ (BOOL)itemExists:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount itemClass:(SecItemClass)theClass;
|
||||||
|
+ (NSArray *)items:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount;
|
||||||
|
+ (NSArray *)items:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount itemClass:(SecItemClass)theClass;
|
||||||
|
+ (MGMKeychainItem *)addItem:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount password:(NSString *)thePassword;
|
||||||
|
+ (MGMKeychainItem *)addItem:(NSString *)theDescription withName:(NSString *)theName service:(NSString *)theService account:(NSString *)theAccount password:(NSString *)thePassword itemClass:(SecItemClass)theClass;
|
||||||
|
@end
|
205
Libraries/include/MGMUsers/MGMKeychainItem.h
Normal file
205
Libraries/include/MGMUsers/MGMKeychainItem.h
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
//
|
||||||
|
// MGMKeychainItem.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 4/14/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
|
#import <Security/Security.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
typedef enum {
|
||||||
|
kSecCreationDateItemAttr,
|
||||||
|
kSecModDateItemAttr,
|
||||||
|
kSecDescriptionItemAttr,
|
||||||
|
kSecCommentItemAttr,
|
||||||
|
kSecCreatorItemAttr,
|
||||||
|
kSecTypeItemAttr,
|
||||||
|
kSecLabelItemAttr,
|
||||||
|
kSecInvisibleItemAttr,
|
||||||
|
kSecNegativeItemAttr,
|
||||||
|
kSecAccountItemAttr,
|
||||||
|
kSecServiceItemAttr,
|
||||||
|
kSecGenericItemAttr,
|
||||||
|
kSecSecurityDomainItemAttr,
|
||||||
|
kSecServerItemAttr,
|
||||||
|
kSecAuthenticationTypeItemAttr,
|
||||||
|
kSecPortItemAttr,
|
||||||
|
kSecProtocolItemAttr,
|
||||||
|
kSecCertificateType,
|
||||||
|
kSecCertificateEncoding
|
||||||
|
} SecItemAttributes;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
kSecAuthenticationTypeNTLM,
|
||||||
|
kSecAuthenticationTypeMSN,
|
||||||
|
kSecAuthenticationTypeDPA,
|
||||||
|
kSecAuthenticationTypeRPA,
|
||||||
|
kSecAuthenticationTypeHTTPBasic,
|
||||||
|
kSecAuthenticationTypeHTTPDigest,
|
||||||
|
kSecAuthenticationTypeHTMLForm,
|
||||||
|
kSecAuthenticationTypeDefault
|
||||||
|
} SecAuthenticationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
kSecProtocolTypeFTP,
|
||||||
|
kSecProtocolTypeFTPAccount,
|
||||||
|
kSecProtocolTypeHTTP,
|
||||||
|
kSecProtocolTypeIRC,
|
||||||
|
kSecProtocolTypeNNTP,
|
||||||
|
kSecProtocolTypePOP3,
|
||||||
|
kSecProtocolTypeSMTP,
|
||||||
|
kSecProtocolTypeSOCKS,
|
||||||
|
kSecProtocolTypeIMAP,
|
||||||
|
kSecProtocolTypeLDAP,
|
||||||
|
kSecProtocolTypeAppleTalk,
|
||||||
|
kSecProtocolTypeAFP,
|
||||||
|
kSecProtocolTypeTelnet,
|
||||||
|
kSecProtocolTypeSSH,
|
||||||
|
kSecProtocolTypeFTPS,
|
||||||
|
kSecProtocolTypeHTTPS,
|
||||||
|
kSecProtocolTypeHTTPProxy,
|
||||||
|
kSecProtocolTypeHTTPSProxy,
|
||||||
|
kSecProtocolTypeFTPProxy,
|
||||||
|
kSecProtocolTypeSMB,
|
||||||
|
kSecProtocolTypeRTSP,
|
||||||
|
kSecProtocolTypeRTSPProxy,
|
||||||
|
kSecProtocolTypeDAAP,
|
||||||
|
kSecProtocolTypeEPPC,
|
||||||
|
kSecProtocolTypeIPP,
|
||||||
|
kSecProtocolTypeNNTPS,
|
||||||
|
kSecProtocolTypeLDAPS,
|
||||||
|
kSecProtocolTypeTelnetS,
|
||||||
|
kSecProtocolTypeIMAPS,
|
||||||
|
kSecProtocolTypeIRCS,
|
||||||
|
kSecProtocolTypePOP3S
|
||||||
|
} SecProtocolType;
|
||||||
|
|
||||||
|
|
||||||
|
// From OS X cssmtype.h
|
||||||
|
typedef enum {
|
||||||
|
CSSM_CERT_UNKNOWN = 0x00,
|
||||||
|
CSSM_CERT_X_509v1 = 0x01,
|
||||||
|
CSSM_CERT_X_509v2 = 0x02,
|
||||||
|
CSSM_CERT_X_509v3 = 0x03
|
||||||
|
} CSSM_CERT_TYPE;
|
||||||
|
typedef enum {
|
||||||
|
CSSM_CERT_ENCODING_UNKNOWN = 0x00,
|
||||||
|
CSSM_CERT_ENCODING_CUSTOM = 0x01,
|
||||||
|
CSSM_CERT_ENCODING_BER = 0x02,
|
||||||
|
CSSM_CERT_ENCODING_DER = 0x03
|
||||||
|
} CSSM_CERT_ENCODING;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@interface MGMKeychainItem : NSObject {
|
||||||
|
@private
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
NSMutableDictionary *keychainItem;
|
||||||
|
SecItemClass itemClass;
|
||||||
|
#else
|
||||||
|
SecKeychainItemRef keychainItem;
|
||||||
|
#endif
|
||||||
|
int error;
|
||||||
|
}
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
+ (id)itemWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
|
||||||
|
- (id)initWithDictionary:(NSDictionary *)theKeychainItem itemClass:(SecItemClass)theClass;
|
||||||
|
- (NSDictionary *)keychainItem;
|
||||||
|
#else
|
||||||
|
+ (id)itemWithRef:(SecKeychainItemRef)theItem;
|
||||||
|
- (id)initWithRef:(SecKeychainItemRef)theItem;
|
||||||
|
- (SecKeychainItemRef)keychainItem;
|
||||||
|
#endif
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
- (NSString *)attributeKey:(SecItemAttributes)theAttribute;
|
||||||
|
#endif
|
||||||
|
- (SecItemClass)kind;
|
||||||
|
- (NSString *)kindString;
|
||||||
|
- (BOOL)isInternetItem;
|
||||||
|
- (BOOL)isGenericItem;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
- (BOOL)isAppleShareItem;
|
||||||
|
#endif
|
||||||
|
- (BOOL)isCertificate;
|
||||||
|
- (int)error;
|
||||||
|
- (NSData *)data;
|
||||||
|
- (void)setData:(NSData *)theData;
|
||||||
|
- (NSString *)string;
|
||||||
|
- (void)setString:(NSString *)theString;
|
||||||
|
- (void)setData:(NSData *)theData forAttribute:(int)theAttribute;
|
||||||
|
- (void)setBool:(BOOL)theBool forAttribute:(int)theAttribute;
|
||||||
|
- (NSData *)attributeData:(int)theAttribute;
|
||||||
|
- (void)setString:(NSString *)theString forAttribute:(int)theAttribute;
|
||||||
|
- (NSString *)attributeString:(int)theAttribute;
|
||||||
|
- (void)setCreationDate:(NSDate *)theDate;
|
||||||
|
- (NSDate *)creationDate;
|
||||||
|
- (void)setModifiedDate:(NSDate *)theDate;
|
||||||
|
- (NSDate *)modifiedDate;
|
||||||
|
- (void)setDescription:(NSString *)theDescription;
|
||||||
|
- (NSString *)description;
|
||||||
|
- (void)setComment:(NSString *)theComment;
|
||||||
|
- (NSString *)comment;
|
||||||
|
- (void)setCreator:(NSString *)theCreator;
|
||||||
|
- (NSString *)creator;
|
||||||
|
- (void)setType:(NSString *)theType;
|
||||||
|
- (NSString *)type;
|
||||||
|
- (void)setName:(NSString *)theName;
|
||||||
|
- (NSString *)name;
|
||||||
|
- (void)setVisible:(BOOL)isVisible;
|
||||||
|
- (BOOL)isVisible;
|
||||||
|
- (void)setPasswordValid:(BOOL)isPasswordValid;
|
||||||
|
- (BOOL)isPasswordValid;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
- (void)setHasCustomIcon:(BOOL)hasCustomIcon;
|
||||||
|
- (BOOL)hasCustomIcon;
|
||||||
|
#endif
|
||||||
|
- (void)setAccount:(NSString *)theAccount;
|
||||||
|
- (NSString *)account;
|
||||||
|
- (void)setService:(NSString *)theService;
|
||||||
|
- (NSString *)service;
|
||||||
|
- (void)setAttribute:(NSString *)theAttribute;
|
||||||
|
- (NSString *)attribute;
|
||||||
|
- (void)setSecurityDomain:(NSString *)theSecurityDomain;
|
||||||
|
- (NSString *)securityDomain;
|
||||||
|
- (void)setServer:(NSString *)theServer;
|
||||||
|
- (NSString *)server;
|
||||||
|
- (void)setAuthenticationType:(SecAuthenticationType)theAuthenticationType;
|
||||||
|
- (SecAuthenticationType)authenticationType;
|
||||||
|
- (NSString *)authenticationTypeString;
|
||||||
|
- (void)setPort:(UInt16)thePort;
|
||||||
|
- (UInt16)port;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
- (void)setVolume:(NSString *)theVolume;
|
||||||
|
- (NSString *)volume;
|
||||||
|
- (void)setAddress:(NSString *)theAddress;
|
||||||
|
- (NSString *)address;
|
||||||
|
- (void)setSignature:(SecAFPServerSignature *)theSignature;
|
||||||
|
- (SecAFPServerSignature *)signature;
|
||||||
|
#endif
|
||||||
|
- (void)setProtocol:(SecProtocolType)theProtocol;
|
||||||
|
- (SecProtocolType)protocol;
|
||||||
|
- (NSString *)protocolString;
|
||||||
|
- (void)setCertificateType:(CSSM_CERT_TYPE)theCertificateType;
|
||||||
|
- (CSSM_CERT_TYPE)certificateType;
|
||||||
|
- (void)setCertificateEncoding:(CSSM_CERT_ENCODING)theCertificateEncoding;
|
||||||
|
- (CSSM_CERT_ENCODING)certificateEncoding;
|
||||||
|
#if !TARGET_OS_IPHONE
|
||||||
|
- (void)setCRLType:(CSSM_CRL_TYPE)theCRLType;
|
||||||
|
- (CSSM_CRL_TYPE)CRLType;
|
||||||
|
- (NSString *)CRLTypeString;
|
||||||
|
- (void)setCRLEncoding:(CSSM_CRL_ENCODING)theCRLEncoding;
|
||||||
|
- (CSSM_CRL_ENCODING)CRLEncoding;
|
||||||
|
- (NSString *)CRLEncodingString;
|
||||||
|
- (void)setAlias:(BOOL)isAlias;
|
||||||
|
- (BOOL)isAlias;
|
||||||
|
#endif
|
||||||
|
- (void)remove;
|
||||||
|
@end
|
51
Libraries/include/MGMUsers/MGMLiteConnection.h
Normal file
51
Libraries/include/MGMUsers/MGMLiteConnection.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
//
|
||||||
|
// MGMLiteConnection.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 8/13/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <sqlite3.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <MGMUsers/sqlite3.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MGMLiteDebug 0
|
||||||
|
|
||||||
|
@class MGMLiteResult;
|
||||||
|
|
||||||
|
@interface MGMLiteConnection : NSObject {
|
||||||
|
sqlite3 *SQLiteConnection;
|
||||||
|
NSString *path;
|
||||||
|
BOOL isConnected;
|
||||||
|
NSCharacterSet *escapeSet;
|
||||||
|
BOOL logQuery;
|
||||||
|
}
|
||||||
|
+ (id)memoryConnection;
|
||||||
|
+ (id)connectionWithPath:(NSString *)thePath;
|
||||||
|
- (id)initWithPath:(NSString *)thePath;
|
||||||
|
|
||||||
|
- (sqlite3 *)SQLiteConnection;
|
||||||
|
- (NSString *)path;
|
||||||
|
|
||||||
|
- (NSString *)errorMessage;
|
||||||
|
- (int)errorID;
|
||||||
|
|
||||||
|
- (NSString *)escapeData:(NSData *)theData;
|
||||||
|
- (NSString *)escapeString:(NSString *)theString;
|
||||||
|
- (NSString *)quoteObject:(id)theObject;
|
||||||
|
- (NSString *)quoteChar:(const char *)theChar;
|
||||||
|
|
||||||
|
- (BOOL)logQuery;
|
||||||
|
- (void)setLogQuery:(BOOL)shouldLogQuery;
|
||||||
|
- (MGMLiteResult *)query:(NSString *)format, ...;
|
||||||
|
- (MGMLiteResult *)tables;
|
||||||
|
- (MGMLiteResult *)tablesLike:(NSString *)theName;
|
||||||
|
- (MGMLiteResult *)columnsFromTable:(NSString *)theTable;
|
||||||
|
- (int)affectedRows;
|
||||||
|
- (long long int)insertId;
|
||||||
|
@end
|
42
Libraries/include/MGMUsers/MGMLiteResult.h
Normal file
42
Libraries/include/MGMUsers/MGMLiteResult.h
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
//
|
||||||
|
// MGMLiteResult.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 8/13/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#import <sqlite3.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <MGMUsers/sqlite3.h>
|
||||||
|
#endif
|
||||||
|
@class MGMLiteConnection;
|
||||||
|
|
||||||
|
@interface MGMLiteResult : NSObject {
|
||||||
|
MGMLiteConnection *connection;
|
||||||
|
sqlite3_stmt *result;
|
||||||
|
NSArray *columnNames;
|
||||||
|
int columnCount;
|
||||||
|
}
|
||||||
|
+ (id)resultWithConnection:(MGMLiteConnection *)theConnection result:(sqlite3_stmt *)theResult;
|
||||||
|
- (id)initWithConnection:(MGMLiteConnection *)theConnection result:(sqlite3_stmt *)theResult;
|
||||||
|
|
||||||
|
- (int)dataCount;
|
||||||
|
- (int)columnCount;
|
||||||
|
- (NSString *)columnName:(int)theColumn;
|
||||||
|
- (NSArray *)columnNames;
|
||||||
|
|
||||||
|
- (NSNumber *)integerAtColumn:(int)theColumn;
|
||||||
|
- (NSNumber *)doubleAtColumn:(int)theColumn;
|
||||||
|
- (NSString *)stringAtColumn:(int)theColumn;
|
||||||
|
- (NSData *)dataAtColumn:(int)theColumn;
|
||||||
|
- (id)objectAtColumn:(int)theColumn;
|
||||||
|
|
||||||
|
- (NSArray *)nextRowAsArray;
|
||||||
|
- (NSDictionary *)nextRow;
|
||||||
|
- (int)step;
|
||||||
|
- (int)reset;
|
||||||
|
@end
|
48
Libraries/include/MGMUsers/MGMMD5.h
Normal file
48
Libraries/include/MGMUsers/MGMMD5.h
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
//
|
||||||
|
// MGMMD5.h
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko <GRMrGecko@gmail.com> on 1/6/10.
|
||||||
|
// No Copyright Claimed. Public Domain.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifndef _MD_MD5
|
||||||
|
#define _MD_MD5
|
||||||
|
|
||||||
|
#ifdef __NEXT_RUNTIME__
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
|
||||||
|
extern NSString * const MDNMD5;
|
||||||
|
|
||||||
|
@interface NSString (MGMMD5)
|
||||||
|
- (NSString *)MD5;
|
||||||
|
- (NSString *)pathMD5;
|
||||||
|
@end
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char *MD5String(const char *string, int length);
|
||||||
|
char *MD5File(const char *path);
|
||||||
|
|
||||||
|
#define MD5Length 16
|
||||||
|
#define MD5BufferSize 4
|
||||||
|
|
||||||
|
struct MD5Context {
|
||||||
|
uint32_t buf[MD5BufferSize];
|
||||||
|
uint32_t bits[2];
|
||||||
|
unsigned char in[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
void MD5Init(struct MD5Context *context);
|
||||||
|
void MD5Update(struct MD5Context *context, const unsigned char *buf, unsigned len);
|
||||||
|
void MD5Final(unsigned char digest[MD5Length], struct MD5Context *context);
|
||||||
|
void MD5Transform(uint32_t buf[MD5BufferSize], const unsigned char inraw[64]);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
100
Libraries/include/MGMUsers/MGMMDTypes.h
Normal file
100
Libraries/include/MGMUsers/MGMMDTypes.h
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
//
|
||||||
|
// MGMMDTypes.h
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 2/24/10.
|
||||||
|
// No Copyright Claimed. Public Domain.
|
||||||
|
//
|
||||||
|
|
||||||
|
#ifdef __NEXT_RUNTIME__
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define INT64(n) n ## ULL
|
||||||
|
|
||||||
|
#define ROR32(x, b) ((x >> b) | (x << (32 - b)))
|
||||||
|
#define ROR64(x, b) ((x >> b) | (x << (64 - b)))
|
||||||
|
#define SHR(x, b) (x >> b)
|
||||||
|
|
||||||
|
#define MDFileReadLength 1048576
|
||||||
|
|
||||||
|
static const char hexdigits[] = "0123456789abcdef";
|
||||||
|
|
||||||
|
static const unsigned char MDPadding[128] =
|
||||||
|
{
|
||||||
|
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
static uint32_t getu32(const uint8_t *addr) {
|
||||||
|
return ((uint32_t)addr[0] << 24)
|
||||||
|
| ((uint32_t)addr[1] << 16)
|
||||||
|
| ((uint32_t)addr[2] << 8)
|
||||||
|
| ((uint32_t)addr[3]);
|
||||||
|
}
|
||||||
|
static void putu32(uint32_t data, uint8_t *addr) {
|
||||||
|
addr[0] = (uint8_t)(data >> 24);
|
||||||
|
addr[1] = (uint8_t)(data >> 16);
|
||||||
|
addr[2] = (uint8_t)(data >> 8);
|
||||||
|
addr[3] = (uint8_t)data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint64_t getu64(const uint8_t *addr) {
|
||||||
|
return ((uint64_t)addr[0] << 56)
|
||||||
|
| ((uint64_t)addr[1] << 48)
|
||||||
|
| ((uint64_t)addr[2] << 40)
|
||||||
|
| ((uint64_t)addr[3] << 32)
|
||||||
|
| ((uint64_t)addr[4] << 24)
|
||||||
|
| ((uint64_t)addr[5] << 16)
|
||||||
|
| ((uint64_t)addr[6] << 8)
|
||||||
|
| ((uint64_t)addr[7]);
|
||||||
|
}
|
||||||
|
static void putu64(uint64_t data, uint8_t *addr) {
|
||||||
|
addr[0] = (uint8_t)(data >> 56);
|
||||||
|
addr[1] = (uint8_t)(data >> 48);
|
||||||
|
addr[2] = (uint8_t)(data >> 40);
|
||||||
|
addr[3] = (uint8_t)(data >> 32);
|
||||||
|
addr[4] = (uint8_t)(data >> 24);
|
||||||
|
addr[5] = (uint8_t)(data >> 16);
|
||||||
|
addr[6] = (uint8_t)(data >> 8);
|
||||||
|
addr[7] = (uint8_t)data;
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint32_t getu32l(const uint8_t *addr) {
|
||||||
|
return ((uint32_t)addr[0])
|
||||||
|
| ((uint32_t)addr[1] << 8)
|
||||||
|
| ((uint32_t)addr[2] << 16)
|
||||||
|
| ((uint32_t)addr[3] << 24);
|
||||||
|
}
|
||||||
|
static void putu32l(uint32_t data, uint8_t *addr) {
|
||||||
|
addr[0] = (uint8_t)data;
|
||||||
|
addr[1] = (uint8_t)(data >> 8);
|
||||||
|
addr[2] = (uint8_t)(data >> 16);
|
||||||
|
addr[3] = (uint8_t)(data >> 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
static uint64_t getu64l(const uint8_t *addr) {
|
||||||
|
return ((uint64_t)addr[0])
|
||||||
|
| ((uint64_t)addr[1] << 8)
|
||||||
|
| ((uint64_t)addr[2] << 16)
|
||||||
|
| ((uint64_t)addr[3] << 24)
|
||||||
|
| ((uint64_t)addr[4] << 32)
|
||||||
|
| ((uint64_t)addr[5] << 40)
|
||||||
|
| ((uint64_t)addr[6] << 48)
|
||||||
|
| ((uint64_t)addr[7] << 56);
|
||||||
|
}
|
||||||
|
static void putu64l(uint64_t data, uint8_t *addr) {
|
||||||
|
addr[0] = (uint8_t)data;
|
||||||
|
addr[1] = (uint8_t)(data >> 8);
|
||||||
|
addr[2] = (uint8_t)(data >> 16);
|
||||||
|
addr[3] = (uint8_t)(data >> 24);
|
||||||
|
addr[4] = (uint8_t)(data >> 32);
|
||||||
|
addr[5] = (uint8_t)(data >> 40);
|
||||||
|
addr[6] = (uint8_t)(data >> 48);
|
||||||
|
addr[7] = (uint8_t)(data >> 56);
|
||||||
|
}
|
54
Libraries/include/MGMUsers/MGMURLConnectionManager.h
Normal file
54
Libraries/include/MGMUsers/MGMURLConnectionManager.h
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// MGMURLConnectionManager.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 7/23/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <Foundation/Foundation.h>
|
||||||
|
|
||||||
|
extern NSString * const MGMCookie;
|
||||||
|
extern NSString * const MGMUserAgent;
|
||||||
|
|
||||||
|
extern NSString * const MGMConnectionObject;
|
||||||
|
extern NSString * const MGMConnectionRequest;
|
||||||
|
extern NSString * const MGMConnectionOldRequest;
|
||||||
|
extern NSString * const MGMConnectionResponse;
|
||||||
|
extern NSString * const MGMConnectionDelegate;
|
||||||
|
extern NSString * const MGMConnectionDidReceiveResponse;
|
||||||
|
extern NSString * const MGMConnectionDidReceiveData;
|
||||||
|
extern NSString * const MGMConnectionWillRedirect;
|
||||||
|
extern NSString * const MGMConnectionDidFailWithError;
|
||||||
|
extern NSString * const MGMConnectionDidFinish;
|
||||||
|
extern NSString * const MGMConnectionInvisible;
|
||||||
|
extern NSString * const MGMConnectionData;
|
||||||
|
|
||||||
|
@interface MGMURLConnectionManager : NSObject {
|
||||||
|
@private
|
||||||
|
NSHTTPCookieStorage *cookieStorage;
|
||||||
|
NSMutableArray *connections;
|
||||||
|
NSURLConnection *connection;
|
||||||
|
NSMutableData *receivedData;
|
||||||
|
NSString *customUseragent;
|
||||||
|
NSURLCredential *credentials;
|
||||||
|
}
|
||||||
|
+ (id)defaultManager;
|
||||||
|
+ (id)managerWithCookieStorage:(id)theCookieStorage;
|
||||||
|
- (id)initWithCookieStorage:(id)theCookieStorage;
|
||||||
|
- (NSHTTPCookieStorage *)cookieStorage;
|
||||||
|
- (void)setCredentials:(NSURLCredential *)theCredentials;
|
||||||
|
- (NSURLCredential *)credentials;
|
||||||
|
- (void)setCookieStorage:(id)theCookieStorage;
|
||||||
|
- (NSString *)customUseragent;
|
||||||
|
- (void)setCustomUseragent:(NSString *)theCustomUseragent;
|
||||||
|
- (NSData *)synchronousRequest:(NSURLRequest *)theRequest returningResponse:(NSURLResponse **)theResponse error:(NSError **)theError;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate object:(id)theObject;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate didFailWithError:(SEL)didFailWithError didFinish:(SEL)didFinish invisible:(BOOL)isInvisible object:(id)theObject;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate didReceiveResponse:(SEL)didReceiveResponse didFailWithError:(SEL)didFailWithError didFinish:(SEL)didFinish invisible:(BOOL)isInvisible object:(id)theObject;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate didReceiveResponse:(SEL)didReceiveResponse willRedirect:(SEL)willRedirect didFailWithError:(SEL)didFailWithError didFinish:(SEL)didFinish invisible:(BOOL)isInvisible object:(id)theObject;
|
||||||
|
- (void)connectionWithRequest:(NSURLRequest *)theRequest delegate:(id)theDelegate didReceiveResponse:(SEL)didReceiveResponse didReceiveData:(SEL)didReceiveData willRedirect:(SEL)willRedirect didFailWithError:(SEL)didFailWithError didFinish:(SEL)didFinish invisible:(BOOL)isInvisible object:(id)theObject;
|
||||||
|
- (void)cancelCurrent;
|
||||||
|
- (void)cancelAll;
|
||||||
|
@end
|
66
Libraries/include/MGMUsers/MGMUser.h
Normal file
66
Libraries/include/MGMUsers/MGMUser.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
//
|
||||||
|
// MGMUser.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 7/4/10.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern NSString * const MGMUserStartNotification;
|
||||||
|
extern NSString * const MGMUserDoneNotification;
|
||||||
|
extern NSString * const MGMUserUpdatedNotification;
|
||||||
|
extern NSString * const MGMUserID;
|
||||||
|
extern NSString * const MGMUserName;
|
||||||
|
|
||||||
|
@class MGMUser, MGMKeychainItem, MGMHTTPCookieStorage;
|
||||||
|
|
||||||
|
@protocol MGMUserDelegate <NSObject>
|
||||||
|
- (BOOL)isUserDone:(MGMUser *)theUser;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface MGMUser : NSObject {
|
||||||
|
@private
|
||||||
|
id<MGMUserDelegate> delegate;
|
||||||
|
MGMKeychainItem *keychainItem;
|
||||||
|
NSMutableDictionary *settings;
|
||||||
|
}
|
||||||
|
+ (NSString *)applicationSupportPath;
|
||||||
|
+ (NSString *)cachePath;
|
||||||
|
+ (NSString *)cookieStoragePath;
|
||||||
|
+ (MGMHTTPCookieStorage *)cookieStorage;
|
||||||
|
+ (NSMutableDictionary *)usersPlist;
|
||||||
|
+ (NSArray *)users;
|
||||||
|
+ (NSArray *)userNames;
|
||||||
|
+ (NSArray *)lastUsers;
|
||||||
|
+ (MGMUser *)userWithName:(NSString *)theName;
|
||||||
|
+ (MGMUser *)userWithID:(NSString *)theID;
|
||||||
|
+ (MGMUser *)createUserWithName:(NSString *)theName password:(NSString *)thePassword;
|
||||||
|
- (id)initWithSettings:(NSDictionary *)theSettings;
|
||||||
|
- (BOOL)isEqual:(id)theObject;
|
||||||
|
- (id<MGMUserDelegate>)delegate;
|
||||||
|
- (void)setDelegate:(id)theDelegate;
|
||||||
|
- (MGMKeychainItem *)keychainItem;
|
||||||
|
- (void)start;
|
||||||
|
- (BOOL)isStarted;
|
||||||
|
- (id)settingForKey:(NSString *)theKey;
|
||||||
|
- (void)setSetting:(id)theSetting forKey:(NSString *)theKey;
|
||||||
|
- (BOOL)boolForKey:(NSString *)theKey;
|
||||||
|
- (void)setBool:(BOOL)theBool forKey:(NSString *)theKey;
|
||||||
|
- (NSString *)settingsPath;
|
||||||
|
- (NSDictionary *)settings;
|
||||||
|
- (void)registerSettings:(NSDictionary *)theSettings;
|
||||||
|
- (NSString *)supportPath;
|
||||||
|
- (NSString *)cachePath;
|
||||||
|
- (NSString *)password;
|
||||||
|
- (void)setPassword:(NSString *)thePassword;
|
||||||
|
- (NSString *)cookieStoragePath;
|
||||||
|
- (MGMHTTPCookieStorage *)cookieStorage;
|
||||||
|
- (void)done;
|
||||||
|
- (void)remove;
|
||||||
|
@end
|
35
Libraries/include/MGMUsers/MGMUsers.h
Normal file
35
Libraries/include/MGMUsers/MGMUsers.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* MGMUsers.h
|
||||||
|
* MGMUsers
|
||||||
|
*
|
||||||
|
* Created by Mr. Gecko on 4/14/10.
|
||||||
|
* Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
|
#import <MGMUsers/MGMKeychainItem.h>
|
||||||
|
#import <MGMUsers/MGMUser.h>
|
||||||
|
#import <MGMUsers/MGMHTTPCookieStorage.h>
|
||||||
|
#import <MGMUsers/MGMURLConnectionManager.h>
|
||||||
|
#import <MGMUsers/MGMJSON.h>
|
||||||
|
#import <MGMUsers/MGMLiteConnection.h>
|
||||||
|
#import <MGMUsers/MGMLiteResult.h>
|
||||||
|
#import <MGMUsers/MGMWhitePages.h>
|
||||||
|
#import <MGMUsers/MGMMD5.h>
|
||||||
|
#else
|
||||||
|
#import <MGMUsers/MGMKeychain.h>
|
||||||
|
#import <MGMUsers/MGMKeychainItem.h>
|
||||||
|
#import <MGMUsers/MGMUser.h>
|
||||||
|
#import <MGMUsers/MGMHTTPCookieStorage.h>
|
||||||
|
#import <MGMUsers/MGMURLConnectionManager.h>
|
||||||
|
#import <MGMUsers/MGMPreferences.h>
|
||||||
|
#import <MGMUsers/MGMPreferencesPane.h>
|
||||||
|
#import <MGMUsers/MGMJSON.h>
|
||||||
|
#import <MGMUsers/MGMLiteConnection.h>
|
||||||
|
#import <MGMUsers/MGMLiteResult.h>
|
||||||
|
#import <MGMUsers/MGMWhitePages.h>
|
||||||
|
#import <MGMUsers/MGMTaskManager.h>
|
||||||
|
#import <MGMUsers/MGMMD5.h>
|
||||||
|
#endif
|
36
Libraries/include/MGMUsers/MGMWhitePages.h
Normal file
36
Libraries/include/MGMUsers/MGMWhitePages.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
//
|
||||||
|
// MGMWhitePages.h
|
||||||
|
// MGMUsers
|
||||||
|
//
|
||||||
|
// Created by Mr. Gecko on 9/2/09.
|
||||||
|
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
|
||||||
|
//
|
||||||
|
|
||||||
|
#if TARGET_OS_IPHONE
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern NSString * const MGMWPDelegate;
|
||||||
|
extern NSString * const MGMWPDidFindInfo;
|
||||||
|
extern NSString * const MGMWPDidFailWithError;
|
||||||
|
extern NSString * const MGMWPPhoneNumber;
|
||||||
|
extern NSString * const MGMWPName;
|
||||||
|
extern NSString * const MGMWPAddress;
|
||||||
|
extern NSString * const MGMWPLocation;
|
||||||
|
extern NSString * const MGMWPZip;
|
||||||
|
extern NSString * const MGMWPLatitude;
|
||||||
|
extern NSString * const MGMWPLongitude;
|
||||||
|
|
||||||
|
@class MGMURLConnectionManager;
|
||||||
|
|
||||||
|
@interface MGMWhitePages : NSObject {
|
||||||
|
MGMURLConnectionManager *connectionManager;
|
||||||
|
NSDictionary *states;
|
||||||
|
BOOL lookingup;
|
||||||
|
}
|
||||||
|
- (void)cancelAll;
|
||||||
|
- (void)reverseLookup:(NSString *)thePhoneNumber delegate:(id)theDelegate;
|
||||||
|
- (void)reverseLookup:(NSString *)thePhoneNumber delegate:(id)theDelegate didFailWithError:(SEL)didFailWithError didFindInfo:(SEL)didFindInfo;
|
||||||
|
@end
|
5914
Libraries/include/MGMUsers/sqlite3.h
Normal file
5914
Libraries/include/MGMUsers/sqlite3.h
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Libraries/lib/libMGMUsers.a
Normal file
BIN
Libraries/lib/libMGMUsers.a
Normal file
Binary file not shown.
@ -1,2 +1,4 @@
|
|||||||
Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
Licenses for VoiceMac.
Permission is granted, to any person obtaining a copy of this application, to use, copy, modify, merge, or redistribute this application under the following terms:
1. This file must be included in all copies of this application unmodified in the resource of the application.
2. THIS APPLICATION IS PROVIDED "AS IS" BY JAMES COLEMAN, WITHOUT WARRANTY OF ANY KIND. IF YOUR SOFTWARE/COMPUTER CRASHES OR FAILS TO WORK IN ANY WAY SHAPE OR FORM BECAUSE OF THIS APPLICATION, I (JAMES COLEMAN) AM NOT IN ANYWAY RESPONSIBLE FOR YOUR PROBLEM.
3. Redistributions of source code must retain the copyright notice above this license file without modifications.
4. Redistributions of binary must contain the copyright above this license file without modifications.
5. You may not change the about panel, as it is giving credit to everyone who helped write this application and they deserve the credit for their fine work.
6. You may not use the binary redistributed in this application, MGMUsers, for anything except VoiceMac.
7. You may not change the bundle identifier or the name of VoiceMac. If you are to use MGMUsers in anything that is not named VoiceMac or does not have the same bundle identifier as VoiceMac, MGMUsers will notify me and crash the application.
8. Mr. Gecko's Media (James Coleman) is allowed to modify these terms without notice to you or anyone else.
Licenses for MGMSIP.
Permission is granted, to any person obtaining a copy of this application, to use, copy, modify, merge, or redistribute this application under the following terms:
1. You may use MGMSIP, the PJSIP wrapper, in your own application, if you include a link to PJSIP in your about box, and you include a link to Mr. Gecko’s Media.
2. THIS WRAPPER IS PROVIDED "AS IS" BY JAMES COLEMAN, WITHOUT WARRANTY OF ANY KIND. IF YOUR SOFTWARE/COMPUTER CRASHES OR FAILS TO WORK IN ANY WAY SHAPE OR FORM BECAUSE OF THIS WRAPPER, I (JAMES COLEMAN) AM NOT IN ANYWAY RESPONSIBLE FOR YOUR PROBLEM.
3. The above copyright must be retained in the binary where MGMSIP is included.
4. Redistributions of source code must retain the copyright notice above this license file without modifications.
|
Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
Licenses for VoiceMac.
Permission is granted, to any person obtaining a copy of this application, to use, copy, modify, merge, or redistribute this application under the following terms:
1. This file must be included in all copies of this application unmodified in the resource of the application.
2. THIS APPLICATION IS PROVIDED "AS IS" BY JAMES COLEMAN, WITHOUT WARRANTY OF ANY KIND. IF YOUR SOFTWARE/COMPUTER CRASHES OR FAILS TO WORK IN ANY WAY SHAPE OR FORM BECAUSE OF THIS APPLICATION, I (JAMES COLEMAN) AM NOT IN ANYWAY RESPONSIBLE FOR YOUR PROBLEM.
3. Redistributions of source code must retain the copyright notice above this license file without modifications.
4. Redistributions of binary must contain the copyright above this license file without modifications.
5. You may not change the about panel, as it is giving credit to everyone who helped write this application and they deserve the credit for their fine work.
6. You may not use the binary redistributed in this application, MGMUsers, for anything except VoiceMac.
7. You may not change the bundle identifier or the name of VoiceMac. If you are to use MGMUsers in anything that is not named VoiceMac or does not have the same bundle identifier as VoiceMac, MGMUsers will notify me and crash the application.
8. Mr. Gecko's Media (James Coleman) is allowed to modify these terms without notice to you or anyone else.
Licenses for MGMSIP.
Permission is granted, to any person obtaining a copy of this application, to use, copy, modify, merge, or redistribute this application under the following terms:
1. You may use MGMSIP, the PJSIP wrapper, in your own application, if you include a link to PJSIP in your about box, and you include a link to Mr. Gecko’s Media.
2. THIS WRAPPER IS PROVIDED "AS IS" BY JAMES COLEMAN, WITHOUT WARRANTY OF ANY KIND. IF YOUR SOFTWARE/COMPUTER CRASHES OR FAILS TO WORK IN ANY WAY SHAPE OR FORM BECAUSE OF THIS WRAPPER, I (JAMES COLEMAN) AM NOT IN ANYWAY RESPONSIBLE FOR YOUR PROBLEM.
3. The above copyright must be retained in the binary where MGMSIP is included.
4. Redistributions of source code must retain the copyright notice above this license file without modifications.
|
||||||
|
5. Mr. Gecko's Media (James Coleman) is allowed to modify these terms without notice to you or anyone else.
|
||||||
|
Licenses for MGMXML.
Permission is granted, to any person obtaining a copy of this application, to use, copy, modify, merge, or redistribute this application under the following terms:
1. You may use MGMXML in your own application, if you include a link to PJSIP in your about box, and you include a link to Mr. Gecko’s Media.
2. THIS WRAPPER IS PROVIDED "AS IS" BY JAMES COLEMAN, WITHOUT WARRANTY OF ANY KIND. IF YOUR SOFTWARE/COMPUTER CRASHES OR FAILS TO WORK IN ANY WAY SHAPE OR FORM BECAUSE OF THIS WRAPPER, I (JAMES COLEMAN) AM NOT IN ANYWAY RESPONSIBLE FOR YOUR PROBLEM.
3. The above copyright must be retained in the binary where MGMXML is included.
4. Redistributions of source code must retain the copyright notice above this license file without modifications.
|
||||||
5. Mr. Gecko's Media (James Coleman) is allowed to modify these terms without notice to you or anyone else.
|
5. Mr. Gecko's Media (James Coleman) is allowed to modify these terms without notice to you or anyone else.
|
75
SIP/install
75
SIP/install
@ -24,17 +24,78 @@ X86_64LDFLAGS="-arch x86_64"
|
|||||||
FINALPATH="${PWD}/opt"
|
FINALPATH="${PWD}/opt"
|
||||||
|
|
||||||
if [ "$1" = "clean" ]; then
|
if [ "$1" = "clean" ]; then
|
||||||
echo "Cleaning PjProject"
|
echo "Cleaning PJProject"
|
||||||
rm -fR pjproject-i386 pjproject-x86_64 pjproject-ppc
|
rm -fR pjproject-i386 pjproject-x86_64 pjproject-ppc pjproject-ios pjproject-simulator
|
||||||
|
fi
|
||||||
|
if [ "$1" = "ios" ]; then
|
||||||
|
IOSCFLAGS="-miphoneos-version-min=3.1"
|
||||||
|
IOSPATH="${PWD}/opt-ios"
|
||||||
|
SIMULATORPATH="${PWD}/opt-simulator"
|
||||||
|
|
||||||
|
echo "Copying PJProject"
|
||||||
|
PJPROJECTNAME="pjproject"
|
||||||
|
cp -R ${PJPROJECTNAME} ${PJPROJECTNAME}-ios
|
||||||
|
echo "#define PJ_CONFIG_IPHONE 1" > ${PJPROJECTNAME}-ios/pjlib/include/pj/config_site.h
|
||||||
|
echo "#include <pj/config_site_sample.h>" >> ${PJPROJECTNAME}-ios/pjlib/include/pj/config_site.h
|
||||||
|
|
||||||
|
OLDDIR="${PWD}"
|
||||||
|
cd ${PJPROJECTNAME}-ios
|
||||||
|
patch -p0 < "${OLDDIR}/mips_test.patch"
|
||||||
|
cd "${OLDDIR}"
|
||||||
|
cp -R ${PJPROJECTNAME}-ios ${PJPROJECTNAME}-simulator
|
||||||
|
|
||||||
|
echo "Configuring PJProject"
|
||||||
|
cd ${PJPROJECTNAME}-ios
|
||||||
|
CFLAGS="${IOSCFLAGS}" CFLAGS="${IOSCFLAGS}" ./configure-iphone --prefix="${IOSPATH}"
|
||||||
|
cd ../${PJPROJECTNAME}-simulator
|
||||||
|
DEVPATH="/Developer/Platforms/iPhoneSimulator.platform/Developer" CC="/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0" CFLAGS="${IOSCFLAGS}" CFLAGS="${IOSCFLAGS}" ./configure-iphone --prefix="${SIMULATORPATH}"
|
||||||
|
cd ../
|
||||||
|
|
||||||
|
echo "Compiling PJProject"
|
||||||
|
cd ${PJPROJECTNAME}-ios
|
||||||
|
make dep
|
||||||
|
make
|
||||||
|
cd ../${PJPROJECTNAME}-simulator
|
||||||
|
make dep
|
||||||
|
make
|
||||||
|
cd ../
|
||||||
|
|
||||||
|
echo "Installing PJProject"
|
||||||
|
cd ${PJPROJECTNAME}-ios
|
||||||
|
make install
|
||||||
|
cd ../${PJPROJECTNAME}-simulator
|
||||||
|
make install
|
||||||
|
cd ../
|
||||||
|
|
||||||
|
echo "Making PJProject Universal"
|
||||||
|
mkdir -p "${FINALPATH}/lib/pkgconfig"
|
||||||
|
cp -R "${PPCPATH}/include" "${FINALPATH}/include"
|
||||||
|
lipo -create "${IOSPATH}/lib/libg7221codec-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libg7221codec-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libg7221codec-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libgsmcodec-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libgsmcodec-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libgsmcodec-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libilbccodec-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libilbccodec-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libilbccodec-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libmilenage-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libmilenage-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libmilenage-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpj-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpj-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpj-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjlib-util-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjlib-util-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjlib-util-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjmedia-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjmedia-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjmedia-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjmedia-audiodev-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjmedia-audiodev-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjmedia-audiodev-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjmedia-codec-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjmedia-codec-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjmedia-codec-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjnath-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjnath-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjnath-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjsip-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjsip-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjsip-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjsip-simple-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjsip-simple-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjsip-simple-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjsip-ua-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjsip-ua-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjsip-ua-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libpjsua-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libpjsua-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libpjsua-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libresample-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libresample-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libresample-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libspeex-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libspeex-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libspeex-ios-universal.a"
|
||||||
|
lipo -create "${IOSPATH}/lib/libsrtp-arm-apple-darwin9.a" "${SIMULATORPATH}/lib/libsrtp-arm-apple-darwin9.a" -output "${FINALPATH}/lib/libsrtp-ios-universal.a"
|
||||||
fi
|
fi
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
echo "Copying PjProject"
|
echo "Copying PJProject"
|
||||||
PJPROJECTNAME="pjproject"
|
PJPROJECTNAME="pjproject"
|
||||||
cp -R ${PJPROJECTNAME} ${PJPROJECTNAME}-ppc
|
cp -R ${PJPROJECTNAME} ${PJPROJECTNAME}-ppc
|
||||||
cp -R ${PJPROJECTNAME}-ppc ${PJPROJECTNAME}-i386
|
cp -R ${PJPROJECTNAME}-ppc ${PJPROJECTNAME}-i386
|
||||||
cp -R ${PJPROJECTNAME}-ppc ${PJPROJECTNAME}-x86_64
|
cp -R ${PJPROJECTNAME}-ppc ${PJPROJECTNAME}-x86_64
|
||||||
|
|
||||||
echo "Configuring PjProject"
|
echo "Configuring PJProject"
|
||||||
cd ${PJPROJECTNAME}-ppc
|
cd ${PJPROJECTNAME}-ppc
|
||||||
LDFLAGS="${PPCLDFLAGS}" CFLAGS="${PPCFLAGS}" CXXFLAGS="${PPCFLAGS}" ./configure --prefix="${PPCPATH}" --host="${PPCHOST}" --disable-shared --enable-static
|
LDFLAGS="${PPCLDFLAGS}" CFLAGS="${PPCFLAGS}" CXXFLAGS="${PPCFLAGS}" ./configure --prefix="${PPCPATH}" --host="${PPCHOST}" --disable-shared --enable-static
|
||||||
cd ../${PJPROJECTNAME}-i386
|
cd ../${PJPROJECTNAME}-i386
|
||||||
@ -43,7 +104,7 @@ if [ "$1" = "" ]; then
|
|||||||
LDFLAGS="${X86_64LDFLAGS}" CFLAGS="${X86_64FLAGS}" CXXFLAGS="${X86_64FLAGS}" ./configure --prefix="${X86_64PATH}" --host="${X86_64HOST}" --disable-shared --enable-static
|
LDFLAGS="${X86_64LDFLAGS}" CFLAGS="${X86_64FLAGS}" CXXFLAGS="${X86_64FLAGS}" ./configure --prefix="${X86_64PATH}" --host="${X86_64HOST}" --disable-shared --enable-static
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
echo "Compiling PjProject"
|
echo "Compiling PJProject"
|
||||||
cd ${PJPROJECTNAME}-ppc
|
cd ${PJPROJECTNAME}-ppc
|
||||||
make dep
|
make dep
|
||||||
make
|
make
|
||||||
@ -55,7 +116,7 @@ if [ "$1" = "" ]; then
|
|||||||
make
|
make
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
echo "Installing PjProject"
|
echo "Installing PJProject"
|
||||||
cd ${PJPROJECTNAME}-ppc
|
cd ${PJPROJECTNAME}-ppc
|
||||||
make install
|
make install
|
||||||
cd ../${PJPROJECTNAME}-i386
|
cd ../${PJPROJECTNAME}-i386
|
||||||
@ -64,7 +125,7 @@ if [ "$1" = "" ]; then
|
|||||||
make install
|
make install
|
||||||
cd ../
|
cd ../
|
||||||
|
|
||||||
echo "Making PjProject Universal"
|
echo "Making PJProject Universal"
|
||||||
mkdir -p "${FINALPATH}/lib/pkgconfig"
|
mkdir -p "${FINALPATH}/lib/pkgconfig"
|
||||||
cp -R "${PPCPATH}/include" "${FINALPATH}/include"
|
cp -R "${PPCPATH}/include" "${FINALPATH}/include"
|
||||||
lipo -create "${PPCPATH}/lib/libg7221codec-powerpc-apple-darwin8.a" "${I386PATH}/lib/libg7221codec-i386-apple-darwin8.a" "${X86_64PATH}/lib/libg7221codec-x86_64-apple-darwin9.a" -output "${FINALPATH}/lib/libg7221codec-universal.a"
|
lipo -create "${PPCPATH}/lib/libg7221codec-powerpc-apple-darwin8.a" "${I386PATH}/lib/libg7221codec-i386-apple-darwin8.a" "${X86_64PATH}/lib/libg7221codec-x86_64-apple-darwin9.a" -output "${FINALPATH}/lib/libg7221codec-universal.a"
|
||||||
|
165
SIP/mips_test.patch
Normal file
165
SIP/mips_test.patch
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
### Eclipse Workspace Patch 1.0 From http://siphon.googlecode.com/files/patch-mips_test.txt
|
||||||
|
#P pjproject
|
||||||
|
Index: pjproject-ios/pjmedia/src/test/mips_test.c
|
||||||
|
===================================================================
|
||||||
|
--- pjmedia/src/test/mips_test.c (revision 2913)
|
||||||
|
+++ pjmedia/src/test/mips_test.c (working copy)
|
||||||
|
@@ -794,6 +794,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
/* G.711 benchmark */
|
||||||
|
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC !=0
|
||||||
|
static pjmedia_port* g711_encode_decode( pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
unsigned channel_count,
|
||||||
|
@@ -806,8 +807,10 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* GSM benchmark */
|
||||||
|
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC !=0
|
||||||
|
static pjmedia_port* gsm_encode_decode( pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
unsigned channel_count,
|
||||||
|
@@ -820,7 +823,9 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
+#if defined(PJMEDIA_HAS_ILBC_CODEC) && PJMEDIA_HAS_ILBC_CODEC !=0
|
||||||
|
static pj_status_t ilbc_init(pjmedia_endpt *endpt)
|
||||||
|
{
|
||||||
|
return pjmedia_codec_ilbc_init(endpt, 20);
|
||||||
|
@@ -839,8 +844,10 @@
|
||||||
|
&pjmedia_codec_ilbc_deinit, clock_rate,
|
||||||
|
channel_count, samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Speex narrowband benchmark */
|
||||||
|
+#if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC !=0
|
||||||
|
static pjmedia_port* speex8_encode_decode(pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
unsigned channel_count,
|
||||||
|
@@ -869,8 +876,10 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* G.722 benchmark benchmark */
|
||||||
|
+#if defined(PJMEDIA_HAS_G722_CODEC) && PJMEDIA_HAS_G722_CODEC !=0
|
||||||
|
static pjmedia_port* g722_encode_decode(pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
unsigned channel_count,
|
||||||
|
@@ -883,8 +892,9 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-#if PJMEDIA_HAS_G7221_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G7221_CODEC) && PJMEDIA_HAS_G7221_CODEC!=0
|
||||||
|
/* G.722.1 benchmark benchmark */
|
||||||
|
static pjmedia_port* g7221_encode_decode(pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
@@ -1726,6 +1736,7 @@
|
||||||
|
if (status != PJ_SUCCESS)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
+#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0)
|
||||||
|
if (srtp_enabled) {
|
||||||
|
pjmedia_srtp_setting opt;
|
||||||
|
pjmedia_srtp_crypto crypto;
|
||||||
|
@@ -1758,6 +1769,9 @@
|
||||||
|
|
||||||
|
sp->transport = srtp;
|
||||||
|
}
|
||||||
|
+#else
|
||||||
|
+ PJ_UNUSED_ARG(srtp_enabled);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Create stream */
|
||||||
|
status = pjmedia_stream_create(sp->endpt, pool, &si, sp->transport, NULL,
|
||||||
|
@@ -1852,6 +1866,7 @@
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC !=0
|
||||||
|
/* GSM stream */
|
||||||
|
static pjmedia_port* create_stream_gsm( pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
@@ -1926,8 +1941,10 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* G722 stream */
|
||||||
|
+#if defined(PJMEDIA_HAS_G722_CODEC) && PJMEDIA_HAS_G722_CODEC !=0
|
||||||
|
static pjmedia_port* create_stream_g722( pj_pool_t *pool,
|
||||||
|
unsigned clock_rate,
|
||||||
|
unsigned channel_count,
|
||||||
|
@@ -1941,6 +1958,7 @@
|
||||||
|
clock_rate, channel_count,
|
||||||
|
samples_per_frame, flags, te);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* G722.1 stream */
|
||||||
|
#if PJMEDIA_HAS_G7221_CODEC
|
||||||
|
@@ -2344,41 +2362,41 @@
|
||||||
|
{ "echo suppressor 800ms tail len", OP_GET_PUT, K8|K16, &es_create_800},
|
||||||
|
{ "tone generator with single freq", OP_GET, K8|K16, &create_tonegen1},
|
||||||
|
{ "tone generator with dual freq", OP_GET, K8|K16, &create_tonegen2},
|
||||||
|
-#if PJMEDIA_HAS_G711_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC !=0
|
||||||
|
{ "codec encode/decode - G.711", OP_PUT, K8, &g711_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_G722_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G722_CODEC) && PJMEDIA_HAS_G722_CODEC !=0
|
||||||
|
{ "codec encode/decode - G.722", OP_PUT, K16, &g722_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_GSM_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC !=0
|
||||||
|
{ "codec encode/decode - GSM", OP_PUT, K8, &gsm_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_ILBC_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_ILBC_CODEC) && PJMEDIA_HAS_ILBC_CODEC !=0
|
||||||
|
{ "codec encode/decode - iLBC", OP_PUT, K8, &ilbc_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_SPEEX_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_SPEEX_CODEC) && PJMEDIA_HAS_SPEEX_CODEC !=0
|
||||||
|
{ "codec encode/decode - Speex 8Khz", OP_PUT, K8, &speex8_encode_decode},
|
||||||
|
{ "codec encode/decode - Speex 16Khz", OP_PUT, K16, &speex16_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_G7221_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G7221_CODEC) && PJMEDIA_HAS_G7221_CODEC!=0
|
||||||
|
{ "codec encode/decode - G.722.1", OP_PUT, K16, &g7221_encode_decode},
|
||||||
|
{ "codec encode/decode - G.722.1c", OP_PUT, K32, &g7221c_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_L16_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_L16_CODEC) && PJMEDIA_HAS_L16_CODEC!=0
|
||||||
|
{ "codec encode/decode - L16/8000/1", OP_PUT, K8, &l16_8_encode_decode},
|
||||||
|
{ "codec encode/decode - L16/16000/1", OP_PUT, K16, &l16_16_encode_decode},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_G711_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G711_CODEC) && PJMEDIA_HAS_G711_CODEC !=0
|
||||||
|
{ "stream TX/RX - G.711", OP_PUT_GET, K8, &create_stream_pcmu},
|
||||||
|
{ "stream TX/RX - G.711 SRTP 32bit", OP_PUT_GET, K8, &create_stream_pcmu_srtp32_no_auth},
|
||||||
|
{ "stream TX/RX - G.711 SRTP 32bit +auth", OP_PUT_GET, K8, &create_stream_pcmu_srtp32_with_auth},
|
||||||
|
{ "stream TX/RX - G.711 SRTP 80bit", OP_PUT_GET, K8, &create_stream_pcmu_srtp80_no_auth},
|
||||||
|
{ "stream TX/RX - G.711 SRTP 80bit +auth", OP_PUT_GET, K8, &create_stream_pcmu_srtp80_with_auth},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_G722_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_G722_CODEC) && PJMEDIA_HAS_G722_CODEC !=0
|
||||||
|
{ "stream TX/RX - G.722", OP_PUT_GET, K16, &create_stream_g722},
|
||||||
|
#endif
|
||||||
|
-#if PJMEDIA_HAS_GSM_CODEC
|
||||||
|
+#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC !=0
|
||||||
|
{ "stream TX/RX - GSM", OP_PUT_GET, K8, &create_stream_gsm},
|
||||||
|
{ "stream TX/RX - GSM SRTP 32bit", OP_PUT_GET, K8, &create_stream_gsm_srtp32_no_auth},
|
||||||
|
{ "stream TX/RX - GSM SRTP 32bit + auth", OP_PUT_GET, K8, &create_stream_gsm_srtp32_with_auth},
|
@ -1 +1,13 @@
|
|||||||
To get the latest PJProject, "svn checkout http://svn.pjsip.org/repos/pjproject/trunk pjproject" To get the one I used, "svn checkout -r 3310 http://svn.pjsip.org/repos/pjproject/trunk pjproject" After you check out PJProject, run ./install to build it for Voice Mac.
|
Getting the source code to PJProject.
|
||||||
|
To get the latest source to PJProject, run the command below.
|
||||||
|
svn checkout http://svn.pjsip.org/repos/pjproject/trunk pjproject
|
||||||
|
|
||||||
|
To get the revision that I am using in VoiceMac and VoiceMob, run the command below.
|
||||||
|
svn checkout -r 3315 http://svn.pjsip.org/repos/pjproject/trunk pjproject
|
||||||
|
|
||||||
|
Building.
|
||||||
|
To build for VoiceMac, run the command below.
|
||||||
|
./install
|
||||||
|
|
||||||
|
To build for VoiceMob, run the command below.
|
||||||
|
./install ios
|
@ -41,6 +41,72 @@
|
|||||||
2A11730912456C4F00D119B5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11730812456C4F00D119B5 /* AudioToolbox.framework */; };
|
2A11730912456C4F00D119B5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11730812456C4F00D119B5 /* AudioToolbox.framework */; };
|
||||||
2A11730D12456C5F00D119B5 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11730C12456C5F00D119B5 /* AudioUnit.framework */; };
|
2A11730D12456C5F00D119B5 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11730C12456C5F00D119B5 /* AudioUnit.framework */; };
|
||||||
2A11731112456C6D00D119B5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11731012456C6D00D119B5 /* SystemConfiguration.framework */; };
|
2A11731112456C6D00D119B5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A11731012456C6D00D119B5 /* SystemConfiguration.framework */; };
|
||||||
|
2A1E9723124D174200D3BEAE /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A1E9722124D174200D3BEAE /* CoreAudio.framework */; };
|
||||||
|
2A1E9754124D187500D3BEAE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A1E9753124D187500D3BEAE /* SystemConfiguration.framework */; };
|
||||||
|
2A487CA0124BE0AB00E8EE4E /* MGMXMLAddons.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C93124BE0AB00E8EE4E /* MGMXMLAddons.h */; };
|
||||||
|
2A487CA1124BE0AB00E8EE4E /* MGMXMLAddons.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C94124BE0AB00E8EE4E /* MGMXMLAddons.m */; };
|
||||||
|
2A487CA2124BE0AB00E8EE4E /* MGMXMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C95124BE0AB00E8EE4E /* MGMXMLDocument.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CA3124BE0AB00E8EE4E /* MGMXMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C96124BE0AB00E8EE4E /* MGMXMLDocument.m */; };
|
||||||
|
2A487CA4124BE0AB00E8EE4E /* MGMXMLDTD.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C97124BE0AB00E8EE4E /* MGMXMLDTD.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CA5124BE0AB00E8EE4E /* MGMXMLDTD.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C98124BE0AB00E8EE4E /* MGMXMLDTD.m */; };
|
||||||
|
2A487CA6124BE0AB00E8EE4E /* MGMXMLDTDNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C99124BE0AB00E8EE4E /* MGMXMLDTDNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CA7124BE0AB00E8EE4E /* MGMXMLDTDNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9A124BE0AB00E8EE4E /* MGMXMLDTDNode.m */; };
|
||||||
|
2A487CA8124BE0AB00E8EE4E /* MGMXMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9B124BE0AB00E8EE4E /* MGMXMLElement.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CA9124BE0AB00E8EE4E /* MGMXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9C124BE0AB00E8EE4E /* MGMXMLElement.m */; };
|
||||||
|
2A487CAA124BE0AB00E8EE4E /* MGMXMLNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9D124BE0AB00E8EE4E /* MGMXMLNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CAB124BE0AB00E8EE4E /* MGMXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9E124BE0AB00E8EE4E /* MGMXMLNode.m */; };
|
||||||
|
2A487CAC124BE0AB00E8EE4E /* MGMXMLNodeOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9F124BE0AB00E8EE4E /* MGMXMLNodeOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CAF124BE0C400E8EE4E /* MGMXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487CAE124BE0C400E8EE4E /* MGMXML.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CB9124BE1E600E8EE4E /* MGMXMLAddons.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C94124BE0AB00E8EE4E /* MGMXMLAddons.m */; };
|
||||||
|
2A487CBA124BE1E600E8EE4E /* MGMXMLDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C96124BE0AB00E8EE4E /* MGMXMLDocument.m */; };
|
||||||
|
2A487CBB124BE1E600E8EE4E /* MGMXMLDTD.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C98124BE0AB00E8EE4E /* MGMXMLDTD.m */; };
|
||||||
|
2A487CBC124BE1E600E8EE4E /* MGMXMLDTDNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9A124BE0AB00E8EE4E /* MGMXMLDTDNode.m */; };
|
||||||
|
2A487CBD124BE1E600E8EE4E /* MGMXMLElement.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9C124BE0AB00E8EE4E /* MGMXMLElement.m */; };
|
||||||
|
2A487CBE124BE1E600E8EE4E /* MGMXMLNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A487C9E124BE0AB00E8EE4E /* MGMXMLNode.m */; };
|
||||||
|
2A487CC1124BE22E00E8EE4E /* MGMAddressBook.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171A51245676A00D119B5 /* MGMAddressBook.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC2124BE22E00E8EE4E /* MGMContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171A71245676A00D119B5 /* MGMContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC3124BE22E00E8EE4E /* MGMContactsProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171A91245676A00D119B5 /* MGMContactsProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC4124BE22E00E8EE4E /* MGMGoogleContacts.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171AB1245676A00D119B5 /* MGMGoogleContacts.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC5124BE22E00E8EE4E /* MGMAddons.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171AD1245676A00D119B5 /* MGMAddons.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC6124BE22E00E8EE4E /* MGMInbox.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171AF1245676A00D119B5 /* MGMInbox.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC7124BE22E00E8EE4E /* MGMInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171B11245676A00D119B5 /* MGMInstance.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC8124BE22E00E8EE4E /* MGMThemeManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171B31245676A00D119B5 /* MGMThemeManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CC9124BE22E00E8EE4E /* MGMSIP.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171B61245676A00D119B5 /* MGMSIP.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CCA124BE22E00E8EE4E /* MGMSIPAccount.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171B81245676A00D119B5 /* MGMSIPAccount.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CCB124BE22E00E8EE4E /* MGMSIPCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171BA1245676A00D119B5 /* MGMSIPCall.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CCC124BE22E00E8EE4E /* MGMSIPURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171BC1245676A00D119B5 /* MGMSIPURL.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CCD124BE22E00E8EE4E /* MGMXML.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487CAE124BE0C400E8EE4E /* MGMXML.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CCE124BE22E00E8EE4E /* MGMXMLAddons.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C93124BE0AB00E8EE4E /* MGMXMLAddons.h */; };
|
||||||
|
2A487CCF124BE22E00E8EE4E /* MGMXMLDocument.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C95124BE0AB00E8EE4E /* MGMXMLDocument.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD0124BE22E00E8EE4E /* MGMXMLDTD.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C97124BE0AB00E8EE4E /* MGMXMLDTD.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD1124BE22E00E8EE4E /* MGMXMLDTDNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C99124BE0AB00E8EE4E /* MGMXMLDTDNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD2124BE22E00E8EE4E /* MGMXMLElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9B124BE0AB00E8EE4E /* MGMXMLElement.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD3124BE22E00E8EE4E /* MGMXMLNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9D124BE0AB00E8EE4E /* MGMXMLNode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD4124BE22E00E8EE4E /* MGMXMLNodeOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A487C9F124BE0AB00E8EE4E /* MGMXMLNodeOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487CD5124BE22E00E8EE4E /* VoiceBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A1171BE1245676A00D119B5 /* VoiceBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A487D0D124BE40700E8EE4E /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A487CF0124BE3E600E8EE4E /* libxml2.dylib */; };
|
||||||
|
2A487D0F124BE41B00E8EE4E /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A487D0E124BE41B00E8EE4E /* libxml2.dylib */; };
|
||||||
|
2A77133C124C4CE200D68042 /* MGMSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A77133A124C4CE200D68042 /* MGMSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2A77133D124C4CE200D68042 /* MGMSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A77133B124C4CE200D68042 /* MGMSound.m */; };
|
||||||
|
2A771340124C4D2800D68042 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A77133F124C4D2800D68042 /* AudioToolbox.framework */; };
|
||||||
|
2A771344124C4F9A00D68042 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2A771343124C4F9A00D68042 /* AVFoundation.framework */; };
|
||||||
|
2A7713BD124C6A4900D68042 /* MGMSound.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A77133B124C4CE200D68042 /* MGMSound.m */; };
|
||||||
|
2A7713BF124C6A5B00D68042 /* MGMSound.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A77133A124C4CE200D68042 /* MGMSound.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
|
2AE6EE621249DA790006B5AC /* MGMAddressBook.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171A61245676A00D119B5 /* MGMAddressBook.m */; };
|
||||||
|
2AE6EE631249DA790006B5AC /* MGMContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171A81245676A00D119B5 /* MGMContacts.m */; };
|
||||||
|
2AE6EE641249DA790006B5AC /* MGMContactsProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171AA1245676A00D119B5 /* MGMContactsProtocol.m */; };
|
||||||
|
2AE6EE651249DA790006B5AC /* MGMGoogleContacts.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171AC1245676A00D119B5 /* MGMGoogleContacts.m */; };
|
||||||
|
2AE6EE661249DA790006B5AC /* MGMAddons.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171AE1245676A00D119B5 /* MGMAddons.m */; };
|
||||||
|
2AE6EE671249DA790006B5AC /* MGMInbox.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171B01245676A00D119B5 /* MGMInbox.m */; };
|
||||||
|
2AE6EE681249DA790006B5AC /* MGMInstance.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171B21245676A00D119B5 /* MGMInstance.m */; };
|
||||||
|
2AE6EE691249DA790006B5AC /* MGMThemeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171B41245676A00D119B5 /* MGMThemeManager.m */; };
|
||||||
|
2AE6EE6A1249DA790006B5AC /* MGMSIP.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171B71245676A00D119B5 /* MGMSIP.m */; };
|
||||||
|
2AE6EE6B1249DA790006B5AC /* MGMSIPAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171B91245676A00D119B5 /* MGMSIPAccount.m */; };
|
||||||
|
2AE6EE6C1249DA790006B5AC /* MGMSIPCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171BB1245676A00D119B5 /* MGMSIPCall.m */; };
|
||||||
|
2AE6EE6D1249DA790006B5AC /* MGMSIPURL.m in Sources */ = {isa = PBXBuildFile; fileRef = 2A1171BD1245676A00D119B5 /* MGMSIPURL.m */; };
|
||||||
|
2AE6EE701249DA870006B5AC /* libMGMUsers.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE6EE0F1249D70F0006B5AC /* libMGMUsers.a */; };
|
||||||
|
2AE6EE761249DB2F0006B5AC /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE6EE751249DB2F0006B5AC /* CoreGraphics.framework */; };
|
||||||
|
2AE6EE7A1249DB2F0006B5AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2AE6EE791249DB2F0006B5AC /* UIKit.framework */; };
|
||||||
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
|
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
@ -84,11 +150,55 @@
|
|||||||
2A11730812456C4F00D119B5 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
2A11730812456C4F00D119B5 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||||
2A11730C12456C5F00D119B5 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
2A11730C12456C5F00D119B5 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = System/Library/Frameworks/AudioUnit.framework; sourceTree = SDKROOT; };
|
||||||
2A11731012456C6D00D119B5 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
2A11731012456C6D00D119B5 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||||
|
2A1E9722124D174200D3BEAE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
|
||||||
|
2A1E9753124D187500D3BEAE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||||
|
2A487C93124BE0AB00E8EE4E /* MGMXMLAddons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLAddons.h; sourceTree = "<group>"; };
|
||||||
|
2A487C94124BE0AB00E8EE4E /* MGMXMLAddons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLAddons.m; sourceTree = "<group>"; };
|
||||||
|
2A487C95124BE0AB00E8EE4E /* MGMXMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLDocument.h; sourceTree = "<group>"; };
|
||||||
|
2A487C96124BE0AB00E8EE4E /* MGMXMLDocument.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLDocument.m; sourceTree = "<group>"; };
|
||||||
|
2A487C97124BE0AB00E8EE4E /* MGMXMLDTD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLDTD.h; sourceTree = "<group>"; };
|
||||||
|
2A487C98124BE0AB00E8EE4E /* MGMXMLDTD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLDTD.m; sourceTree = "<group>"; };
|
||||||
|
2A487C99124BE0AB00E8EE4E /* MGMXMLDTDNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLDTDNode.h; sourceTree = "<group>"; };
|
||||||
|
2A487C9A124BE0AB00E8EE4E /* MGMXMLDTDNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLDTDNode.m; sourceTree = "<group>"; };
|
||||||
|
2A487C9B124BE0AB00E8EE4E /* MGMXMLElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLElement.h; sourceTree = "<group>"; };
|
||||||
|
2A487C9C124BE0AB00E8EE4E /* MGMXMLElement.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLElement.m; sourceTree = "<group>"; };
|
||||||
|
2A487C9D124BE0AB00E8EE4E /* MGMXMLNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLNode.h; sourceTree = "<group>"; };
|
||||||
|
2A487C9E124BE0AB00E8EE4E /* MGMXMLNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMXMLNode.m; sourceTree = "<group>"; };
|
||||||
|
2A487C9F124BE0AB00E8EE4E /* MGMXMLNodeOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXMLNodeOptions.h; sourceTree = "<group>"; };
|
||||||
|
2A487CAE124BE0C400E8EE4E /* MGMXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMXML.h; sourceTree = "<group>"; };
|
||||||
|
2A487CF0124BE3E600E8EE4E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
||||||
|
2A487D0E124BE41B00E8EE4E /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
||||||
|
2A77133A124C4CE200D68042 /* MGMSound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGMSound.h; sourceTree = "<group>"; };
|
||||||
|
2A77133B124C4CE200D68042 /* MGMSound.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGMSound.m; sourceTree = "<group>"; };
|
||||||
|
2A77133F124C4D2800D68042 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||||
|
2A771343124C4F9A00D68042 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||||
|
2AE6EE0F1249D70F0006B5AC /* libMGMUsers.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libMGMUsers.a; path = Libraries/lib/libMGMUsers.a; sourceTree = "<group>"; };
|
||||||
|
2AE6EE531249DA0B0006B5AC /* libVoiceBase.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libVoiceBase.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
2AE6EE731249DB2F0006B5AC /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
|
||||||
|
2AE6EE751249DB2F0006B5AC /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||||
|
2AE6EE771249DB2F0006B5AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||||
|
2AE6EE791249DB2F0006B5AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||||
|
2AE6EF191249DBA70006B5AC /* VoiceBaseTouch_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VoiceBaseTouch_Prefix.pch; path = Classes/VoiceBase/VoiceBaseTouch_Prefix.pch; sourceTree = "<group>"; };
|
||||||
8DC2EF5B0486A6940098B216 /* VoiceBase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VoiceBase.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
8DC2EF5B0486A6940098B216 /* VoiceBase.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = VoiceBase.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
2AE6EE511249DA0B0006B5AC /* Frameworks */ = {
|
||||||
|
isa = PBXFrameworksBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
2AE6EE701249DA870006B5AC /* libMGMUsers.a in Frameworks */,
|
||||||
|
2AE6EE761249DB2F0006B5AC /* CoreGraphics.framework in Frameworks */,
|
||||||
|
2AE6EE7A1249DB2F0006B5AC /* UIKit.framework in Frameworks */,
|
||||||
|
2A487D0F124BE41B00E8EE4E /* libxml2.dylib in Frameworks */,
|
||||||
|
2A771340124C4D2800D68042 /* AudioToolbox.framework in Frameworks */,
|
||||||
|
2A771344124C4F9A00D68042 /* AVFoundation.framework in Frameworks */,
|
||||||
|
2A1E9723124D174200D3BEAE /* CoreAudio.framework in Frameworks */,
|
||||||
|
2A1E9754124D187500D3BEAE /* SystemConfiguration.framework in Frameworks */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF560486A6940098B216 /* Frameworks */ = {
|
8DC2EF560486A6940098B216 /* Frameworks */ = {
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -98,6 +208,7 @@
|
|||||||
2A1172BB124569AC00D119B5 /* AddressBook.framework in Frameworks */,
|
2A1172BB124569AC00D119B5 /* AddressBook.framework in Frameworks */,
|
||||||
2A1172F312456BFA00D119B5 /* libssl.dylib in Frameworks */,
|
2A1172F312456BFA00D119B5 /* libssl.dylib in Frameworks */,
|
||||||
2A1172FA12456C2B00D119B5 /* libcrypto.dylib in Frameworks */,
|
2A1172FA12456C2B00D119B5 /* libcrypto.dylib in Frameworks */,
|
||||||
|
2A487D0D124BE40700E8EE4E /* libxml2.dylib in Frameworks */,
|
||||||
2A1172FE12456C3800D119B5 /* CoreAudio.framework in Frameworks */,
|
2A1172FE12456C3800D119B5 /* CoreAudio.framework in Frameworks */,
|
||||||
2A11730912456C4F00D119B5 /* AudioToolbox.framework in Frameworks */,
|
2A11730912456C4F00D119B5 /* AudioToolbox.framework in Frameworks */,
|
||||||
2A11730D12456C5F00D119B5 /* AudioUnit.framework in Frameworks */,
|
2A11730D12456C5F00D119B5 /* AudioUnit.framework in Frameworks */,
|
||||||
@ -112,6 +223,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
8DC2EF5B0486A6940098B216 /* VoiceBase.framework */,
|
8DC2EF5B0486A6940098B216 /* VoiceBase.framework */,
|
||||||
|
2AE6EE531249DA0B0006B5AC /* libVoiceBase.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -131,6 +243,9 @@
|
|||||||
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
2AE6EC281249C2C70006B5AC /* Linked Libraries Touch */,
|
||||||
|
2AE6EC2A1249C2D50006B5AC /* Linked Frameworks Touch */,
|
||||||
|
2AE6EC2B1249C2E20006B5AC /* Other Frameworks Touch */,
|
||||||
2A1172F612456C0600D119B5 /* Linked Libraries */,
|
2A1172F612456C0600D119B5 /* Linked Libraries */,
|
||||||
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
|
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
|
||||||
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
|
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
|
||||||
@ -172,9 +287,12 @@
|
|||||||
2A1171B01245676A00D119B5 /* MGMInbox.m */,
|
2A1171B01245676A00D119B5 /* MGMInbox.m */,
|
||||||
2A1171B11245676A00D119B5 /* MGMInstance.h */,
|
2A1171B11245676A00D119B5 /* MGMInstance.h */,
|
||||||
2A1171B21245676A00D119B5 /* MGMInstance.m */,
|
2A1171B21245676A00D119B5 /* MGMInstance.m */,
|
||||||
|
2A77133A124C4CE200D68042 /* MGMSound.h */,
|
||||||
|
2A77133B124C4CE200D68042 /* MGMSound.m */,
|
||||||
2A1171B31245676A00D119B5 /* MGMThemeManager.h */,
|
2A1171B31245676A00D119B5 /* MGMThemeManager.h */,
|
||||||
2A1171B41245676A00D119B5 /* MGMThemeManager.m */,
|
2A1171B41245676A00D119B5 /* MGMThemeManager.m */,
|
||||||
2A1171B51245676A00D119B5 /* SIP */,
|
2A1171B51245676A00D119B5 /* SIP */,
|
||||||
|
2A487C92124BE0AB00E8EE4E /* XML */,
|
||||||
2A1171BE1245676A00D119B5 /* VoiceBase.h */,
|
2A1171BE1245676A00D119B5 /* VoiceBase.h */,
|
||||||
);
|
);
|
||||||
name = Classes;
|
name = Classes;
|
||||||
@ -226,13 +344,67 @@
|
|||||||
children = (
|
children = (
|
||||||
2A1172F212456BFA00D119B5 /* libssl.dylib */,
|
2A1172F212456BFA00D119B5 /* libssl.dylib */,
|
||||||
2A1172F912456C2B00D119B5 /* libcrypto.dylib */,
|
2A1172F912456C2B00D119B5 /* libcrypto.dylib */,
|
||||||
|
2A487CF0124BE3E600E8EE4E /* libxml2.dylib */,
|
||||||
);
|
);
|
||||||
name = "Linked Libraries";
|
name = "Linked Libraries";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
2A487C92124BE0AB00E8EE4E /* XML */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
2A487CAE124BE0C400E8EE4E /* MGMXML.h */,
|
||||||
|
2A487C93124BE0AB00E8EE4E /* MGMXMLAddons.h */,
|
||||||
|
2A487C94124BE0AB00E8EE4E /* MGMXMLAddons.m */,
|
||||||
|
2A487C95124BE0AB00E8EE4E /* MGMXMLDocument.h */,
|
||||||
|
2A487C96124BE0AB00E8EE4E /* MGMXMLDocument.m */,
|
||||||
|
2A487C97124BE0AB00E8EE4E /* MGMXMLDTD.h */,
|
||||||
|
2A487C98124BE0AB00E8EE4E /* MGMXMLDTD.m */,
|
||||||
|
2A487C99124BE0AB00E8EE4E /* MGMXMLDTDNode.h */,
|
||||||
|
2A487C9A124BE0AB00E8EE4E /* MGMXMLDTDNode.m */,
|
||||||
|
2A487C9B124BE0AB00E8EE4E /* MGMXMLElement.h */,
|
||||||
|
2A487C9C124BE0AB00E8EE4E /* MGMXMLElement.m */,
|
||||||
|
2A487C9D124BE0AB00E8EE4E /* MGMXMLNode.h */,
|
||||||
|
2A487C9E124BE0AB00E8EE4E /* MGMXMLNode.m */,
|
||||||
|
2A487C9F124BE0AB00E8EE4E /* MGMXMLNodeOptions.h */,
|
||||||
|
);
|
||||||
|
path = XML;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
2AE6EC281249C2C70006B5AC /* Linked Libraries Touch */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
2AE6EE0F1249D70F0006B5AC /* libMGMUsers.a */,
|
||||||
|
2A487D0E124BE41B00E8EE4E /* libxml2.dylib */,
|
||||||
|
);
|
||||||
|
name = "Linked Libraries Touch";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
2AE6EC2A1249C2D50006B5AC /* Linked Frameworks Touch */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
2AE6EE751249DB2F0006B5AC /* CoreGraphics.framework */,
|
||||||
|
2AE6EE791249DB2F0006B5AC /* UIKit.framework */,
|
||||||
|
2A77133F124C4D2800D68042 /* AudioToolbox.framework */,
|
||||||
|
2A771343124C4F9A00D68042 /* AVFoundation.framework */,
|
||||||
|
2A1E9722124D174200D3BEAE /* CoreAudio.framework */,
|
||||||
|
2A1E9753124D187500D3BEAE /* SystemConfiguration.framework */,
|
||||||
|
);
|
||||||
|
name = "Linked Frameworks Touch";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
|
2AE6EC2B1249C2E20006B5AC /* Other Frameworks Touch */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
2AE6EE731249DB2F0006B5AC /* CoreData.framework */,
|
||||||
|
2AE6EE771249DB2F0006B5AC /* Foundation.framework */,
|
||||||
|
);
|
||||||
|
name = "Other Frameworks Touch";
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
32C88DFF0371C24200C91783 /* Other Sources */ = {
|
32C88DFF0371C24200C91783 /* Other Sources */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
2AE6EF191249DBA70006B5AC /* VoiceBaseTouch_Prefix.pch */,
|
||||||
2A1171BF1245676A00D119B5 /* VoiceBase_Prefix.pch */,
|
2A1171BF1245676A00D119B5 /* VoiceBase_Prefix.pch */,
|
||||||
);
|
);
|
||||||
name = "Other Sources";
|
name = "Other Sources";
|
||||||
@ -241,6 +413,35 @@
|
|||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXHeadersBuildPhase section */
|
/* Begin PBXHeadersBuildPhase section */
|
||||||
|
2AE6EE4F1249DA0B0006B5AC /* Headers */ = {
|
||||||
|
isa = PBXHeadersBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
2A487CC1124BE22E00E8EE4E /* MGMAddressBook.h in Headers */,
|
||||||
|
2A487CC2124BE22E00E8EE4E /* MGMContacts.h in Headers */,
|
||||||
|
2A487CC3124BE22E00E8EE4E /* MGMContactsProtocol.h in Headers */,
|
||||||
|
2A487CC4124BE22E00E8EE4E /* MGMGoogleContacts.h in Headers */,
|
||||||
|
2A487CC5124BE22E00E8EE4E /* MGMAddons.h in Headers */,
|
||||||
|
2A487CC6124BE22E00E8EE4E /* MGMInbox.h in Headers */,
|
||||||
|
2A487CC7124BE22E00E8EE4E /* MGMInstance.h in Headers */,
|
||||||
|
2A487CC8124BE22E00E8EE4E /* MGMThemeManager.h in Headers */,
|
||||||
|
2A487CCD124BE22E00E8EE4E /* MGMXML.h in Headers */,
|
||||||
|
2A487CCE124BE22E00E8EE4E /* MGMXMLAddons.h in Headers */,
|
||||||
|
2A487CCF124BE22E00E8EE4E /* MGMXMLDocument.h in Headers */,
|
||||||
|
2A487CD0124BE22E00E8EE4E /* MGMXMLDTD.h in Headers */,
|
||||||
|
2A487CD1124BE22E00E8EE4E /* MGMXMLDTDNode.h in Headers */,
|
||||||
|
2A487CD2124BE22E00E8EE4E /* MGMXMLElement.h in Headers */,
|
||||||
|
2A487CD3124BE22E00E8EE4E /* MGMXMLNode.h in Headers */,
|
||||||
|
2A487CD4124BE22E00E8EE4E /* MGMXMLNodeOptions.h in Headers */,
|
||||||
|
2A487CC9124BE22E00E8EE4E /* MGMSIP.h in Headers */,
|
||||||
|
2A487CCA124BE22E00E8EE4E /* MGMSIPAccount.h in Headers */,
|
||||||
|
2A487CCB124BE22E00E8EE4E /* MGMSIPCall.h in Headers */,
|
||||||
|
2A487CCC124BE22E00E8EE4E /* MGMSIPURL.h in Headers */,
|
||||||
|
2A487CD5124BE22E00E8EE4E /* VoiceBase.h in Headers */,
|
||||||
|
2A77133C124C4CE200D68042 /* MGMSound.h in Headers */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF500486A6940098B216 /* Headers */ = {
|
8DC2EF500486A6940098B216 /* Headers */ = {
|
||||||
isa = PBXHeadersBuildPhase;
|
isa = PBXHeadersBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -252,18 +453,44 @@
|
|||||||
2A1171C81245676A00D119B5 /* MGMAddons.h in Headers */,
|
2A1171C81245676A00D119B5 /* MGMAddons.h in Headers */,
|
||||||
2A1171CA1245676A00D119B5 /* MGMInbox.h in Headers */,
|
2A1171CA1245676A00D119B5 /* MGMInbox.h in Headers */,
|
||||||
2A1171CC1245676A00D119B5 /* MGMInstance.h in Headers */,
|
2A1171CC1245676A00D119B5 /* MGMInstance.h in Headers */,
|
||||||
|
2A7713BF124C6A5B00D68042 /* MGMSound.h in Headers */,
|
||||||
2A1171CE1245676A00D119B5 /* MGMThemeManager.h in Headers */,
|
2A1171CE1245676A00D119B5 /* MGMThemeManager.h in Headers */,
|
||||||
2A1171D01245676A00D119B5 /* MGMSIP.h in Headers */,
|
2A1171D01245676A00D119B5 /* MGMSIP.h in Headers */,
|
||||||
2A1171D21245676A00D119B5 /* MGMSIPAccount.h in Headers */,
|
2A1171D21245676A00D119B5 /* MGMSIPAccount.h in Headers */,
|
||||||
2A1171D41245676A00D119B5 /* MGMSIPCall.h in Headers */,
|
2A1171D41245676A00D119B5 /* MGMSIPCall.h in Headers */,
|
||||||
2A1171D61245676A00D119B5 /* MGMSIPURL.h in Headers */,
|
2A1171D61245676A00D119B5 /* MGMSIPURL.h in Headers */,
|
||||||
2A1171D81245676A00D119B5 /* VoiceBase.h in Headers */,
|
2A1171D81245676A00D119B5 /* VoiceBase.h in Headers */,
|
||||||
|
2A487CA0124BE0AB00E8EE4E /* MGMXMLAddons.h in Headers */,
|
||||||
|
2A487CA2124BE0AB00E8EE4E /* MGMXMLDocument.h in Headers */,
|
||||||
|
2A487CA4124BE0AB00E8EE4E /* MGMXMLDTD.h in Headers */,
|
||||||
|
2A487CA6124BE0AB00E8EE4E /* MGMXMLDTDNode.h in Headers */,
|
||||||
|
2A487CA8124BE0AB00E8EE4E /* MGMXMLElement.h in Headers */,
|
||||||
|
2A487CAA124BE0AB00E8EE4E /* MGMXMLNode.h in Headers */,
|
||||||
|
2A487CAC124BE0AB00E8EE4E /* MGMXMLNodeOptions.h in Headers */,
|
||||||
|
2A487CAF124BE0C400E8EE4E /* MGMXML.h in Headers */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
/* End PBXHeadersBuildPhase section */
|
/* End PBXHeadersBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
|
2AE6EE521249DA0B0006B5AC /* VoiceBase Touch */ = {
|
||||||
|
isa = PBXNativeTarget;
|
||||||
|
buildConfigurationList = 2AE6EE611249DA770006B5AC /* Build configuration list for PBXNativeTarget "VoiceBase Touch" */;
|
||||||
|
buildPhases = (
|
||||||
|
2AE6EE4F1249DA0B0006B5AC /* Headers */,
|
||||||
|
2AE6EE501249DA0B0006B5AC /* Sources */,
|
||||||
|
2AE6EE511249DA0B0006B5AC /* Frameworks */,
|
||||||
|
);
|
||||||
|
buildRules = (
|
||||||
|
);
|
||||||
|
dependencies = (
|
||||||
|
);
|
||||||
|
name = "VoiceBase Touch";
|
||||||
|
productName = "VoiceBase Touch";
|
||||||
|
productReference = 2AE6EE531249DA0B0006B5AC /* libVoiceBase.a */;
|
||||||
|
productType = "com.apple.product-type.library.static";
|
||||||
|
};
|
||||||
8DC2EF4F0486A6940098B216 /* VoiceBase */ = {
|
8DC2EF4F0486A6940098B216 /* VoiceBase */ = {
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "VoiceBase" */;
|
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "VoiceBase" */;
|
||||||
@ -300,6 +527,7 @@
|
|||||||
projectRoot = "";
|
projectRoot = "";
|
||||||
targets = (
|
targets = (
|
||||||
8DC2EF4F0486A6940098B216 /* VoiceBase */,
|
8DC2EF4F0486A6940098B216 /* VoiceBase */,
|
||||||
|
2AE6EE521249DA0B0006B5AC /* VoiceBase Touch */,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* End PBXProject section */
|
/* End PBXProject section */
|
||||||
@ -316,6 +544,32 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
|
2AE6EE501249DA0B0006B5AC /* Sources */ = {
|
||||||
|
isa = PBXSourcesBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
2AE6EE621249DA790006B5AC /* MGMAddressBook.m in Sources */,
|
||||||
|
2AE6EE631249DA790006B5AC /* MGMContacts.m in Sources */,
|
||||||
|
2AE6EE641249DA790006B5AC /* MGMContactsProtocol.m in Sources */,
|
||||||
|
2AE6EE651249DA790006B5AC /* MGMGoogleContacts.m in Sources */,
|
||||||
|
2AE6EE661249DA790006B5AC /* MGMAddons.m in Sources */,
|
||||||
|
2AE6EE671249DA790006B5AC /* MGMInbox.m in Sources */,
|
||||||
|
2AE6EE681249DA790006B5AC /* MGMInstance.m in Sources */,
|
||||||
|
2AE6EE691249DA790006B5AC /* MGMThemeManager.m in Sources */,
|
||||||
|
2A487CB9124BE1E600E8EE4E /* MGMXMLAddons.m in Sources */,
|
||||||
|
2A487CBA124BE1E600E8EE4E /* MGMXMLDocument.m in Sources */,
|
||||||
|
2A487CBB124BE1E600E8EE4E /* MGMXMLDTD.m in Sources */,
|
||||||
|
2A487CBC124BE1E600E8EE4E /* MGMXMLDTDNode.m in Sources */,
|
||||||
|
2A487CBD124BE1E600E8EE4E /* MGMXMLElement.m in Sources */,
|
||||||
|
2A487CBE124BE1E600E8EE4E /* MGMXMLNode.m in Sources */,
|
||||||
|
2AE6EE6A1249DA790006B5AC /* MGMSIP.m in Sources */,
|
||||||
|
2AE6EE6B1249DA790006B5AC /* MGMSIPAccount.m in Sources */,
|
||||||
|
2AE6EE6C1249DA790006B5AC /* MGMSIPCall.m in Sources */,
|
||||||
|
2AE6EE6D1249DA790006B5AC /* MGMSIPURL.m in Sources */,
|
||||||
|
2A77133D124C4CE200D68042 /* MGMSound.m in Sources */,
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
};
|
||||||
8DC2EF540486A6940098B216 /* Sources */ = {
|
8DC2EF540486A6940098B216 /* Sources */ = {
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@ -327,11 +581,18 @@
|
|||||||
2A1171C91245676A00D119B5 /* MGMAddons.m in Sources */,
|
2A1171C91245676A00D119B5 /* MGMAddons.m in Sources */,
|
||||||
2A1171CB1245676A00D119B5 /* MGMInbox.m in Sources */,
|
2A1171CB1245676A00D119B5 /* MGMInbox.m in Sources */,
|
||||||
2A1171CD1245676A00D119B5 /* MGMInstance.m in Sources */,
|
2A1171CD1245676A00D119B5 /* MGMInstance.m in Sources */,
|
||||||
|
2A7713BD124C6A4900D68042 /* MGMSound.m in Sources */,
|
||||||
2A1171CF1245676A00D119B5 /* MGMThemeManager.m in Sources */,
|
2A1171CF1245676A00D119B5 /* MGMThemeManager.m in Sources */,
|
||||||
2A1171D11245676A00D119B5 /* MGMSIP.m in Sources */,
|
2A1171D11245676A00D119B5 /* MGMSIP.m in Sources */,
|
||||||
2A1171D31245676A00D119B5 /* MGMSIPAccount.m in Sources */,
|
2A1171D31245676A00D119B5 /* MGMSIPAccount.m in Sources */,
|
||||||
2A1171D51245676A00D119B5 /* MGMSIPCall.m in Sources */,
|
2A1171D51245676A00D119B5 /* MGMSIPCall.m in Sources */,
|
||||||
2A1171D71245676A00D119B5 /* MGMSIPURL.m in Sources */,
|
2A1171D71245676A00D119B5 /* MGMSIPURL.m in Sources */,
|
||||||
|
2A487CA1124BE0AB00E8EE4E /* MGMXMLAddons.m in Sources */,
|
||||||
|
2A487CA3124BE0AB00E8EE4E /* MGMXMLDocument.m in Sources */,
|
||||||
|
2A487CA5124BE0AB00E8EE4E /* MGMXMLDTD.m in Sources */,
|
||||||
|
2A487CA7124BE0AB00E8EE4E /* MGMXMLDTDNode.m in Sources */,
|
||||||
|
2A487CA9124BE0AB00E8EE4E /* MGMXMLElement.m in Sources */,
|
||||||
|
2A487CAB124BE0AB00E8EE4E /* MGMXMLNode.m in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -367,8 +628,10 @@
|
|||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||||
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||||
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
PRODUCT_NAME = VoiceBase;
|
PRODUCT_NAME = VoiceBase;
|
||||||
WRAPPER_EXTENSION = framework;
|
WRAPPER_EXTENSION = framework;
|
||||||
};
|
};
|
||||||
@ -389,8 +652,10 @@
|
|||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||||
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||||
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
PRODUCT_NAME = VoiceBase;
|
PRODUCT_NAME = VoiceBase;
|
||||||
WRAPPER_EXTENSION = framework;
|
WRAPPER_EXTENSION = framework;
|
||||||
};
|
};
|
||||||
@ -409,6 +674,7 @@
|
|||||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
HEADER_SEARCH_PATHS = /usr/include/libxml2;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
PREBINDING = NO;
|
PREBINDING = NO;
|
||||||
@ -428,6 +694,7 @@
|
|||||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
|
HEADER_SEARCH_PATHS = /usr/include/libxml2;
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||||
PREBINDING = NO;
|
PREBINDING = NO;
|
||||||
SDKROOT = macosx10.5;
|
SDKROOT = macosx10.5;
|
||||||
@ -447,7 +714,10 @@
|
|||||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/include\"";
|
HEADER_SEARCH_PATHS = (
|
||||||
|
/usr/include/libxml2,
|
||||||
|
"\"$(SRCROOT)/SIP/opt/include\"",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/lib\"";
|
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/lib\"";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
ONLY_ACTIVE_ARCH = YES;
|
||||||
@ -479,26 +749,29 @@
|
|||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||||
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||||
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"-lpjsua-universal",
|
"-lg7221codec-universal",
|
||||||
"-lpjsip-ua-universal",
|
"-lgsmcodec-universal",
|
||||||
"-lpjsip-simple-universal",
|
"-lilbccodec-universal",
|
||||||
"-lpjsip-universal",
|
"-lmilenage-universal",
|
||||||
|
"-lpj-universal",
|
||||||
|
"-lpjlib-util-universal",
|
||||||
|
"-lpjmedia-audiodev-universal",
|
||||||
"-lpjmedia-codec-universal",
|
"-lpjmedia-codec-universal",
|
||||||
"-lpjmedia-universal",
|
"-lpjmedia-universal",
|
||||||
"-lpjmedia-audiodev-universal",
|
|
||||||
"-lpjnath-universal",
|
"-lpjnath-universal",
|
||||||
"-lpjlib-util-universal",
|
"-lpjsip-simple-universal",
|
||||||
"-lresample-universal",
|
"-lpjsip-ua-universal",
|
||||||
"-lmilenage-universal",
|
"-lpjsip-universal",
|
||||||
"-lsrtp-universal",
|
"-lpjsua-universal",
|
||||||
"-lgsmcodec-universal",
|
|
||||||
"-lspeex-universal",
|
|
||||||
"-lilbccodec-universal",
|
|
||||||
"-lportaudio-universal",
|
"-lportaudio-universal",
|
||||||
"-lpj-universal",
|
"-lresample-universal",
|
||||||
|
"-lspeex-universal",
|
||||||
|
"-lsrtp-universal",
|
||||||
);
|
);
|
||||||
PRODUCT_NAME = VoiceBase;
|
PRODUCT_NAME = VoiceBase;
|
||||||
WRAPPER_EXTENSION = framework;
|
WRAPPER_EXTENSION = framework;
|
||||||
@ -517,7 +790,10 @@
|
|||||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||||
HEADER_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/include\"";
|
HEADER_SEARCH_PATHS = (
|
||||||
|
/usr/include/libxml2,
|
||||||
|
"\"$(SRCROOT)/SIP/opt/include\"",
|
||||||
|
);
|
||||||
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/lib\"";
|
LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/SIP/opt/lib\"";
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||||
OTHER_CFLAGS = (
|
OTHER_CFLAGS = (
|
||||||
@ -545,32 +821,176 @@
|
|||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBase_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||||
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceBase/Info.plist;
|
||||||
INSTALL_PATH = "@executable_path/../Frameworks";
|
INSTALL_PATH = "@executable_path/../Frameworks";
|
||||||
|
LIBRARY_SEARCH_PATHS = "$(inherited)";
|
||||||
OTHER_LDFLAGS = (
|
OTHER_LDFLAGS = (
|
||||||
"-lpjsua-universal",
|
"-lg7221codec-universal",
|
||||||
"-lpjsip-ua-universal",
|
"-lgsmcodec-universal",
|
||||||
"-lpjsip-simple-universal",
|
"-lilbccodec-universal",
|
||||||
"-lpjsip-universal",
|
"-lmilenage-universal",
|
||||||
|
"-lpj-universal",
|
||||||
|
"-lpjlib-util-universal",
|
||||||
|
"-lpjmedia-audiodev-universal",
|
||||||
"-lpjmedia-codec-universal",
|
"-lpjmedia-codec-universal",
|
||||||
"-lpjmedia-universal",
|
"-lpjmedia-universal",
|
||||||
"-lpjmedia-audiodev-universal",
|
|
||||||
"-lpjnath-universal",
|
"-lpjnath-universal",
|
||||||
"-lpjlib-util-universal",
|
"-lpjsip-simple-universal",
|
||||||
"-lresample-universal",
|
"-lpjsip-ua-universal",
|
||||||
"-lmilenage-universal",
|
"-lpjsip-universal",
|
||||||
"-lsrtp-universal",
|
"-lpjsua-universal",
|
||||||
"-lgsmcodec-universal",
|
|
||||||
"-lspeex-universal",
|
|
||||||
"-lilbccodec-universal",
|
|
||||||
"-lportaudio-universal",
|
"-lportaudio-universal",
|
||||||
"-lpj-universal",
|
"-lresample-universal",
|
||||||
|
"-lspeex-universal",
|
||||||
|
"-lsrtp-universal",
|
||||||
);
|
);
|
||||||
PRODUCT_NAME = VoiceBase;
|
PRODUCT_NAME = VoiceBase;
|
||||||
WRAPPER_EXTENSION = framework;
|
WRAPPER_EXTENSION = framework;
|
||||||
};
|
};
|
||||||
name = "Release SIP";
|
name = "Release SIP";
|
||||||
};
|
};
|
||||||
|
2AE6EE541249DA0E0006B5AC /* Debug */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||||
|
COPY_PHASE_STRIP = NO;
|
||||||
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBaseTouch_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/include\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||||
|
LIBRARY_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/lib\"",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"-ObjC",
|
||||||
|
"-all_load",
|
||||||
|
);
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = VoiceBase;
|
||||||
|
SDKROOT = iphoneos4.0;
|
||||||
|
};
|
||||||
|
name = Debug;
|
||||||
|
};
|
||||||
|
2AE6EE551249DA0E0006B5AC /* Debug SIP */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||||
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBaseTouch_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/include\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||||
|
LIBRARY_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/lib\"",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"-lg7221codec-ios-universal",
|
||||||
|
"-lgsmcodec-ios-universal",
|
||||||
|
"-lilbccodec-ios-universal",
|
||||||
|
"-lmilenage-ios-universal",
|
||||||
|
"-lpj-ios-universal",
|
||||||
|
"-lpjlib-util-ios-universal",
|
||||||
|
"-lpjmedia-audiodev-ios-universal",
|
||||||
|
"-lpjmedia-codec-ios-universal",
|
||||||
|
"-lpjmedia-ios-universal",
|
||||||
|
"-lpjnath-ios-universal",
|
||||||
|
"-lpjsip-ios-universal",
|
||||||
|
"-lpjsip-simple-ios-universal",
|
||||||
|
"-lpjsip-ua-ios-universal",
|
||||||
|
"-lpjsua-ios-universal",
|
||||||
|
"-lresample-ios-universal",
|
||||||
|
"-lspeex-ios-universal",
|
||||||
|
"-lsrtp-ios-universal",
|
||||||
|
"-ObjC",
|
||||||
|
"-all_load",
|
||||||
|
);
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = VoiceBase;
|
||||||
|
SDKROOT = iphoneos4.0;
|
||||||
|
};
|
||||||
|
name = "Debug SIP";
|
||||||
|
};
|
||||||
|
2AE6EE561249DA0E0006B5AC /* Release */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||||
|
COPY_PHASE_STRIP = YES;
|
||||||
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
|
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||||
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBaseTouch_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/include\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||||
|
LIBRARY_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/lib\"",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"-ObjC",
|
||||||
|
"-all_load",
|
||||||
|
);
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = VoiceBase;
|
||||||
|
SDKROOT = iphoneos4.0;
|
||||||
|
ZERO_LINK = NO;
|
||||||
|
};
|
||||||
|
name = Release;
|
||||||
|
};
|
||||||
|
2AE6EE571249DA0E0006B5AC /* Release SIP */ = {
|
||||||
|
isa = XCBuildConfiguration;
|
||||||
|
buildSettings = {
|
||||||
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
|
||||||
|
GCC_PREFIX_HEADER = Classes/VoiceBase/VoiceBaseTouch_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/include\"",
|
||||||
|
);
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 3.1;
|
||||||
|
LIBRARY_SEARCH_PATHS = (
|
||||||
|
"$(inherited)",
|
||||||
|
"\"$(SRCROOT)/Libraries/lib\"",
|
||||||
|
);
|
||||||
|
OTHER_LDFLAGS = (
|
||||||
|
"-lg7221codec-ios-universal",
|
||||||
|
"-lgsmcodec-ios-universal",
|
||||||
|
"-lilbccodec-ios-universal",
|
||||||
|
"-lmilenage-ios-universal",
|
||||||
|
"-lpj-ios-universal",
|
||||||
|
"-lpjlib-util-ios-universal",
|
||||||
|
"-lpjmedia-audiodev-ios-universal",
|
||||||
|
"-lpjmedia-codec-ios-universal",
|
||||||
|
"-lpjmedia-ios-universal",
|
||||||
|
"-lpjnath-ios-universal",
|
||||||
|
"-lpjsip-ios-universal",
|
||||||
|
"-lpjsip-simple-ios-universal",
|
||||||
|
"-lpjsip-ua-ios-universal",
|
||||||
|
"-lpjsua-ios-universal",
|
||||||
|
"-lresample-ios-universal",
|
||||||
|
"-lspeex-ios-universal",
|
||||||
|
"-lsrtp-ios-universal",
|
||||||
|
"-ObjC",
|
||||||
|
"-all_load",
|
||||||
|
);
|
||||||
|
PREBINDING = NO;
|
||||||
|
PRODUCT_NAME = VoiceBase;
|
||||||
|
SDKROOT = iphoneos4.0;
|
||||||
|
};
|
||||||
|
name = "Release SIP";
|
||||||
|
};
|
||||||
/* End XCBuildConfiguration section */
|
/* End XCBuildConfiguration section */
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
/* Begin XCConfigurationList section */
|
||||||
@ -596,6 +1016,17 @@
|
|||||||
defaultConfigurationIsVisible = 0;
|
defaultConfigurationIsVisible = 0;
|
||||||
defaultConfigurationName = Release;
|
defaultConfigurationName = Release;
|
||||||
};
|
};
|
||||||
|
2AE6EE611249DA770006B5AC /* Build configuration list for PBXNativeTarget "VoiceBase Touch" */ = {
|
||||||
|
isa = XCConfigurationList;
|
||||||
|
buildConfigurations = (
|
||||||
|
2AE6EE541249DA0E0006B5AC /* Debug */,
|
||||||
|
2AE6EE551249DA0E0006B5AC /* Debug SIP */,
|
||||||
|
2AE6EE561249DA0E0006B5AC /* Release */,
|
||||||
|
2AE6EE571249DA0E0006B5AC /* Release SIP */,
|
||||||
|
);
|
||||||
|
defaultConfigurationIsVisible = 0;
|
||||||
|
defaultConfigurationName = Release;
|
||||||
|
};
|
||||||
/* End XCConfigurationList section */
|
/* End XCConfigurationList section */
|
||||||
};
|
};
|
||||||
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
|
||||||
|
@ -131,6 +131,13 @@
|
|||||||
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
|
||||||
remoteInfo = VoiceBase;
|
remoteInfo = VoiceBase;
|
||||||
};
|
};
|
||||||
|
2AE6EE591249DA2D0006B5AC /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 2A1175EE1245700300D119B5 /* VoiceBase.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 2AE6EE531249DA0B0006B5AC;
|
||||||
|
remoteInfo = "VoiceBase Touch";
|
||||||
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
/* Begin PBXCopyFilesBuildPhase section */
|
||||||
@ -591,6 +598,7 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
2A1175F31245700300D119B5 /* VoiceBase.framework */,
|
2A1175F31245700300D119B5 /* VoiceBase.framework */,
|
||||||
|
2AE6EE5A1249DA2D0006B5AC /* libVoiceBase.a */,
|
||||||
);
|
);
|
||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -652,6 +660,13 @@
|
|||||||
remoteRef = 2A1175F21245700300D119B5 /* PBXContainerItemProxy */;
|
remoteRef = 2A1175F21245700300D119B5 /* PBXContainerItemProxy */;
|
||||||
sourceTree = BUILT_PRODUCTS_DIR;
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
};
|
};
|
||||||
|
2AE6EE5A1249DA2D0006B5AC /* libVoiceBase.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = libVoiceBase.a;
|
||||||
|
remoteRef = 2AE6EE591249DA2D0006B5AC /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
/* End PBXReferenceProxy section */
|
/* End PBXReferenceProxy section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
@ -949,6 +964,10 @@
|
|||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
/usr/include/libxml2,
|
||||||
|
"\"$(SRCROOT)/SIP/opt/include\"",
|
||||||
|
);
|
||||||
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
PRODUCT_NAME = VoiceMac;
|
PRODUCT_NAME = VoiceMac;
|
||||||
@ -992,6 +1011,10 @@
|
|||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = (
|
||||||
|
/usr/include/libxml2,
|
||||||
|
"\"$(SRCROOT)/SIP/opt/include\"",
|
||||||
|
);
|
||||||
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
PRODUCT_NAME = VoiceMac;
|
PRODUCT_NAME = VoiceMac;
|
||||||
@ -1013,6 +1036,7 @@
|
|||||||
GCC_OPTIMIZATION_LEVEL = 0;
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = /usr/include/libxml2;
|
||||||
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
PRODUCT_NAME = VoiceMac;
|
PRODUCT_NAME = VoiceMac;
|
||||||
@ -1031,6 +1055,7 @@
|
|||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
GCC_PRECOMPILE_PREFIX_HEADER = YES;
|
||||||
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
GCC_PREFIX_HEADER = Classes/VoiceMac/VoiceMac_Prefix.pch;
|
||||||
|
HEADER_SEARCH_PATHS = /usr/include/libxml2;
|
||||||
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
INFOPLIST_FILE = Resources/VoiceMac/Info.plist;
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
INSTALL_PATH = "$(HOME)/Applications";
|
||||||
PRODUCT_NAME = VoiceMac;
|
PRODUCT_NAME = VoiceMac;
|
||||||
|
Loading…
Reference in New Issue
Block a user