Skip to content

Commit

Permalink
merge into IX repos
Browse files Browse the repository at this point in the history
  • Loading branch information
abc-codefab committed Jun 27, 2016
1 parent 82f2594 commit 62ecdcf
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 143 deletions.
2 changes: 1 addition & 1 deletion ObjectiveFlickr-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>org.lukhnos.ObjectiveFlickr</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
34 changes: 25 additions & 9 deletions ObjectiveFlickr.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
6ABF72D10F939BB800B9179E /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 6ABF72D40F939BB800B9179E /* Build configuration list for PBXProject "ObjectiveFlickr" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -326,7 +326,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand Down Expand Up @@ -355,7 +355,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
Expand Down Expand Up @@ -402,8 +402,18 @@
6ABF72D20F939BB800B9179E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -422,6 +432,7 @@
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
RUN_CLANG_STATIC_ANALYZER = YES;
VALID_ARCHS = "i386 ppc ppc7400 ppc970 x86_64";
};
Expand All @@ -430,8 +441,17 @@
6ABF72D30F939BB800B9179E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
Expand Down Expand Up @@ -461,13 +481,11 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_GC = unsupported;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = ObjectiveFlickr;
RUN_CLANG_STATIC_ANALYZER = NO;
Expand All @@ -480,12 +498,10 @@
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_OBJC_GC = unsupported;
GCC_VERSION = "";
IPHONEOS_DEPLOYMENT_TARGET = 4.3;
PRODUCT_NAME = ObjectiveFlickr;
RUN_CLANG_STATIC_ANALYZER = NO;
SDKROOT = iphoneos;
Expand Down
4 changes: 2 additions & 2 deletions Source/OFUtilities.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// OFUtilities.h
//
// Copyright (c) 2009-2011 Lukhnos D. Liu (http://lukhnos.org)
// Copyright (c) 2006-2014 Lukhnos D. Liu (http://lukhnos.org)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -31,7 +31,7 @@ NSString *OFMD5HexStringFromNSString(NSString *inStr);
NSString *OFEscapedURLStringFromNSString(NSString *inStr);
NSString *OFEscapedURLStringFromNSStringWithExtraEscapedChars(NSString *inStr, NSString *inEscChars);

NSString *OFGenerateUUIDString();
NSString *OFGenerateUUIDString(void);

NSString *OFHMACSha1Base64(NSString *inKey, NSString *inMessage);
NSDictionary *OFExtractURLQueryParameter(NSString *inQuery);
Expand Down
4 changes: 2 additions & 2 deletions Source/OFUtilities.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// OFUtilities.m
//
// Copyright (c) 2009-2011 Lukhnos D. Liu (http://lukhnos.org)
// Copyright (c) 2006-2014 Lukhnos D. Liu (http://lukhnos.org)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -65,7 +65,7 @@
#endif
}

NSString *OFGenerateUUIDString()
NSString *OFGenerateUUIDString(void)
{
CFUUIDRef uuid = CFUUIDCreate(NULL);
CFStringRef uuidStr = CFUUIDCreateString(NULL, uuid);
Expand Down
4 changes: 2 additions & 2 deletions Source/OFXMLMapper.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// OFXMLMapper.h
//
// Copyright (c) 2009 Lukhnos D. Liu (http://lukhnos.org)
// Copyright (c) 2006-2014 Lukhnos D. Liu (http://lukhnos.org)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -47,7 +47,7 @@ extern NSString *const OFXMLTextContentKey;
@interface NSDictionary (OFXMLMapperExtension)
- (NSString *)textContent;

#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4
@property (nonatomic, readonly) NSString *textContent;
#endif
@end
2 changes: 1 addition & 1 deletion Source/OFXMLMapper.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// OFXMLMapper.m
//
// Copyright (c) 2009 Lukhnos D. Liu (http://lukhnos.org)
// Copyright (c) 2006-2014 Lukhnos D. Liu (http://lukhnos.org)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
Expand Down
56 changes: 5 additions & 51 deletions Source/ObjectiveFlickr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// ObjectiveFlickr.h
//
// Copyright (c) 2009 Lukhnos D. Liu (http://lukhnos.org)
// Copyright (c) 2006-2014 Lukhnos D. Liu (http://lukhnos.org)
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
Expand Down Expand Up @@ -30,9 +30,13 @@
#import "OFXMLMapper.h"

extern NSString *const OFFlickrSmallSquareSize; // "s" - 75x75
extern NSString *const OFFlickrLargeSquareSize; // "q" - 150x150
extern NSString *const OFFlickrThumbnailSize; // "t" - 100 on longest side
extern NSString *const OFFlickrSmallSize; // "m" - 240 on longest side
extern NSString *const OFFlickrSmallSize320; // "n" - 320 on longest side
extern NSString *const OFFlickrMediumSize; // (no size modifier) - 500 on longest side
extern NSString *const OFFlickrMediumSquareSize640; // "z" - 640x640
extern NSString *const OFFlickrMediumSquareSize800; // "c" - 800x800
extern NSString *const OFFlickrLargeSize; // "b" - 1024 on longest side

extern NSString *const OFFlickrReadPermission;
Expand Down Expand Up @@ -67,7 +71,6 @@ extern NSString *const OFFlickrDeletePermission;

// API endpoints

#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
@property (nonatomic, readonly) NSString *key;
@property (nonatomic, readonly) NSString *sharedSecret;
@property (nonatomic, retain) NSString *authToken;
Expand All @@ -80,32 +83,6 @@ extern NSString *const OFFlickrDeletePermission;

@property (nonatomic, retain) NSString *OAuthToken;
@property (nonatomic, retain) NSString *OAuthTokenSecret;
#else

- (void)setAuthToken:(NSString *)inAuthToken;
- (NSString *)authToken;


- (void)setRESTAPIEndpoint:(NSString *)inEndpoint;
- (NSString *)RESTAPIEndpoint;

- (void)setPhotoSource:(NSString *)inSource;
- (NSString *)photoSource;

- (void)setAuthEndpoint:(NSString *)inEndpoint;
- (NSString *)authEndpoint;

- (void)setUploadEndpoint:(NSString *)inEndpoint;
- (NSString *)uploadEndpoint;

- (void)setOAuthToken:(NSString *)inToken;
- (NSString *)OAuthToken;

- (void)setOAuthTokenSecret:(NSString *)inTokenSecret;
- (NSString *)OAuthTokenSecret;


#endif
@end

extern NSString *const OFFlickrAPIReturnedErrorDomain;
Expand All @@ -130,30 +107,17 @@ extern NSString *const OFFetchOAuthAccessTokenSession;

@class OFFlickrAPIRequest;

#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
@protocol OFFlickrAPIRequestDelegate <NSObject>
@optional
#else
@interface NSObject (OFFlickrAPIRequestDelegateCategory)
#endif
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary;
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didFailWithError:(NSError *)inError;
#if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest imageUploadSentBytes:(NSUInteger)inSentBytes totalBytes:(NSUInteger)inTotalBytes;
#else
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest imageUploadSentBytes:(unsigned int)inSentBytes totalBytes:(unsigned int)inTotalBytes;
#endif

- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didObtainOAuthRequestToken:(NSString *)inRequestToken secret:(NSString *)inSecret;
- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didObtainOAuthAccessToken:(NSString *)inAccessToken secret:(NSString *)inSecret userFullName:(NSString *)inFullName userName:(NSString *)inUserName userNSID:(NSString *)inNSID;

@end

#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
typedef id<OFFlickrAPIRequestDelegate> OFFlickrAPIRequestDelegateType;
#else
typedef id OFFlickrAPIRequestDelegateType;
#endif

@interface OFFlickrAPIRequest : NSObject
{
Expand Down Expand Up @@ -188,19 +152,9 @@ typedef id OFFlickrAPIRequestDelegateType;
// image upload—we use NSInputStream here because we want to have flexibity; with this you can upload either a file or NSData from NSImage
- (BOOL)uploadImageStream:(NSInputStream *)inImageStream suggestedFilename:(NSString *)inFilename MIMEType:(NSString *)inType arguments:(NSDictionary *)inArguments;

#if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4
@property (nonatomic, readonly) OFFlickrAPIContext *context;
@property (nonatomic, assign) OFFlickrAPIRequestDelegateType delegate;
@property (nonatomic, retain) id sessionInfo;
@property (nonatomic, assign) NSTimeInterval requestTimeoutInterval;
#else

- (OFFlickrAPIRequestDelegateType)delegate;
- (void)setDelegate:(OFFlickrAPIRequestDelegateType)inDelegate;

- (id)sessionInfo;
- (void)setSessionInfo:(id)inInfo;

#endif

@end
Loading

0 comments on commit 62ecdcf

Please sign in to comment.