afmotion 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/AFMotion.gemspec +1 -1
  2. data/Gemfile.lock +1 -1
  3. data/lib/afmotion/version.rb +1 -1
  4. metadata +3 -67
  5. data/examples/AppDotNet/.gitignore +0 -13
  6. data/examples/AppDotNet/Gemfile +0 -4
  7. data/examples/AppDotNet/Gemfile.lock +0 -48
  8. data/examples/AppDotNet/Rakefile +0 -10
  9. data/examples/AppDotNet/app/app_delegate.rb +0 -28
  10. data/examples/AppDotNet/app/global_timeline_view_controller.rb +0 -84
  11. data/examples/AppDotNet/app/post.rb +0 -23
  12. data/examples/AppDotNet/app/post_table_view_cell.rb +0 -44
  13. data/examples/AppDotNet/app/user.rb +0 -9
  14. data/examples/AppDotNet/resources/profile-image-placeholder.png +0 -0
  15. data/examples/AppDotNet/resources/profile-image-placeholder@2x.png +0 -0
  16. data/examples/AppDotNet/spec/main_spec.rb +0 -9
  17. data/examples/AppDotNet/vendor/Podfile.lock +0 -11
  18. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking.podspec +0 -28
  19. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +0 -574
  20. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +0 -1187
  21. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +0 -133
  22. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +0 -341
  23. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +0 -108
  24. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +0 -237
  25. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +0 -71
  26. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +0 -136
  27. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  28. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +0 -131
  29. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +0 -44
  30. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  31. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +0 -145
  32. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +0 -295
  33. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +0 -652
  34. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +0 -89
  35. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +0 -169
  36. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +0 -78
  37. data/examples/AppDotNet/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +0 -180
  38. data/examples/AppDotNet/vendor/Pods/AFNetworking/LICENSE +0 -19
  39. data/examples/AppDotNet/vendor/Pods/AFNetworking/README.md +0 -179
  40. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +0 -574
  41. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +0 -133
  42. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +0 -108
  43. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +0 -71
  44. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  45. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +0 -44
  46. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  47. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +0 -295
  48. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +0 -89
  49. data/examples/AppDotNet/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +0 -78
  50. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +0 -574
  51. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +0 -133
  52. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +0 -108
  53. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +0 -71
  54. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  55. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFNetworking.h +0 -44
  56. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  57. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +0 -295
  58. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +0 -89
  59. data/examples/AppDotNet/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +0 -78
  60. data/examples/AppDotNet/vendor/Pods/Pods-Acknowledgements.markdown +0 -26
  61. data/examples/AppDotNet/vendor/Pods/Pods-Acknowledgements.plist +0 -56
  62. data/examples/AppDotNet/vendor/Pods/Pods-prefix.pch +0 -12
  63. data/examples/AppDotNet/vendor/Pods/Pods-resources.sh +0 -19
  64. data/examples/AppDotNet/vendor/Pods/Pods.bridgesupport +0 -617
  65. data/examples/AppDotNet/vendor/Pods/Pods.xcconfig +0 -7
  66. data/examples/AppDotNet/vendor/Pods/Pods.xcodeproj/project.pbxproj +0 -998
  67. data/examples/AppDotNet/vendor/Pods/PodsDummy_Pods.m +0 -4
  68. data/pkg/afmotion-0.0.1.gem +0 -0
