Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 16 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jun 23, 2011
kielgillard Use extra parentheses in expressions involving assignments to let the…
… compiler building products with the -Widiomatic-parentheses flag know this is not an accidental assignment.
c3f6de0
@thekarladam Merge pull request #7 from kielgillard/master
Support for those compiling with -Widiomatic-parentheses
58aa556
View
4 Source/Framework/MPOAuthAPI.m
@@ -53,7 +53,7 @@ - (id)initWithCredentials:(NSDictionary *)inCredentials authenticationURL:(NSURL
}
- (id)initWithCredentials:(NSDictionary *)inCredentials authenticationURL:(NSURL *)inAuthURL andBaseURL:(NSURL *)inBaseURL autoStart:(BOOL)aFlag {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.authenticationURL = inAuthURL;
self.baseURL = inBaseURL;
self.authenticationState = MPOAuthAuthenticationStateUnauthenticated;
@@ -71,7 +71,7 @@ - (id)initWithCredentials:(NSDictionary *)inCredentials authenticationURL:(NSURL
}
- (id)initWithCredentials:(NSDictionary *)inCredentials withConfiguration:(NSDictionary *)inConfiguration autoStart:(BOOL)aFlag {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.authenticationURL = [inConfiguration valueForKey:MPOAuthAuthenticationURLKey];
self.baseURL = [inConfiguration valueForKey:MPOAuthBaseURLKey];
self.authenticationState = MPOAuthAuthenticationStateUnauthenticated;
View
2  Source/Framework/MPOAuthAPIRequestLoader.m
@@ -46,7 +46,7 @@ - (id)initWithURL:(NSURL *)inURL {
}
- (id)initWithRequest:(MPOAuthURLRequest *)inRequest {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.oauthRequest = inRequest;
_dataBuffer = [[NSMutableData alloc] init];
}
View
2  Source/Framework/MPOAuthAuthenticationMethod.m
@@ -35,7 +35,7 @@ - (id)initWithAPI:(MPOAuthAPI *)inAPI forURL:(NSURL *)inURL withConfiguration:(N
[self release];
self = [[methodClass alloc] initWithAPI:inAPI forURL:inURL withConfiguration:configuration];
- } else if (self = [super init]) {
+ } else if ((self = [super init])) {
self.oauthAPI = inAPI;
}
View
2  Source/Framework/MPOAuthAuthenticationMethodAuthExchange.m
@@ -23,7 +23,7 @@ @interface MPOAuthAPI ()
@implementation MPOAuthAuthenticationMethodAuthExchange
- (id)initWithAPI:(MPOAuthAPI *)inAPI forURL:(NSURL *)inURL withConfiguration:(NSDictionary *)inConfig {
- if (self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig]) {
+ if ((self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig])) {
self.oauthGetAccessTokenURL = [NSURL URLWithString:[inConfig objectForKey:MPOAuthAccessTokenURLKey]];
}
return self;
View
2  Source/Framework/MPOAuthAuthenticationMethodOAuth.m
@@ -44,7 +44,7 @@ - (void)_authenticationRequestForAccessToken;
@implementation MPOAuthAuthenticationMethodOAuth
- (id)initWithAPI:(MPOAuthAPI *)inAPI forURL:(NSURL *)inURL withConfiguration:(NSDictionary *)inConfig {
- if (self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig]) {
+ if ((self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig])) {
NSAssert( [inConfig count] >= 3, @"Incorrect number of oauth authorization methods");
self.oauthRequestTokenURL = [NSURL URLWithString:[inConfig objectForKey:MPOAuthRequestTokenURLKey]];
View
2  Source/Framework/MPOAuthAuthenticationMethodXAuth.m
@@ -17,7 +17,7 @@ @interface MPOAuthAPI ()
@implementation MPOAuthAuthenticationMethodXAuth
- (id)initWithAPI:(MPOAuthAPI *)inAPI forURL:(NSURL *)inURL withConfiguration:(NSDictionary *)inConfig {
- if (self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig]) {
+ if ((self = [super initWithAPI:inAPI forURL:inURL withConfiguration:inConfig])) {
self.oauthGetAccessTokenURL = [NSURL URLWithString:[inConfig objectForKey:MPOAuthAccessTokenURLKey]];
}
return self;
View
2  Source/Framework/MPOAuthConnection.m
@@ -39,7 +39,7 @@ + (NSData *)sendSynchronousRequest:(MPOAuthURLRequest *)inRequest usingCredentia
- (id)initWithRequest:(MPOAuthURLRequest *)inRequest delegate:(id)inDelegate credentials:(NSObject <MPOAuthCredentialStore, MPOAuthParameterFactory> *)inCredentials {
[inRequest addParameters:[inCredentials oauthParameters]];
NSURLRequest *urlRequest = [inRequest urlRequestSignedWithSecret:[inCredentials signingKey] usingMethod:[inCredentials signatureMethod]];
- if (self = [super initWithRequest:urlRequest delegate:inDelegate]) {
+ if ((self = [super initWithRequest:urlRequest delegate:inDelegate])) {
_credentials = [inCredentials retain];
}
return self;
View
2  Source/Framework/MPOAuthCredentialConcreteStore.m
@@ -31,7 +31,7 @@ - (id)initWithCredentials:(NSDictionary *)inCredentials forBaseURL:(NSURL *)inBa
}
- (id)initWithCredentials:(NSDictionary *)inCredentials forBaseURL:(NSURL *)inBaseURL withAuthenticationURL:(NSURL *)inAuthenticationURL {
- if (self = [super init]) {
+ if ((self = [super init])) {
store_ = [[NSMutableDictionary alloc] initWithDictionary:inCredentials];
self.baseURL = inBaseURL;
self.authenticationURL = inAuthenticationURL;
View
4 Source/Framework/MPOAuthSignatureParameter.m
@@ -51,7 +51,7 @@ - (id)initWithText:(NSString *)inText andSecret:(NSString *)inSecret forRequest:
if ([inMethod isEqual:kMPOAuthSignatureMethodHMACSHA1]) {
self = [self initUsingHMAC_SHA1WithText:inText andSecret:inSecret forRequest:inRequest];
} else if ([inMethod isEqualToString:kMPOAuthSignatureMethodPlaintext]) {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.name = @"oauth_signature";
self.value = inSecret;
}
@@ -65,7 +65,7 @@ - (id)initWithText:(NSString *)inText andSecret:(NSString *)inSecret forRequest:
}
- (id)initUsingHMAC_SHA1WithText:(NSString *)inText andSecret:(NSString *)inSecret forRequest:(MPOAuthURLRequest *)inRequest {
- if (self = [super init]) {
+ if ((self = [super init])) {
NSString *signatureBaseString = [MPOAuthSignatureParameter signatureBaseStringUsingParameterString:inText forRequest:inRequest];
self.name = @"oauth_signature";
View
4 Source/Framework/MPOAuthURLRequest.m
@@ -20,7 +20,7 @@ @interface MPOAuthURLRequest ()
@implementation MPOAuthURLRequest
- (id)initWithURL:(NSURL *)inURL andParameters:(NSArray *)inParameters {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.url = inURL;
_parameters = inParameters ? [inParameters mutableCopy] : [[NSMutableArray alloc] initWithCapacity:10];
self.HTTPMethod = @"GET";
@@ -29,7 +29,7 @@ - (id)initWithURL:(NSURL *)inURL andParameters:(NSArray *)inParameters {
}
- (id)initWithURLRequest:(NSURLRequest *)inRequest {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.url = [[inRequest URL] urlByRemovingQuery];
self.parameters = [[[MPURLRequestParameter parametersFromString:[[inRequest URL] query]] mutableCopy] autorelease];
self.HTTPMethod = [inRequest HTTPMethod];
View
2  Source/Framework/MPOAuthURLResponse.m
@@ -16,7 +16,7 @@ @interface MPOAuthURLResponse ()
@implementation MPOAuthURLResponse
- (id)init {
- if (self = [super init]) {
+ if ((self = [super init])) {
}
return self;
View
4 Source/Framework/MPURLRequestParameter.m
@@ -111,14 +111,14 @@ + (NSString *)parameterStringForDictionary:(NSDictionary *)inParameterDictionary
#pragma mark -
- (id)init {
- if (self = [super init]) {
+ if ((self = [super init])) {
}
return self;
}
- (id)initWithName:(NSString *)inName andValue:(NSString *)inValue {
- if (self = [super init]) {
+ if ((self = [super init])) {
self.name = inName;
self.value = inValue;
}
View
2  Source/Framework/MPWSLRDDiscoverer.m
@@ -28,7 +28,7 @@ - (void)_foundResourceURL:(NSURL *)inURL forType:(NSString *)urlTypeSought;
@implementation MPWSLRDDiscoverer
- (id)init {
- if (self = [super init]) {
+ if ((self = [super init])) {
}
return self;
View
4 Source/Framework/MPWSXRDDocument.m
@@ -23,13 +23,13 @@ - (BOOL)_parseStringForContent:(NSString *)inString;
@implementation MPWSXRDDocument
- (id)initFromURL:(NSURL *)inURL {
- if (self = [super init]) {
+ if ((self = [super init])) {
}
return self;
}
- (id)iniWithString:(NSString *)inString {
- if (self = [super init]) {
+ if ((self = [super init])) {
[self _parseStringForContent:inString];
}
return self;
View
2  Source/Mobile Test App/UserAuthViewController.m
@@ -13,7 +13,7 @@
@implementation UserAuthViewController
- (id)initWithURL:(NSURL *)inURL {
- if (self = [super initWithNibName:@"UserAuthViewController" bundle:nil]) {
+ if ((self = [super initWithNibName:@"UserAuthViewController" bundle:nil])) {
self.title = @"User Auth";
self.navigationItem.prompt = @"Request Authorization for this application";
self.userAuthURL = inURL;
View
2  Source/Test App/OAuthClientController.m
@@ -11,7 +11,7 @@
@implementation OAuthClientController
- (id)init {
- if (self = [super init]) {
+ if ((self = [super init])) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(requestTokenReceived:) name:MPOAuthNotificationRequestTokenReceived object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(accessTokenReceived:) name:MPOAuthNotificationAccessTokenReceived object:nil];
}

No commit comments for this range

Something went wrong with that request. Please try again.