@@ -1,133 +0,0 @@
1
- // AFHTTPRequestOperation.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
- #import "AFURLConnectionOperation.h"
25
-
26
- /**
27
- `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request.
28
- */
29
- @interface AFHTTPRequestOperation : AFURLConnectionOperation
30
-
31
- ///----------------------------------------------
32
- /// @name Getting HTTP URL Connection Information
33
- ///----------------------------------------------
34
-
35
- /**
36
- The last HTTP response received by the operation's connection.
37
- */
38
- @property (readonly, nonatomic, strong) NSHTTPURLResponse *response;
39
-
40
- ///----------------------------------------------------------
41
- /// @name Managing And Checking For Acceptable HTTP Responses
42
- ///----------------------------------------------------------
43
-
44
- /**
45
- A Boolean value that corresponds to whether the status code of the response is within the specified set of acceptable status codes. Returns `YES` if `acceptableStatusCodes` is `nil`.
46
- */
47
- @property (readonly) BOOL hasAcceptableStatusCode;
48
-
49
- /**
50
- A Boolean value that corresponds to whether the MIME type of the response is among the specified set of acceptable content types. Returns `YES` if `acceptableContentTypes` is `nil`.
51
- */
52
- @property (readonly) BOOL hasAcceptableContentType;
53
-
54
- /**
55
- The callback dispatch queue on success. If `NULL` (default), the main queue is used.
56
- */
57
- @property (nonatomic, assign) dispatch_queue_t successCallbackQueue;
58
-
59
- /**
60
- The callback dispatch queue on failure. If `NULL` (default), the main queue is used.
61
- */
62
- @property (nonatomic, assign) dispatch_queue_t failureCallbackQueue;
63
-
64
- ///------------------------------------------------------------
65
- /// @name Managing Acceptable HTTP Status Codes & Content Types
66
- ///------------------------------------------------------------
67
-
68
- /**
69
- Returns an `NSIndexSet` object containing the ranges of acceptable HTTP status codes. When non-`nil`, the operation will set the `error` property to an error in `AFErrorDomain`. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
70
-
71
- By default, this is the range 200 to 299, inclusive.
72
- */
73
- + (NSIndexSet *)acceptableStatusCodes;
74
-
75
- /**
76
- Adds status codes to the set of acceptable HTTP status codes returned by `+acceptableStatusCodes` in subsequent calls by this class and its descendants.
77
-
78
- @param statusCodes The status codes to be added to the set of acceptable HTTP status codes
79
- */
80
- + (void)addAcceptableStatusCodes:(NSIndexSet *)statusCodes;
81
-
82
- /**
83
- Returns an `NSSet` object containing the acceptable MIME types. When non-`nil`, the operation will set the `error` property to an error in `AFErrorDomain`. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17
84
-
85
- By default, this is `nil`.
86
- */
87
- + (NSSet *)acceptableContentTypes;
88
-
89
- /**
90
- Adds content types to the set of acceptable MIME types returned by `+acceptableContentTypes` in subsequent calls by this class and its descendants.
91
-
92
- @param contentTypes The content types to be added to the set of acceptable MIME types
93
- */
94
- + (void)addAcceptableContentTypes:(NSSet *)contentTypes;
95
-
96
-
97
- ///-----------------------------------------------------
98
- /// @name Determining Whether A Request Can Be Processed
99
- ///-----------------------------------------------------
100
-
101
- /**
102
- A Boolean value determining whether or not the class can process the specified request. For example, `AFJSONRequestOperation` may check to make sure the content type was `application/json` or the URL path extension was `.json`.
103
-
104
- @param urlRequest The request that is determined to be supported or not supported for this class.
105
- */
106
- + (BOOL)canProcessRequest:(NSURLRequest *)urlRequest;
107
-
108
- ///-----------------------------------------------------------
109
- /// @name Setting Completion Block Success / Failure Callbacks
110
- ///-----------------------------------------------------------
111
-
112
- /**
113
- Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed.
114
-
115
- @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request.
116
- @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request.
117
-
118
- @discussion This method should be overridden in subclasses in order to specify the response object passed into the success block.
119
- */
120
- - (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
121
- failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;
122
-
123
- @end
124
-
125
- ///----------------
126
- /// @name Functions
127
- ///----------------
128
-
129
- /**
130
- Returns a set of MIME types detected in an HTTP `Accept` or `Content-Type` header.
131
- */
132
- extern NSSet * AFContentTypesFromHTTPHeader(NSString *string);
133
-
@@ -1,108 +0,0 @@
1
- // AFImageRequestOperation.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
- #import "AFHTTPRequestOperation.h"
25
-
26
- #import <Availability.h>
27
-
28
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
29
- #import <UIKit/UIKit.h>
30
- #elif __MAC_OS_X_VERSION_MIN_REQUIRED
31
- #import <Cocoa/Cocoa.h>
32
- #endif
33
-
34
- /**
35
- `AFImageRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading an processing images.
36
-
37
- ## Acceptable Content Types
38
-
39
- By default, `AFImageRequestOperation` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage:
40
-
41
- - `image/tiff`
42
- - `image/jpeg`
43
- - `image/gif`
44
- - `image/png`
45
- - `image/ico`
46
- - `image/x-icon`
47
- - `image/bmp`
48
- - `image/x-bmp`
49
- - `image/x-xbitmap`
50
- - `image/x-win-bitmap`
51
- */
52
- @interface AFImageRequestOperation : AFHTTPRequestOperation
53
-
54
- /**
55
- An image constructed from the response data. If an error occurs during the request, `nil` will be returned, and the `error` property will be set to the error.
56
- */
57
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
58
- @property (readonly, nonatomic, strong) UIImage *responseImage;
59
- #elif __MAC_OS_X_VERSION_MIN_REQUIRED
60
- @property (readonly, nonatomic, strong) NSImage *responseImage;
61
- #endif
62
-
63
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
64
- /**
65
- The scale factor used when interpreting the image data to construct `responseImage`. Specifying a scale factor of 1.0 results in an image whose size matches the pixel-based dimensions of the image. Applying a different scale factor changes the size of the image as reported by the size property. This is set to the value of scale of the main screen by default, which automatically scales images for retina displays, for instance.
66
- */
67
- @property (nonatomic, assign) CGFloat imageScale;
68
- #endif
69
-
70
- /**
71
- Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
72
-
73
- @param urlRequest The request object to be loaded asynchronously during execution of the operation.
74
- @param success A block object to be executed when the request finishes successfully. This block has no return value and takes a single arguments, the image created from the response data of the request.
75
-
76
- @return A new image request operation
77
- */
78
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
79
- + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
80
- success:(void (^)(UIImage *image))success;
81
- #elif __MAC_OS_X_VERSION_MIN_REQUIRED
82
- + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
83
- success:(void (^)(NSImage *image))success;
84
- #endif
85
-
86
- /**
87
- Creates and returns an `AFImageRequestOperation` object and sets the specified success callback.
88
-
89
- @param urlRequest The request object to be loaded asynchronously during execution of the operation.
90
- @param imageProcessingBlock A block object to be executed after the image request finishes successfully, but before the image is returned in the `success` block. This block takes a single argument, the image loaded from the response body, and returns the processed image.
91
- @param success A block object to be executed when the request finishes successfully, with a status code in the 2xx range, and with an acceptable content type (e.g. `image/png`). This block has no return value and takes three arguments: the request object of the operation, the response for the request, and the image created from the response data.
92
- @param failure A block object to be executed when the request finishes unsuccessfully. This block has no return value and takes three arguments: the request object of the operation, the response for the request, and the error associated with the cause for the unsuccessful operation.
93
-
94
- @return A new image request operation
95
- */
96
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
97
- + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
98
- imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock
99
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success
100
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
101
- #elif __MAC_OS_X_VERSION_MIN_REQUIRED
102
- + (AFImageRequestOperation *)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest
103
- imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock
104
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success
105
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure;
106
- #endif
107
-
108
- @end
@@ -1,71 +0,0 @@
1
- // AFJSONRequestOperation.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
- #import "AFHTTPRequestOperation.h"
25
-
26
- /**
27
- `AFJSONRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and working with JSON response data.
28
-
29
- ## Acceptable Content Types
30
-
31
- By default, `AFJSONRequestOperation` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types:
32
-
33
- - `application/json`
34
- - `text/json`
35
-
36
- @warning JSON parsing will use the built-in `NSJSONSerialization` class.
37
- */
38
- @interface AFJSONRequestOperation : AFHTTPRequestOperation
39
-
40
- ///----------------------------
41
- /// @name Getting Response Data
42
- ///----------------------------
43
-
44
- /**
45
- A JSON object constructed from the response data. If an error occurs while parsing, `nil` will be returned, and the `error` property will be set to the error.
46
- */
47
- @property (readonly, nonatomic, strong) id responseJSON;
48
-
49
- /**
50
- Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions".
51
- */
52
- @property (nonatomic, assign) NSJSONReadingOptions JSONReadingOptions;
53
-
54
- ///----------------------------------
55
- /// @name Creating Request Operations
56
- ///----------------------------------
57
-
58
- /**
59
- Creates and returns an `AFJSONRequestOperation` object and sets the specified success and failure callbacks.
60
-
61
- @param urlRequest The request object to be loaded asynchronously during execution of the operation
62
- @param success A block object to be executed when the operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the JSON object created from the response data of request.
63
- @param failure A block object to be executed when the operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data as JSON. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error describing the network or parsing error that occurred.
64
-
65
- @return A new JSON request operation
66
- */
67
- + (AFJSONRequestOperation *)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest
68
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success
69
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure;
70
-
71
- @end
@@ -1,75 +0,0 @@
1
- // AFNetworkActivityIndicatorManager.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
-
25
- #import <Availability.h>
26
-
27
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
28
- #import <UIKit/UIKit.h>
29
-
30
- /**
31
- `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero.
32
-
33
- You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code:
34
-
35
- [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES];
36
-
37
- By setting `isNetworkActivityIndicatorVisible` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself.
38
-
39
- See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information:
40
- http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44
41
- */
42
- @interface AFNetworkActivityIndicatorManager : NSObject
43
-
44
- /**
45
- A Boolean value indicating whether the manager is enabled.
46
-
47
- @discussion If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO.
48
- */
49
- @property (nonatomic, assign, getter = isEnabled) BOOL enabled;
50
-
51
- /**
52
- A Boolean value indicating whether the network activity indicator is currently displayed in the status bar.
53
- */
54
- @property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible;
55
-
56
- /**
57
- Returns the shared network activity indicator manager object for the system.
58
-
59
- @return The systemwide network activity indicator manager.
60
- */
61
- + (AFNetworkActivityIndicatorManager *)sharedManager;
62
-
63
- /**
64
- Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator.
65
- */
66
- - (void)incrementActivityCount;
67
-
68
- /**
69
- Decrements the number of active network requests. If this number becomes zero before decrementing, this will stop animating the status bar network activity indicator.
70
- */
71
- - (void)decrementActivityCount;
72
-
73
- @end
74
-
75
- #endif
@@ -1,44 +0,0 @@
1
- // AFNetworking.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
- #import <Availability.h>
25
-
26
- #ifndef _AFNETWORKING_
27
- #define _AFNETWORKING_
28
-
29
- #import "AFURLConnectionOperation.h"
30
-
31
- #import "AFHTTPRequestOperation.h"
32
- #import "AFJSONRequestOperation.h"
33
- #import "AFXMLRequestOperation.h"
34
- #import "AFPropertyListRequestOperation.h"
35
- #import "AFHTTPClient.h"
36
-
37
- #import "AFImageRequestOperation.h"
38
-
39
- #if __IPHONE_OS_VERSION_MIN_REQUIRED
40
- #import "AFNetworkActivityIndicatorManager.h"
41
- #import "UIImageView+AFNetworking.h"
42
- #endif
43
-
44
- #endif /* _AFNETWORKING_ */
@@ -1,68 +0,0 @@
1
- // AFPropertyListRequestOperation.h
2
- //
3
- // Copyright (c) 2011 Gowalla (http://gowalla.com/)
4
- //
5
- // Permission is hereby granted, free of charge, to any person obtaining a copy
6
- // of this software and associated documentation files (the "Software"), to deal
7
- // in the Software without restriction, including without limitation the rights
8
- // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- // copies of the Software, and to permit persons to whom the Software is
10
- // furnished to do so, subject to the following conditions:
11
- //
12
- // The above copyright notice and this permission notice shall be included in
13
- // all copies or substantial portions of the Software.
14
- //
15
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- // THE SOFTWARE.
22
-
23
- #import <Foundation/Foundation.h>
24
- #import "AFHTTPRequestOperation.h"
25
-
26
- /**
27
- `AFPropertyListRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and deserializing objects with property list (plist) response data.
28
-
29
- ## Acceptable Content Types
30
-
31
- By default, `AFPropertyListRequestOperation` accepts the following MIME types:
32
-
33
- - `application/x-plist`
34
- */
35
- @interface AFPropertyListRequestOperation : AFHTTPRequestOperation
36
-
37
- ///----------------------------
38
- /// @name Getting Response Data
39
- ///----------------------------
40
-
41
- /**
42
- An object deserialized from a plist constructed using the response data.
43
- */
44
- @property (readonly, nonatomic) id responsePropertyList;
45
-
46
- ///--------------------------------------
47
- /// @name Managing Property List Behavior
48
- ///--------------------------------------
49
-
50
- /**
51
- One of the `NSPropertyListMutabilityOptions` options, specifying the mutability of objects deserialized from the property list. By default, this is `NSPropertyListImmutable`.
52
- */
53
- @property (nonatomic, assign) NSPropertyListReadOptions propertyListReadOptions;
54
-
55
- /**
56
- Creates and returns an `AFPropertyListRequestOperation` object and sets the specified success and failure callbacks.
57
-
58
- @param urlRequest The request object to be loaded asynchronously during execution of the operation
59
- @param success A block object to be executed when the operation finishes successfully. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the object deserialized from a plist constructed using the response data.
60
- @param failure A block object to be executed when the operation finishes unsuccessfully, or that finishes successfully, but encountered an error while deserializing the object from a property list. This block has no return value and takes three arguments: the request sent from the client, the response received from the server, and the error describing the network or parsing error that occurred.
61
-
62
- @return A new property list request operation
63
- */
64
- + (AFPropertyListRequestOperation *)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest
65
- success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success
66
- failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure;
67
-
68
- @end