diff --git a/.gitignore b/.gitignore index e0120e8b0c22..da506d02c69a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,14 +36,8 @@ $RECYCLE.BIN/ # Project /Entitlements.plist -Pods/Documentation -Pods/Pods.xcodeproj/*.mode1v3 -Pods/Pods.xcodeproj/*.mode2v3 -Pods/Pods.xcodeproj/*.pbxuser -Pods/Pods.xcodeproj/*.perspectivev3 -Pods/Pods.xcodeproj/project.xcworkspace -Pods/Pods.xcodeproj/xcuserdata -Pods/Documentation/ +Pods +Podfile.lock WordPress.xcworkspace/*.mode1v3 WordPress.xcworkspace/*.mode2v3 WordPress.xcworkspace/*.pbxuser diff --git a/Podfile.lock b/Podfile.lock index 08f9a4a59168..16ea90efd160 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -71,7 +71,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: AFNetworking: 3cbae45f61a9f995cdbd56bd571223910d7f4e44 - CocoaLumberjack: d73e1e317ced14ab930797dda6c17156ff17aaa1 + CocoaLumberjack: 2619775f386bbec1e870eddb5040f870c68726b1 CTidy: 6a35875a96dd441822e620732c1113be19769067 DTCoreText: 8798221d6da3bc079be24e808f152910c6f5e264 DTFoundation: 86e59f373c7a9b9f859f8a9c1debf072979eebec diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPClient.h b/Pods/AFNetworking/AFNetworking/AFHTTPClient.h deleted file mode 100644 index 5551f5d7716e..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +++ /dev/null @@ -1,636 +0,0 @@ -// AFHTTPClient.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFURLConnectionOperation.h" - -#import - -/** - `AFHTTPClient` captures the common patterns of communicating with an web application over HTTP. It encapsulates information like base URL, authorization credentials, and HTTP headers, and uses them to construct and manage the execution of HTTP request operations. - - ## Automatic Content Parsing - - Instances of `AFHTTPClient` may specify which types of requests it expects and should handle by registering HTTP operation classes for automatic parsing. Registered classes will determine whether they can handle a particular request, and then construct a request operation accordingly in `enqueueHTTPRequestOperationWithRequest:success:failure`. - - ## Subclassing Notes - - In most cases, one should create an `AFHTTPClient` subclass for each website or web application that your application communicates with. It is often useful, also, to define a class method that returns a singleton shared HTTP client in each subclass, that persists authentication credentials and other configuration across the entire application. - - ## Methods to Override - - To change the behavior of all url request construction for an `AFHTTPClient` subclass, override `requestWithMethod:path:parameters`. - - To change the behavior of all request operation construction for an `AFHTTPClient` subclass, override `HTTPRequestOperationWithRequest:success:failure`. - - ## Default Headers - - By default, `AFHTTPClient` sets the following HTTP headers: - - - `Accept-Language: (comma-delimited preferred languages), en-us;q=0.8` - - `User-Agent: (generated user agent)` - - You can override these HTTP headers or define new ones using `setDefaultHeader:value:`. - - ## URL Construction Using Relative Paths - - Both `-requestWithMethod:path:parameters:` and `-multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock:` construct URLs from the path relative to the `-baseURL`, using `NSURL +URLWithString:relativeToURL:`. Below are a few examples of how `baseURL` and relative paths interact: - - NSURL *baseURL = [NSURL URLWithString:@"http://example.com/v1/"]; - [NSURL URLWithString:@"foo" relativeToURL:baseURL]; // http://example.com/v1/foo - [NSURL URLWithString:@"foo?bar=baz" relativeToURL:baseURL]; // http://example.com/v1/foo?bar=baz - [NSURL URLWithString:@"/foo" relativeToURL:baseURL]; // http://example.com/foo - [NSURL URLWithString:@"foo/" relativeToURL:baseURL]; // http://example.com/v1/foo - [NSURL URLWithString:@"/foo/" relativeToURL:baseURL]; // http://example.com/foo/ - [NSURL URLWithString:@"http://example2.com/" relativeToURL:baseURL]; // http://example2.com/ - - Also important to note is that a trailing slash will be added to any `baseURL` without one, which would otherwise cause unexpected behavior when constructing URLs using paths without a leading slash. - - ## NSCoding / NSCopying Conformance - - `AFHTTPClient` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. There are a few minor caveats to keep in mind, however: - - - Archives and copies of HTTP clients will be initialized with an empty operation queue. - - NSCoding cannot serialize / deserialize block properties, so an archive of an HTTP client will not include any reachability callback block that may be set. - */ - -#ifdef _SYSTEMCONFIGURATION_H -typedef enum { - AFNetworkReachabilityStatusUnknown = -1, - AFNetworkReachabilityStatusNotReachable = 0, - AFNetworkReachabilityStatusReachableViaWWAN = 1, - AFNetworkReachabilityStatusReachableViaWiFi = 2, -} AFNetworkReachabilityStatus; -#else -#warning SystemConfiguration framework not found in project, or not included in precompiled header. Network reachability functionality will not be available. -#endif - -#ifndef __UTTYPE__ -#if __IPHONE_OS_VERSION_MIN_REQUIRED -#warning MobileCoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available. -#else -#warning CoreServices framework not found in project, or not included in precompiled header. Automatic MIME type detection when uploading files in multipart requests will not be available. -#endif -#endif - -typedef enum { - AFFormURLParameterEncoding, - AFJSONParameterEncoding, - AFPropertyListParameterEncoding, -} AFHTTPClientParameterEncoding; - -@class AFHTTPRequestOperation; -@protocol AFMultipartFormData; - -@interface AFHTTPClient : NSObject - -///--------------------------------------- -/// @name Accessing HTTP Client Properties -///--------------------------------------- - -/** - The url used as the base for paths specified in methods such as `getPath:parameters:success:failure` - */ -@property (readonly, nonatomic, strong) NSURL *baseURL; - -/** - The string encoding used in constructing url requests. This is `NSUTF8StringEncoding` by default. - */ -@property (nonatomic, assign) NSStringEncoding stringEncoding; - -/** - The `AFHTTPClientParameterEncoding` value corresponding to how parameters are encoded into a request body. This is `AFFormURLParameterEncoding` by default. - - @warning Some nested parameter structures, such as a keyed array of hashes containing inconsistent keys (i.e. `@{@"": @[@{@"a" : @(1)}, @{@"b" : @(2)}]}`), cannot be unambiguously represented in query strings. It is strongly recommended that an unambiguous encoding, such as `AFJSONParameterEncoding`, is used when posting complicated or nondeterministic parameter structures. - */ -@property (nonatomic, assign) AFHTTPClientParameterEncoding parameterEncoding; - -/** - The operation queue which manages operations enqueued by the HTTP client. - */ -@property (readonly, nonatomic, strong) NSOperationQueue *operationQueue; - -/** - The reachability status from the device to the current `baseURL` of the `AFHTTPClient`. - - @warning This property requires the `SystemConfiguration` framework. Add it in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). - */ -#ifdef _SYSTEMCONFIGURATION_H -@property (readonly, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; -#endif - -/** - Default SSL pinning mode for each `AFHTTPRequestOperation` which will be enqueued with `enqueueHTTPRequestOperation:`. - */ -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode defaultSSLPinningMode; -#endif - -///--------------------------------------------- -/// @name Creating and Initializing HTTP Clients -///--------------------------------------------- - -/** - Creates and initializes an `AFHTTPClient` object with the specified base URL. - - @param url The base URL for the HTTP client. This argument must not be `nil`. - - @return The newly-initialized HTTP client - */ -+ (instancetype)clientWithBaseURL:(NSURL *)url; - -/** - Initializes an `AFHTTPClient` object with the specified base URL. - - @param url The base URL for the HTTP client. This argument must not be `nil`. - - @discussion This is the designated initializer. - - @return The newly-initialized HTTP client - */ -- (id)initWithBaseURL:(NSURL *)url; - -///----------------------------------- -/// @name Managing Reachability Status -///----------------------------------- - -/** - Sets a callback to be executed when the network availability of the `baseURL` host changes. - - @param block A block object to be executed when the network availability of the `baseURL` host changes.. This block has no return value and takes a single argument which represents the various reachability states from the device to the `baseURL`. - - @warning This method requires the `SystemConfiguration` framework. Add it in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). - */ -#ifdef _SYSTEMCONFIGURATION_H -- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block; -#endif - -///------------------------------- -/// @name Managing HTTP Operations -///------------------------------- - -/** - Attempts to register a subclass of `AFHTTPRequestOperation`, adding it to a chain to automatically generate request operations from a URL request. - - @param operationClass The subclass of `AFHTTPRequestOperation` to register - - @return `YES` if the registration is successful, `NO` otherwise. The only failure condition is if `operationClass` is not a subclass of `AFHTTPRequestOperation`. - - @discussion When `enqueueHTTPRequestOperationWithRequest:success:failure` is invoked, each registered class is consulted in turn to see if it can handle the specific request. The first class to return `YES` when sent a `canProcessRequest:` message is used to create an operation using `initWithURLRequest:` and do `setCompletionBlockWithSuccess:failure:`. There is no guarantee that all registered classes will be consulted. Classes are consulted in the reverse order of their registration. Attempting to register an already-registered class will move it to the top of the list. - */ -- (BOOL)registerHTTPOperationClass:(Class)operationClass; - -/** - Unregisters the specified subclass of `AFHTTPRequestOperation` from the chain of classes consulted when `-requestWithMethod:path:parameters` is called. - - @param operationClass The subclass of `AFHTTPRequestOperation` to register - */ -- (void)unregisterHTTPOperationClass:(Class)operationClass; - -///---------------------------------- -/// @name Managing HTTP Header Values -///---------------------------------- - -/** - Returns the value for the HTTP headers set in request objects created by the HTTP client. - - @param header The HTTP header to return the default value for - - @return The default value for the HTTP header, or `nil` if unspecified - */ -- (NSString *)defaultValueForHeader:(NSString *)header; - -/** - Sets the value for the HTTP headers set in request objects made by the HTTP client. If `nil`, removes the existing value for that header. - - @param header The HTTP header to set a default value for - @param value The value set as default for the specified header, or `nil - */ -- (void)setDefaultHeader:(NSString *)header - value:(NSString *)value; - -/** - Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a basic authentication value with Base64-encoded username and password. This overwrites any existing value for this header. - - @param username The HTTP basic auth username - @param password The HTTP basic auth password - */ -- (void)setAuthorizationHeaderWithUsername:(NSString *)username - password:(NSString *)password; - -/** - Sets the "Authorization" HTTP header set in request objects made by the HTTP client to a token-based authentication value, such as an OAuth access token. This overwrites any existing value for this header. - - @param token The authentication token - */ -- (void)setAuthorizationHeaderWithToken:(NSString *)token; - - -/** - Clears any existing value for the "Authorization" HTTP header. - */ -- (void)clearAuthorizationHeader; - -///------------------------------- -/// @name Managing URL Credentials -///------------------------------- - -/** - Set the default URL credential to be set for request operations. - - @param credential The URL credential - */ -- (void)setDefaultCredential:(NSURLCredential *)credential; - -///------------------------------- -/// @name Creating Request Objects -///------------------------------- - -/** - Creates an `NSMutableURLRequest` object with the specified HTTP method and path. - - If the HTTP method is `GET`, `HEAD`, or `DELETE`, the parameters will be used to construct a url-encoded query string that is appended to the request's URL. Otherwise, the parameters will be encoded according to the value of the `parameterEncoding` property, and set as the request body. - - @param method The HTTP method for the request, such as `GET`, `POST`, `PUT`, or `DELETE`. This parameter must not be `nil`. - @param path The path to be appended to the HTTP client's base URL and used as the request URL. If `nil`, no path will be appended to the base URL. - @param parameters The parameters to be either set as a query string for `GET` requests, or the request HTTP body. - - @return An `NSMutableURLRequest` object - */ -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method - path:(NSString *)path - parameters:(NSDictionary *)parameters; - -/** - Creates an `NSMutableURLRequest` object with the specified HTTP method and path, and constructs a `multipart/form-data` HTTP body, using the specified parameters and multipart form data block. See http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.2 - - @param method The HTTP method for the request. This parameter must not be `GET` or `HEAD`, or `nil`. - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and set in the request HTTP body. - @param block A block that takes a single argument and appends data to the HTTP body. The block argument is an object adopting the `AFMultipartFormData` protocol. This can be used to upload files, encode HTTP body as JSON or XML, or specify multiple values for the same parameter, as one might for array values. - - @discussion Multipart form requests are automatically streamed, reading files directly from disk along with in-memory data in a single HTTP body. The resulting `NSMutableURLRequest` object has an `HTTPBodyStream` property, so refrain from setting `HTTPBodyStream` or `HTTPBody` on this request object, as it will clear out the multipart form body stream. - - @return An `NSMutableURLRequest` object - */ -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - path:(NSString *)path - parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block; - -///------------------------------- -/// @name Creating HTTP Operations -///------------------------------- - -/** - Creates an `AFHTTPRequestOperation`. - - In order to determine what kind of operation is created, each registered subclass conforming to the `AFHTTPClient` protocol is consulted (in reverse order of when they were specified) to see if it can handle the specific request. The first class to return `YES` when sent a `canProcessRequest:` message is used to generate an operation using `HTTPRequestOperationWithRequest:success:failure:`. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - */ -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -///---------------------------------------- -/// @name Managing Enqueued HTTP Operations -///---------------------------------------- - -/** - Enqueues an `AFHTTPRequestOperation` to the HTTP client's operation queue. - - @param operation The HTTP request operation to be enqueued. - */ -- (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation; - -/** - Cancels all operations in the HTTP client's operation queue whose URLs match the specified HTTP method and path. - - @param method The HTTP method to match for the cancelled requests, such as `GET`, `POST`, `PUT`, or `DELETE`. If `nil`, all request operations with URLs matching the path will be cancelled. - @param path The path appended to the HTTP client base URL to match against the cancelled requests. If `nil`, no path will be appended to the base URL. - - @discussion This method only cancels `AFHTTPRequestOperations` whose request URL matches the HTTP client base URL with the path appended. For complete control over the lifecycle of enqueued operations, you can access the `operationQueue` property directly, which allows you to, for instance, cancel operations filtered by a predicate, or simply use `-cancelAllRequests`. Note that the operation queue may include non-HTTP operations, so be sure to check the type before attempting to directly introspect an operation's `request` property. - */ -- (void)cancelAllHTTPOperationsWithMethod:(NSString *)method path:(NSString *)path; - -///--------------------------------------- -/// @name Batching HTTP Request Operations -///--------------------------------------- - -/** - Creates and enqueues an `AFHTTPRequestOperation` to the HTTP client's operation queue for each specified request object into a batch. When each request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. - - @param urlRequests The `NSURLRequest` objects used to create and enqueue operations. - @param progressBlock A block object to be executed upon the completion of each request operation in the batch. This block has no return value and takes two arguments: the number of operations that have already finished execution, and the total number of operations. - @param completionBlock A block object to be executed upon the completion of all of the request operations in the batch. This block has no return value and takes a single argument: the batched request operations. - - @discussion Operations are created by passing the specified `NSURLRequest` objects in `requests`, using `-HTTPRequestOperationWithRequest:success:failure:`, with `nil` for both the `success` and `failure` parameters. - */ -- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)urlRequests - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock; - -/** - Enqueues the specified request operations into a batch. When each request operation finishes, the specified progress block is executed, until all of the request operations have finished, at which point the completion block also executes. - - @param operations The request operations used to be batched and enqueued. - @param progressBlock A block object to be executed upon the completion of each request operation in the batch. This block has no return value and takes two arguments: the number of operations that have already finished execution, and the total number of operations. - @param completionBlock A block object to be executed upon the completion of all of the request operations in the batch. This block has no return value and takes a single argument: the batched request operations. - */ -- (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock; - -///--------------------------- -/// @name Making HTTP Requests -///--------------------------- - -/** - Creates an `AFHTTPRequestOperation` with a `GET` request, and enqueues it to the HTTP client's operation queue. - - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and appended as the query string for the request URL. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (void)getPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates an `AFHTTPRequestOperation` with a `POST` request, and enqueues it to the HTTP client's operation queue. - - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and set in the request HTTP body. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (void)postPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates an `AFHTTPRequestOperation` with a `PUT` request, and enqueues it to the HTTP client's operation queue. - - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and set in the request HTTP body. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (void)putPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates an `AFHTTPRequestOperation` with a `DELETE` request, and enqueues it to the HTTP client's operation queue. - - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and appended as the query string for the request URL. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (void)deletePath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -/** - Creates an `AFHTTPRequestOperation` with a `PATCH` request, and enqueues it to the HTTP client's operation queue. - - @param path The path to be appended to the HTTP client's base URL and used as the request URL. - @param parameters The parameters to be encoded and set in the request HTTP body. - @param success A block object to be executed when the request operation finishes successfully. This block has no return value and takes two arguments: the created request operation and the object created from the response data of request. - @param failure A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the response data. This block has no return value and takes two arguments:, the created request operation and the `NSError` object describing the network or parsing error that occurred. - - @see -HTTPRequestOperationWithRequest:success:failure: - */ -- (void)patchPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; -@end - -///---------------- -/// @name Constants -///---------------- - -/** - ## Network Reachability - - The following constants are provided by `AFHTTPClient` as possible network reachability statuses. - - enum { - AFNetworkReachabilityStatusUnknown, - AFNetworkReachabilityStatusNotReachable, - AFNetworkReachabilityStatusReachableViaWWAN, - AFNetworkReachabilityStatusReachableViaWiFi, - } - - `AFNetworkReachabilityStatusUnknown` - The `baseURL` host reachability is not known. - - `AFNetworkReachabilityStatusNotReachable` - The `baseURL` host cannot be reached. - - `AFNetworkReachabilityStatusReachableViaWWAN` - The `baseURL` host can be reached via a cellular connection, such as EDGE or GPRS. - - `AFNetworkReachabilityStatusReachableViaWiFi` - The `baseURL` host can be reached via a Wi-Fi connection. - - ### Keys for Notification UserInfo Dictionary - - Strings that are used as keys in a `userInfo` dictionary in a network reachability status change notification. - - `AFNetworkingReachabilityNotificationStatusItem` - A key in the userInfo dictionary in a `AFNetworkingReachabilityDidChangeNotification` notification. - The corresponding value is an `NSNumber` object representing the `AFNetworkReachabilityStatus` value for the current reachability status. - - ## Parameter Encoding - - The following constants are provided by `AFHTTPClient` as possible methods for serializing parameters into query string or message body values. - - enum { - AFFormURLParameterEncoding, - AFJSONParameterEncoding, - AFPropertyListParameterEncoding, - } - - `AFFormURLParameterEncoding` - Parameters are encoded into field/key pairs in the URL query string for `GET` `HEAD` and `DELETE` requests, and in the message body otherwise. Dictionary keys are sorted with the `caseInsensitiveCompare:` selector of their description, in order to mitigate the possibility of ambiguous query strings being generated non-deterministically. See the warning for the `parameterEncoding` property for additional information. - - `AFJSONParameterEncoding` - Parameters are encoded into JSON in the message body. - - `AFPropertyListParameterEncoding` - Parameters are encoded into a property list in the message body. - */ - -///---------------- -/// @name Functions -///---------------- - -/** - Returns a query string constructed by a set of parameters, using the specified encoding. - - @param parameters The parameters used to construct the query string - @param encoding The encoding to use in constructing the query string. If you are uncertain of the correct encoding, you should use UTF-8 (`NSUTF8StringEncoding`), which is the encoding designated by RFC 3986 as the correct encoding for use in URLs. - - @discussion Query strings are constructed by collecting each key-value pair, percent escaping a string representation of the key-value pair, and then joining the pairs with "&". - - If a query string pair has a an `NSArray` for its value, each member of the array will be represented in the format `field[]=value1&field[]value2`. Otherwise, the pair will be formatted as "field=value". String representations of both keys and values are derived using the `-description` method. The constructed query string does not include the ? character used to delimit the query component. - - @return A percent-escaped query string - */ -extern NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding encoding); - -///-------------------- -/// @name Notifications -///-------------------- - -/** - Posted when network reachability changes. - This notification assigns no notification object. The `userInfo` dictionary contains an `NSNumber` object under the `AFNetworkingReachabilityNotificationStatusItem` key, representing the `AFNetworkReachabilityStatus` value for the current network reachability. - - @warning In order for network reachability to be monitored, include the `SystemConfiguration` framework in the active target's "Link Binary With Library" build phase, and add `#import ` to the header prefix of the project (`Prefix.pch`). - */ -#ifdef _SYSTEMCONFIGURATION_H -extern NSString * const AFNetworkingReachabilityDidChangeNotification; -extern NSString * const AFNetworkingReachabilityNotificationStatusItem; -#endif - -#pragma mark - - -extern NSUInteger const kAFUploadStream3GSuggestedPacketSize; -extern NSTimeInterval const kAFUploadStream3GSuggestedDelay; - -/** - The `AFMultipartFormData` protocol defines the methods supported by the parameter in the block argument of `AFHTTPClient -multipartFormRequestWithMethod:path:parameters:constructingBodyWithBlock:`. - */ -@protocol AFMultipartFormData - -/** - Appends the HTTP header `Content-Disposition: file; filename=#{generated filename}; name=#{name}"` and `Content-Type: #{generated mimeType}`, followed by the encoded file data and the multipart form boundary. - - @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. - @param name The name to be associated with the specified data. This parameter must not be `nil`. - @param error If an error occurs, upon return contains an `NSError` object that describes the problem. - - @return `YES` if the file data was successfully appended, otherwise `NO`. - - @discussion The filename and MIME type for this data in the form will be automatically generated, using the last path component of the `fileURL` and system associated MIME type for the `fileURL` extension, respectively. - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError * __autoreleasing *)error; - -/** - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. - - @param fileURL The URL corresponding to the file whose content will be appended to the form. This parameter must not be `nil`. - @param name The name to be associated with the specified data. This parameter must not be `nil`. - @param fileName The file name to be used in the `Content-Disposition` header. This parameter must not be `nil`. - @param mimeType The declared MIME type of the file data. This parameter must not be `nil`. - @param error If an error occurs, upon return contains an `NSError` object that describes the problem. - - @return `YES` if the file data was successfully appended otherwise `NO`. - */ -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType - error:(NSError * __autoreleasing *)error; - -/** - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the data from the input stream and the multipart form boundary. - - @param inputStream The input stream to be appended to the form data - @param name The name to be associated with the specified input stream. This parameter must not be `nil`. - @param fileName The filename to be associated with the specified input stream. This parameter must not be `nil`. - @param length The length of the specified input stream in bytes. - @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. - */ -- (void)appendPartWithInputStream:(NSInputStream *)inputStream - name:(NSString *)name - fileName:(NSString *)fileName - length:(unsigned long long)length - mimeType:(NSString *)mimeType; - -/** - Appends the HTTP header `Content-Disposition: file; filename=#{filename}; name=#{name}"` and `Content-Type: #{mimeType}`, followed by the encoded file data and the multipart form boundary. - - @param data The data to be encoded and appended to the form data. - @param name The name to be associated with the specified data. This parameter must not be `nil`. - @param fileName The filename to be associated with the specified data. This parameter must not be `nil`. - @param mimeType The MIME type of the specified data. (For example, the MIME type for a JPEG image is image/jpeg.) For a list of valid MIME types, see http://www.iana.org/assignments/media-types/. This parameter must not be `nil`. - */ -- (void)appendPartWithFileData:(NSData *)data - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType; - -/** - Appends the HTTP headers `Content-Disposition: form-data; name=#{name}"`, followed by the encoded data and the multipart form boundary. - - @param data The data to be encoded and appended to the form data. - @param name The name to be associated with the specified data. This parameter must not be `nil`. - */ - -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name; - - -/** - Appends HTTP headers, followed by the encoded data and the multipart form boundary. - - @param headers The HTTP headers to be appended to the form data. - @param body The data to be encoded and appended to the form data. - */ -- (void)appendPartWithHeaders:(NSDictionary *)headers - body:(NSData *)body; - -/** - Throttles request bandwidth by limiting the packet size and adding a delay for each chunk read from the upload stream. - - @param numberOfBytes Maximum packet size, in number of bytes. The default packet size for an input stream is 32kb. - @param delay Duration of delay each time a packet is read. By default, no delay is set. - - @discussion When uploading over a 3G or EDGE connection, requests may fail with "request body stream exhausted". Setting a maximum packet size and delay according to the recommended values (`kAFUploadStream3GSuggestedPacketSize` and `kAFUploadStream3GSuggestedDelay`) lowers the risk of the input stream exceeding its allocated bandwidth. Unfortunately, as of iOS 6, there is no definite way to distinguish between a 3G, EDGE, or LTE connection. As such, it is not recommended that you throttle bandwidth based solely on network reachability. Instead, you should consider checking for the "request body stream exhausted" in a failure block, and then retrying the request with throttled bandwidth. - */ -- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes - delay:(NSTimeInterval)delay; - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPClient.m b/Pods/AFNetworking/AFNetworking/AFHTTPClient.m deleted file mode 100644 index bd0cab2de87c..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +++ /dev/null @@ -1,1359 +0,0 @@ -// AFHTTPClient.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import "AFHTTPClient.h" -#import "AFHTTPRequestOperation.h" - -#import - -#ifdef _SYSTEMCONFIGURATION_H -#import -#import -#import -#import -#import -#endif - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import -#endif - -#ifdef _SYSTEMCONFIGURATION_H -NSString * const AFNetworkingReachabilityDidChangeNotification = @"com.alamofire.networking.reachability.change"; -NSString * const AFNetworkingReachabilityNotificationStatusItem = @"AFNetworkingReachabilityNotificationStatusItem"; - -typedef SCNetworkReachabilityRef AFNetworkReachabilityRef; -typedef void (^AFNetworkReachabilityStatusBlock)(AFNetworkReachabilityStatus status); -#else -typedef id AFNetworkReachabilityRef; -#endif - -typedef void (^AFCompletionBlock)(void); - -static NSString * AFBase64EncodedStringFromString(NSString *string) { - NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]]; - NSUInteger length = [data length]; - NSMutableData *mutableData = [NSMutableData dataWithLength:((length + 2) / 3) * 4]; - - uint8_t *input = (uint8_t *)[data bytes]; - uint8_t *output = (uint8_t *)[mutableData mutableBytes]; - - for (NSUInteger i = 0; i < length; i += 3) { - NSUInteger value = 0; - for (NSUInteger j = i; j < (i + 3); j++) { - value <<= 8; - if (j < length) { - value |= (0xFF & input[j]); - } - } - - static uint8_t const kAFBase64EncodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - - NSUInteger idx = (i / 3) * 4; - output[idx + 0] = kAFBase64EncodingTable[(value >> 18) & 0x3F]; - output[idx + 1] = kAFBase64EncodingTable[(value >> 12) & 0x3F]; - output[idx + 2] = (i + 1) < length ? kAFBase64EncodingTable[(value >> 6) & 0x3F] : '='; - output[idx + 3] = (i + 2) < length ? kAFBase64EncodingTable[(value >> 0) & 0x3F] : '='; - } - - return [[NSString alloc] initWithData:mutableData encoding:NSASCIIStringEncoding]; -} - -static NSString * AFPercentEscapedQueryStringPairMemberFromStringWithEncoding(NSString *string, NSStringEncoding encoding) { - static NSString * const kAFCharactersToBeEscaped = @":/?&=;+!@#$()~',*"; - static NSString * const kAFCharactersToLeaveUnescaped = @"[]."; - - return (__bridge_transfer NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, (__bridge CFStringRef)kAFCharactersToLeaveUnescaped, (__bridge CFStringRef)kAFCharactersToBeEscaped, CFStringConvertNSStringEncodingToEncoding(encoding)); -} - -#pragma mark - - -@interface AFQueryStringPair : NSObject -@property (readwrite, nonatomic, strong) id field; -@property (readwrite, nonatomic, strong) id value; - -- (id)initWithField:(id)field value:(id)value; - -- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding; -@end - -@implementation AFQueryStringPair -@synthesize field = _field; -@synthesize value = _value; - -- (id)initWithField:(id)field value:(id)value { - self = [super init]; - if (!self) { - return nil; - } - - self.field = field; - self.value = value; - - return self; -} - -- (NSString *)URLEncodedStringValueWithEncoding:(NSStringEncoding)stringEncoding { - if (!self.value || [self.value isEqual:[NSNull null]]) { - return AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.field description], stringEncoding); - } else { - return [NSString stringWithFormat:@"%@=%@", AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.field description], stringEncoding), AFPercentEscapedQueryStringPairMemberFromStringWithEncoding([self.value description], stringEncoding)]; - } -} - -@end - -#pragma mark - - -extern NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary); -extern NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value); - -NSString * AFQueryStringFromParametersWithEncoding(NSDictionary *parameters, NSStringEncoding stringEncoding) { - NSMutableArray *mutablePairs = [NSMutableArray array]; - for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { - [mutablePairs addObject:[pair URLEncodedStringValueWithEncoding:stringEncoding]]; - } - - return [mutablePairs componentsJoinedByString:@"&"]; -} - -NSArray * AFQueryStringPairsFromDictionary(NSDictionary *dictionary) { - return AFQueryStringPairsFromKeyAndValue(nil, dictionary); -} - -NSArray * AFQueryStringPairsFromKeyAndValue(NSString *key, id value) { - NSMutableArray *mutableQueryStringComponents = [NSMutableArray array]; - - if ([value isKindOfClass:[NSDictionary class]]) { - NSDictionary *dictionary = value; - // Sort dictionary keys to ensure consistent ordering in query string, which is important when deserializing potentially ambiguous sequences, such as an array of dictionaries - NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"description" ascending:YES selector:@selector(caseInsensitiveCompare:)]; - [[[dictionary allKeys] sortedArrayUsingDescriptors:[NSArray arrayWithObject:sortDescriptor]] enumerateObjectsUsingBlock:^(id nestedKey, __unused NSUInteger idx, __unused BOOL *stop) { - id nestedValue = [dictionary objectForKey:nestedKey]; - if (nestedValue) { - [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue((key ? [NSString stringWithFormat:@"%@[%@]", key, nestedKey] : nestedKey), nestedValue)]; - } - }]; - } else if ([value isKindOfClass:[NSArray class]]) { - NSArray *array = value; - [array enumerateObjectsUsingBlock:^(id nestedValue, __unused NSUInteger idx, __unused BOOL *stop) { - [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue([NSString stringWithFormat:@"%@[]", key], nestedValue)]; - }]; - } else if ([value isKindOfClass:[NSSet class]]) { - NSSet *set = value; - [set enumerateObjectsUsingBlock:^(id obj, BOOL *stop) { - [mutableQueryStringComponents addObjectsFromArray:AFQueryStringPairsFromKeyAndValue(key, obj)]; - }]; - } else { - [mutableQueryStringComponents addObject:[[AFQueryStringPair alloc] initWithField:key value:value]]; - } - - return mutableQueryStringComponents; -} - -@interface AFStreamingMultipartFormData : NSObject -- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest - stringEncoding:(NSStringEncoding)encoding; - -- (NSMutableURLRequest *)requestByFinalizingMultipartFormData; -@end - -#pragma mark - - -@interface AFHTTPClient () -@property (readwrite, nonatomic, strong) NSURL *baseURL; -@property (readwrite, nonatomic, strong) NSMutableArray *registeredHTTPOperationClassNames; -@property (readwrite, nonatomic, strong) NSMutableDictionary *defaultHeaders; -@property (readwrite, nonatomic, strong) NSURLCredential *defaultCredential; -@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue; -#ifdef _SYSTEMCONFIGURATION_H -@property (readwrite, nonatomic, assign) AFNetworkReachabilityRef networkReachability; -@property (readwrite, nonatomic, assign) AFNetworkReachabilityStatus networkReachabilityStatus; -@property (readwrite, nonatomic, copy) AFNetworkReachabilityStatusBlock networkReachabilityStatusBlock; -#endif - -#ifdef _SYSTEMCONFIGURATION_H -- (void)startMonitoringNetworkReachability; -- (void)stopMonitoringNetworkReachability; -#endif -@end - -@implementation AFHTTPClient -@synthesize baseURL = _baseURL; -@synthesize stringEncoding = _stringEncoding; -@synthesize parameterEncoding = _parameterEncoding; -@synthesize registeredHTTPOperationClassNames = _registeredHTTPOperationClassNames; -@synthesize defaultHeaders = _defaultHeaders; -@synthesize defaultCredential = _defaultCredential; -@synthesize operationQueue = _operationQueue; -#ifdef _SYSTEMCONFIGURATION_H -@synthesize networkReachability = _networkReachability; -@synthesize networkReachabilityStatus = _networkReachabilityStatus; -@synthesize networkReachabilityStatusBlock = _networkReachabilityStatusBlock; -#endif - -+ (instancetype)clientWithBaseURL:(NSURL *)url { - return [[self alloc] initWithBaseURL:url]; -} - -- (id)initWithBaseURL:(NSURL *)url { - NSParameterAssert(url); - - self = [super init]; - if (!self) { - return nil; - } - - // Ensure terminal slash for baseURL path, so that NSURL +URLWithString:relativeToURL: works as expected - if ([[url path] length] > 0 && ![[url absoluteString] hasSuffix:@"/"]) { - url = [url URLByAppendingPathComponent:@""]; - } - - self.baseURL = url; - - self.stringEncoding = NSUTF8StringEncoding; - self.parameterEncoding = AFFormURLParameterEncoding; - - self.registeredHTTPOperationClassNames = [NSMutableArray array]; - - self.defaultHeaders = [NSMutableDictionary dictionary]; - - // Accept-Language HTTP Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 - NSMutableArray *acceptLanguagesComponents = [NSMutableArray array]; - [[NSLocale preferredLanguages] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - float q = 1.0f - (idx * 0.1f); - [acceptLanguagesComponents addObject:[NSString stringWithFormat:@"%@;q=%0.1g", obj, q]]; - *stop = q <= 0.5f; - }]; - [self setDefaultHeader:@"Accept-Language" value:[acceptLanguagesComponents componentsJoinedByString:@", "]]; - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43 - [self setDefaultHeader:@"User-Agent" value:[NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] ? [[UIScreen mainScreen] scale] : 1.0f)]]; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) - [self setDefaultHeader:@"User-Agent" value:[NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]]]; -#endif - -#ifdef _SYSTEMCONFIGURATION_H - self.networkReachabilityStatus = AFNetworkReachabilityStatusUnknown; - [self startMonitoringNetworkReachability]; -#endif - - self.operationQueue = [[NSOperationQueue alloc] init]; - [self.operationQueue setMaxConcurrentOperationCount:NSOperationQueueDefaultMaxConcurrentOperationCount]; - - return self; -} - -- (void)dealloc { -#ifdef _SYSTEMCONFIGURATION_H - [self stopMonitoringNetworkReachability]; -#endif -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, baseURL: %@, defaultHeaders: %@, registeredOperationClasses: %@, operationQueue: %@>", NSStringFromClass([self class]), self, [self.baseURL absoluteString], self.defaultHeaders, self.registeredHTTPOperationClassNames, self.operationQueue]; -} - -#pragma mark - - -#ifdef _SYSTEMCONFIGURATION_H -static BOOL AFURLHostIsIPAddress(NSURL *url) { - struct sockaddr_in sa_in; - struct sockaddr_in6 sa_in6; - - return [url host] && (inet_pton(AF_INET, [[url host] UTF8String], &sa_in) == 1 || inet_pton(AF_INET6, [[url host] UTF8String], &sa_in6) == 1); -} - -static AFNetworkReachabilityStatus AFNetworkReachabilityStatusForFlags(SCNetworkReachabilityFlags flags) { - BOOL isReachable = ((flags & kSCNetworkReachabilityFlagsReachable) != 0); - BOOL needsConnection = ((flags & kSCNetworkReachabilityFlagsConnectionRequired) != 0); - BOOL isNetworkReachable = (isReachable && !needsConnection); - - AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusUnknown; - if (isNetworkReachable == NO) { - status = AFNetworkReachabilityStatusNotReachable; - } -#if TARGET_OS_IPHONE - else if ((flags & kSCNetworkReachabilityFlagsIsWWAN) != 0) { - status = AFNetworkReachabilityStatusReachableViaWWAN; - } -#endif - else { - status = AFNetworkReachabilityStatusReachableViaWiFi; - } - - return status; -} - -static void AFNetworkReachabilityCallback(SCNetworkReachabilityRef __unused target, SCNetworkReachabilityFlags flags, void *info) { - AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); - AFNetworkReachabilityStatusBlock block = (__bridge AFNetworkReachabilityStatusBlock)info; - if (block) { - block(status); - } - - dispatch_async(dispatch_get_main_queue(), ^{ - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter postNotificationName:AFNetworkingReachabilityDidChangeNotification object:nil userInfo:[NSDictionary dictionaryWithObject:[NSNumber numberWithInteger:status] forKey:AFNetworkingReachabilityNotificationStatusItem]]; - }); -} - -static const void * AFNetworkReachabilityRetainCallback(const void *info) { - return (__bridge_retained const void *)([(__bridge AFNetworkReachabilityStatusBlock)info copy]); -} - -static void AFNetworkReachabilityReleaseCallback(const void *info) { - if (info) { - CFRelease(info); - } -} - -- (void)startMonitoringNetworkReachability { - [self stopMonitoringNetworkReachability]; - - if (!self.baseURL) { - return; - } - - self.networkReachability = SCNetworkReachabilityCreateWithName(kCFAllocatorDefault, [[self.baseURL host] UTF8String]); - - if (!self.networkReachability) { - return; - } - - __weak __typeof(&*self)weakSelf = self; - AFNetworkReachabilityStatusBlock callback = ^(AFNetworkReachabilityStatus status) { - __strong __typeof(&*weakSelf)strongSelf = weakSelf; - if (!strongSelf) { - return; - } - - strongSelf.networkReachabilityStatus = status; - if (strongSelf.networkReachabilityStatusBlock) { - strongSelf.networkReachabilityStatusBlock(status); - } - }; - - SCNetworkReachabilityContext context = {0, (__bridge void *)callback, AFNetworkReachabilityRetainCallback, AFNetworkReachabilityReleaseCallback, NULL}; - SCNetworkReachabilitySetCallback(self.networkReachability, AFNetworkReachabilityCallback, &context); - SCNetworkReachabilityScheduleWithRunLoop(self.networkReachability, CFRunLoopGetMain(), (CFStringRef)NSRunLoopCommonModes); - - /* Network reachability monitoring does not establish a baseline for IP addresses as it does for hostnames, so if the base URL host is an IP address, the initial reachability callback is manually triggered. - */ - if (AFURLHostIsIPAddress(self.baseURL)) { - SCNetworkReachabilityFlags flags; - SCNetworkReachabilityGetFlags(self.networkReachability, &flags); - dispatch_async(dispatch_get_main_queue(), ^{ - AFNetworkReachabilityStatus status = AFNetworkReachabilityStatusForFlags(flags); - callback(status); - }); - } -} - -- (void)stopMonitoringNetworkReachability { - if (_networkReachability) { - SCNetworkReachabilityUnscheduleFromRunLoop(_networkReachability, CFRunLoopGetMain(), (CFStringRef)NSRunLoopCommonModes); - CFRelease(_networkReachability); - _networkReachability = NULL; - } -} - -- (void)setReachabilityStatusChangeBlock:(void (^)(AFNetworkReachabilityStatus status))block { - self.networkReachabilityStatusBlock = block; -} -#endif - -#pragma mark - - -- (BOOL)registerHTTPOperationClass:(Class)operationClass { - if (![operationClass isSubclassOfClass:[AFHTTPRequestOperation class]]) { - return NO; - } - - NSString *className = NSStringFromClass(operationClass); - [self.registeredHTTPOperationClassNames removeObject:className]; - [self.registeredHTTPOperationClassNames insertObject:className atIndex:0]; - - return YES; -} - -- (void)unregisterHTTPOperationClass:(Class)operationClass { - NSString *className = NSStringFromClass(operationClass); - [self.registeredHTTPOperationClassNames removeObject:className]; -} - -#pragma mark - - -- (NSString *)defaultValueForHeader:(NSString *)header { - return [self.defaultHeaders valueForKey:header]; -} - -- (void)setDefaultHeader:(NSString *)header value:(NSString *)value { - [self.defaultHeaders setValue:value forKey:header]; -} - -- (void)setAuthorizationHeaderWithUsername:(NSString *)username password:(NSString *)password { - NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password]; - [self setDefaultHeader:@"Authorization" value:[NSString stringWithFormat:@"Basic %@", AFBase64EncodedStringFromString(basicAuthCredentials)]]; -} - -- (void)setAuthorizationHeaderWithToken:(NSString *)token { - [self setDefaultHeader:@"Authorization" value:[NSString stringWithFormat:@"Token token=\"%@\"", token]]; -} - -- (void)clearAuthorizationHeader { - [self.defaultHeaders removeObjectForKey:@"Authorization"]; -} - -#pragma mark - - -- (NSMutableURLRequest *)requestWithMethod:(NSString *)method - path:(NSString *)path - parameters:(NSDictionary *)parameters -{ - NSParameterAssert(method); - - if (!path) { - path = @""; - } - - NSURL *url = [NSURL URLWithString:path relativeToURL:self.baseURL]; - NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:url]; - [request setHTTPMethod:method]; - [request setAllHTTPHeaderFields:self.defaultHeaders]; - - if (parameters) { - if ([method isEqualToString:@"GET"] || [method isEqualToString:@"HEAD"] || [method isEqualToString:@"DELETE"]) { - url = [NSURL URLWithString:[[url absoluteString] stringByAppendingFormat:[path rangeOfString:@"?"].location == NSNotFound ? @"?%@" : @"&%@", AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding)]]; - [request setURL:url]; - } else { - NSString *charset = (__bridge NSString *)CFStringConvertEncodingToIANACharSetName(CFStringConvertNSStringEncodingToEncoding(self.stringEncoding)); - NSError *error = nil; - - switch (self.parameterEncoding) { - case AFFormURLParameterEncoding:; - [request setValue:[NSString stringWithFormat:@"application/x-www-form-urlencoded; charset=%@", charset] forHTTPHeaderField:@"Content-Type"]; - [request setHTTPBody:[AFQueryStringFromParametersWithEncoding(parameters, self.stringEncoding) dataUsingEncoding:self.stringEncoding]]; - break; - case AFJSONParameterEncoding:; - [request setValue:[NSString stringWithFormat:@"application/json; charset=%@", charset] forHTTPHeaderField:@"Content-Type"]; - [request setHTTPBody:[NSJSONSerialization dataWithJSONObject:parameters options:0 error:&error]]; - break; - case AFPropertyListParameterEncoding:; - [request setValue:[NSString stringWithFormat:@"application/x-plist; charset=%@", charset] forHTTPHeaderField:@"Content-Type"]; - [request setHTTPBody:[NSPropertyListSerialization dataWithPropertyList:parameters format:NSPropertyListXMLFormat_v1_0 options:0 error:&error]]; - break; - } - - if (error) { - NSLog(@"%@ %@: %@", [self class], NSStringFromSelector(_cmd), error); - } - } - } - - return request; -} - -- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method - path:(NSString *)path - parameters:(NSDictionary *)parameters - constructingBodyWithBlock:(void (^)(id formData))block -{ - NSParameterAssert(method); - NSParameterAssert(![method isEqualToString:@"GET"] && ![method isEqualToString:@"HEAD"]); - - NSMutableURLRequest *request = [self requestWithMethod:method path:path parameters:nil]; - - __block AFStreamingMultipartFormData *formData = [[AFStreamingMultipartFormData alloc] initWithURLRequest:request stringEncoding:self.stringEncoding]; - - if (parameters) { - for (AFQueryStringPair *pair in AFQueryStringPairsFromDictionary(parameters)) { - NSData *data = nil; - if ([pair.value isKindOfClass:[NSData class]]) { - data = pair.value; - } else if ([pair.value isEqual:[NSNull null]]) { - data = [NSData data]; - } else { - data = [[pair.value description] dataUsingEncoding:self.stringEncoding]; - } - - if (data) { - [formData appendPartWithFormData:data name:[pair.field description]]; - } - } - } - - if (block) { - block(formData); - } - - return [formData requestByFinalizingMultipartFormData]; -} - -- (AFHTTPRequestOperation *)HTTPRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - AFHTTPRequestOperation *operation = nil; - - for (NSString *className in self.registeredHTTPOperationClassNames) { - Class operationClass = NSClassFromString(className); - if (operationClass && [operationClass canProcessRequest:urlRequest]) { - operation = [(AFHTTPRequestOperation *)[operationClass alloc] initWithRequest:urlRequest]; - break; - } - } - - if (!operation) { - operation = [[AFHTTPRequestOperation alloc] initWithRequest:urlRequest]; - } - - [operation setCompletionBlockWithSuccess:success failure:failure]; - - operation.credential = self.defaultCredential; -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ - operation.SSLPinningMode = self.defaultSSLPinningMode; -#endif - - return operation; -} - -#pragma mark - - -- (void)enqueueHTTPRequestOperation:(AFHTTPRequestOperation *)operation { - [self.operationQueue addOperation:operation]; -} - -- (void)cancelAllHTTPOperationsWithMethod:(NSString *)method - path:(NSString *)path -{ - NSString *pathToBeMatched = [[[self requestWithMethod:(method ?: @"GET") path:path parameters:nil] URL] path]; - - for (NSOperation *operation in [self.operationQueue operations]) { - if (![operation isKindOfClass:[AFHTTPRequestOperation class]]) { - continue; - } - - BOOL hasMatchingMethod = !method || [method isEqualToString:[[(AFHTTPRequestOperation *)operation request] HTTPMethod]]; - BOOL hasMatchingPath = [[[[(AFHTTPRequestOperation *)operation request] URL] path] isEqual:pathToBeMatched]; - - if (hasMatchingMethod && hasMatchingPath) { - [operation cancel]; - } - } -} - -- (void)enqueueBatchOfHTTPRequestOperationsWithRequests:(NSArray *)urlRequests - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock -{ - NSMutableArray *mutableOperations = [NSMutableArray array]; - for (NSURLRequest *request in urlRequests) { - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:nil failure:nil]; - [mutableOperations addObject:operation]; - } - - [self enqueueBatchOfHTTPRequestOperations:mutableOperations progressBlock:progressBlock completionBlock:completionBlock]; -} - -- (void)enqueueBatchOfHTTPRequestOperations:(NSArray *)operations - progressBlock:(void (^)(NSUInteger numberOfFinishedOperations, NSUInteger totalNumberOfOperations))progressBlock - completionBlock:(void (^)(NSArray *operations))completionBlock -{ - __block dispatch_group_t dispatchGroup = dispatch_group_create(); - NSBlockOperation *batchedOperation = [NSBlockOperation blockOperationWithBlock:^{ - dispatch_group_notify(dispatchGroup, dispatch_get_main_queue(), ^{ - if (completionBlock) { - completionBlock(operations); - } - }); -#if !OS_OBJECT_USE_OBJC - dispatch_release(dispatchGroup); -#endif - }]; - - for (AFHTTPRequestOperation *operation in operations) { - AFCompletionBlock originalCompletionBlock = [operation.completionBlock copy]; - __weak __typeof(&*operation)weakOperation = operation; - operation.completionBlock = ^{ - __strong __typeof(&*weakOperation)strongOperation = weakOperation; - dispatch_queue_t queue = strongOperation.successCallbackQueue ?: dispatch_get_main_queue(); - dispatch_group_async(dispatchGroup, queue, ^{ - if (originalCompletionBlock) { - originalCompletionBlock(); - } - - __block NSUInteger numberOfFinishedOperations = 0; - [operations enumerateObjectsUsingBlock:^(id obj, __unused NSUInteger idx, __unused BOOL *stop) { - if ([(NSOperation *)obj isFinished]) { - numberOfFinishedOperations++; - } - }]; - - if (progressBlock) { - progressBlock(numberOfFinishedOperations, [operations count]); - } - - dispatch_group_leave(dispatchGroup); - }); - }; - - dispatch_group_enter(dispatchGroup); - [batchedOperation addDependency:operation]; - } - [self.operationQueue addOperations:operations waitUntilFinished:NO]; - [self.operationQueue addOperation:batchedOperation]; -} - -#pragma mark - - -- (void)getPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSURLRequest *request = [self requestWithMethod:@"GET" path:path parameters:parameters]; - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - [self enqueueHTTPRequestOperation:operation]; -} - -- (void)postPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSURLRequest *request = [self requestWithMethod:@"POST" path:path parameters:parameters]; - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - [self enqueueHTTPRequestOperation:operation]; -} - -- (void)putPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSURLRequest *request = [self requestWithMethod:@"PUT" path:path parameters:parameters]; - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - [self enqueueHTTPRequestOperation:operation]; -} - -- (void)deletePath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSURLRequest *request = [self requestWithMethod:@"DELETE" path:path parameters:parameters]; - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - [self enqueueHTTPRequestOperation:operation]; -} - -- (void)patchPath:(NSString *)path - parameters:(NSDictionary *)parameters - success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - NSURLRequest *request = [self requestWithMethod:@"PATCH" path:path parameters:parameters]; - AFHTTPRequestOperation *operation = [self HTTPRequestOperationWithRequest:request success:success failure:failure]; - [self enqueueHTTPRequestOperation:operation]; -} - -#pragma mark - NSCoding - -- (id)initWithCoder:(NSCoder *)aDecoder { - NSURL *baseURL = [aDecoder decodeObjectForKey:@"baseURL"]; - - self = [self initWithBaseURL:baseURL]; - if (!self) { - return nil; - } - - self.stringEncoding = [aDecoder decodeIntegerForKey:@"stringEncoding"]; - self.parameterEncoding = [aDecoder decodeIntegerForKey:@"parameterEncoding"]; - self.registeredHTTPOperationClassNames = [aDecoder decodeObjectForKey:@"registeredHTTPOperationClassNames"]; - self.defaultHeaders = [aDecoder decodeObjectForKey:@"defaultHeaders"]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:self.baseURL forKey:@"baseURL"]; - [aCoder encodeInteger:(NSInteger)self.stringEncoding forKey:@"stringEncoding"]; - [aCoder encodeInteger:self.parameterEncoding forKey:@"parameterEncoding"]; - [aCoder encodeObject:self.registeredHTTPOperationClassNames forKey:@"registeredHTTPOperationClassNames"]; - [aCoder encodeObject:self.defaultHeaders forKey:@"defaultHeaders"]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFHTTPClient *HTTPClient = [[[self class] allocWithZone:zone] initWithBaseURL:self.baseURL]; - - HTTPClient.stringEncoding = self.stringEncoding; - HTTPClient.parameterEncoding = self.parameterEncoding; - HTTPClient.registeredHTTPOperationClassNames = [self.registeredHTTPOperationClassNames copyWithZone:zone]; - HTTPClient.defaultHeaders = [self.defaultHeaders copyWithZone:zone]; -#ifdef _SYSTEMCONFIGURATION_H - HTTPClient.networkReachabilityStatusBlock = self.networkReachabilityStatusBlock; -#endif - return HTTPClient; -} - -@end - -#pragma mark - - -static NSString * const kAFMultipartFormBoundary = @"Boundary+0xAbCdEfGbOuNdArY"; - -static NSString * const kAFMultipartFormCRLF = @"\r\n"; - -static NSInteger const kAFStreamToStreamBufferSize = 1024 * 1024; //1 meg default - -static inline NSString * AFMultipartFormInitialBoundary() { - return [NSString stringWithFormat:@"--%@%@", kAFMultipartFormBoundary, kAFMultipartFormCRLF]; -} - -static inline NSString * AFMultipartFormEncapsulationBoundary() { - return [NSString stringWithFormat:@"%@--%@%@", kAFMultipartFormCRLF, kAFMultipartFormBoundary, kAFMultipartFormCRLF]; -} - -static inline NSString * AFMultipartFormFinalBoundary() { - return [NSString stringWithFormat:@"%@--%@--%@", kAFMultipartFormCRLF, kAFMultipartFormBoundary, kAFMultipartFormCRLF]; -} - -static inline NSString * AFContentTypeForPathExtension(NSString *extension) { -#ifdef __UTTYPE__ - NSString *UTI = (__bridge_transfer NSString *)UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, (__bridge CFStringRef)extension, NULL); - NSString *contentType = (__bridge_transfer NSString *)UTTypeCopyPreferredTagWithClass((__bridge CFStringRef)UTI, kUTTagClassMIMEType); - if (!contentType) { - return @"application/octet-stream"; - } else { - return contentType; - } -#else - return @"application/octet-stream"; -#endif -} - -NSUInteger const kAFUploadStream3GSuggestedPacketSize = 1024 * 16; -NSTimeInterval const kAFUploadStream3GSuggestedDelay = 0.2; - -@interface AFHTTPBodyPart : NSObject -@property (nonatomic, assign) NSStringEncoding stringEncoding; -@property (nonatomic, strong) NSDictionary *headers; -@property (nonatomic, strong) id body; -@property (nonatomic, assign) unsigned long long bodyContentLength; -@property (nonatomic, readonly) NSInputStream *inputStream; - -@property (nonatomic, assign) BOOL hasInitialBoundary; -@property (nonatomic, assign) BOOL hasFinalBoundary; - -@property (nonatomic, readonly, getter = hasBytesAvailable) BOOL bytesAvailable; -@property (nonatomic, readonly) unsigned long long contentLength; - -- (NSInteger)read:(uint8_t *)buffer - maxLength:(NSUInteger)length; -@end - -@interface AFMultipartBodyStreamProvider : NSObject -@property (nonatomic, assign) NSUInteger bufferLength; -@property (nonatomic, assign) NSTimeInterval delay; -@property (nonatomic, readonly) NSInputStream *inputStream; -@property (nonatomic, readonly) unsigned long long contentLength; -@property (nonatomic, readonly, getter = isEmpty) BOOL empty; - -- (id)initWithStringEncoding:(NSStringEncoding)encoding; -- (void)setInitialAndFinalBoundaries; -- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart; -@end - -#pragma mark - - -@interface AFStreamingMultipartFormData () -@property (readwrite, nonatomic, copy) NSMutableURLRequest *request; -@property (readwrite, nonatomic, strong) AFMultipartBodyStreamProvider *bodyStream; -@property (readwrite, nonatomic, assign) NSStringEncoding stringEncoding; -@end - -@implementation AFStreamingMultipartFormData -@synthesize request = _request; -@synthesize bodyStream = _bodyStream; -@synthesize stringEncoding = _stringEncoding; - -- (id)initWithURLRequest:(NSMutableURLRequest *)urlRequest - stringEncoding:(NSStringEncoding)encoding -{ - self = [super init]; - if (!self) { - return nil; - } - - self.request = urlRequest; - self.stringEncoding = encoding; - self.bodyStream = [[AFMultipartBodyStreamProvider alloc] initWithStringEncoding:encoding]; - - return self; -} - -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - error:(NSError * __autoreleasing *)error -{ - NSParameterAssert(fileURL); - NSParameterAssert(name); - - NSString *fileName = [fileURL lastPathComponent]; - NSString *mimeType = AFContentTypeForPathExtension([fileURL pathExtension]); - - return [self appendPartWithFileURL:fileURL name:name fileName:fileName mimeType:mimeType error:error]; -} - -- (BOOL)appendPartWithFileURL:(NSURL *)fileURL - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType - error:(NSError * __autoreleasing *)error -{ - NSParameterAssert(fileURL); - NSParameterAssert(name); - NSParameterAssert(fileName); - NSParameterAssert(mimeType); - - if (![fileURL isFileURL]) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedStringFromTable(@"Expected URL to be a file URL", @"AFNetworking", nil) forKey:NSLocalizedFailureReasonErrorKey]; - if (error != NULL) { - *error = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; - } - - return NO; - } else if ([fileURL checkResourceIsReachableAndReturnError:error] == NO) { - NSDictionary *userInfo = [NSDictionary dictionaryWithObject:NSLocalizedStringFromTable(@"File URL not reachable.", @"AFNetworking", nil) forKey:NSLocalizedFailureReasonErrorKey]; - if (error != NULL) { - *error = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadURL userInfo:userInfo]; - } - - return NO; - } - - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; - [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; - - AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; - bodyPart.stringEncoding = self.stringEncoding; - bodyPart.headers = mutableHeaders; - bodyPart.body = fileURL; - - NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:[fileURL path] error:nil]; - bodyPart.bodyContentLength = [[fileAttributes objectForKey:NSFileSize] unsignedLongLongValue]; - - [self.bodyStream appendHTTPBodyPart:bodyPart]; - - return YES; -} - - -- (void)appendPartWithInputStream:(NSInputStream *)inputStream - name:(NSString *)name - fileName:(NSString *)fileName - length:(unsigned long long)length - mimeType:(NSString *)mimeType -{ - NSParameterAssert(name); - NSParameterAssert(fileName); - NSParameterAssert(mimeType); - - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; - [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; - - - AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; - bodyPart.stringEncoding = self.stringEncoding; - bodyPart.headers = mutableHeaders; - bodyPart.body = inputStream; - - bodyPart.bodyContentLength = length; - - [self.bodyStream appendHTTPBodyPart:bodyPart]; -} - -- (void)appendPartWithFileData:(NSData *)data - name:(NSString *)name - fileName:(NSString *)fileName - mimeType:(NSString *)mimeType -{ - NSParameterAssert(name); - NSParameterAssert(fileName); - NSParameterAssert(mimeType); - - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"; filename=\"%@\"", name, fileName] forKey:@"Content-Disposition"]; - [mutableHeaders setValue:mimeType forKey:@"Content-Type"]; - - [self appendPartWithHeaders:mutableHeaders body:data]; -} - -- (void)appendPartWithFormData:(NSData *)data - name:(NSString *)name -{ - NSParameterAssert(name); - - NSMutableDictionary *mutableHeaders = [NSMutableDictionary dictionary]; - [mutableHeaders setValue:[NSString stringWithFormat:@"form-data; name=\"%@\"", name] forKey:@"Content-Disposition"]; - - [self appendPartWithHeaders:mutableHeaders body:data]; -} - -- (void)appendPartWithHeaders:(NSDictionary *)headers - body:(NSData *)body -{ - NSParameterAssert(body); - - AFHTTPBodyPart *bodyPart = [[AFHTTPBodyPart alloc] init]; - bodyPart.stringEncoding = self.stringEncoding; - bodyPart.headers = headers; - bodyPart.bodyContentLength = [body length]; - bodyPart.body = body; - - [self.bodyStream appendHTTPBodyPart:bodyPart]; -} - -- (void)throttleBandwidthWithPacketSize:(NSUInteger)numberOfBytes - delay:(NSTimeInterval)delay -{ - self.bodyStream.bufferLength = numberOfBytes; - self.bodyStream.delay = delay; -} - -- (NSMutableURLRequest *)requestByFinalizingMultipartFormData { - if ([self.bodyStream isEmpty]) { - return self.request; - } - - // Reset the initial and final boundaries to ensure correct Content-Length - [self.bodyStream setInitialAndFinalBoundaries]; - - [self.request setValue:[NSString stringWithFormat:@"multipart/form-data; boundary=%@", kAFMultipartFormBoundary] forHTTPHeaderField:@"Content-Type"]; - [self.request setValue:[NSString stringWithFormat:@"%llu", [self.bodyStream contentLength]] forHTTPHeaderField:@"Content-Length"]; - [self.request setHTTPBodyStream:self.bodyStream.inputStream]; - - return self.request; -} - -@end - -#pragma mark - - -@interface AFMultipartBodyStreamProvider () -@property (nonatomic, assign) NSStringEncoding stringEncoding; -@property (nonatomic, strong) NSMutableArray *HTTPBodyParts; -@property (nonatomic, strong) NSEnumerator *HTTPBodyPartEnumerator; -@property (nonatomic, strong) AFHTTPBodyPart *currentHTTPBodyPart; -@property (nonatomic, strong) NSInputStream *inputStream; -@property (nonatomic, strong) NSOutputStream *outputStream; -@property (nonatomic, strong) NSMutableData *buffer; -@end - -static const NSUInteger AFMultipartBodyStreamProviderDefaultBufferLength = 4096; - -@implementation AFMultipartBodyStreamProvider { -@private - // Workaround for stream delegates being weakly referenced, but otherwise unowned - __strong id _self; -} -@synthesize stringEncoding = _stringEncoding; -@synthesize HTTPBodyParts = _HTTPBodyParts; -@synthesize HTTPBodyPartEnumerator = _HTTPBodyPartEnumerator; -@synthesize currentHTTPBodyPart = _currentHTTPBodyPart; -@synthesize inputStream = _inputStream; -@synthesize outputStream = _outputStream; -@synthesize buffer = _buffer; -@synthesize bufferLength = _numberOfBytesInPacket; -@synthesize delay = _delay; - -- (id)initWithStringEncoding:(NSStringEncoding)encoding { - self = [super init]; - if (!self) { - return nil; - } - - self.stringEncoding = encoding; - self.HTTPBodyParts = [NSMutableArray array]; - self.bufferLength = NSIntegerMax; - - self.buffer = [[NSMutableData alloc] init]; - self.bufferLength = AFMultipartBodyStreamProviderDefaultBufferLength; - - return self; -} - -- (void)dealloc { - _outputStream.delegate = nil; -} - -- (void)setInitialAndFinalBoundaries { - if ([self.HTTPBodyParts count] > 0) { - for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { - bodyPart.hasInitialBoundary = NO; - bodyPart.hasFinalBoundary = NO; - } - - [[self.HTTPBodyParts objectAtIndex:0] setHasInitialBoundary:YES]; - [[self.HTTPBodyParts lastObject] setHasFinalBoundary:YES]; - } -} - -- (void)appendHTTPBodyPart:(AFHTTPBodyPart *)bodyPart { - [self.HTTPBodyParts addObject:bodyPart]; -} - -- (NSInputStream *)inputStream { - if (_inputStream == nil) { - CFReadStreamRef readStream; - CFWriteStreamRef writeStream; - CFStreamCreateBoundPair(NULL, &readStream, &writeStream, self.bufferLength); - _inputStream = CFBridgingRelease(readStream); - _outputStream = CFBridgingRelease(writeStream); - - _outputStream.delegate = self; - if ([NSThread isMainThread]) { - [_outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - } else { - dispatch_sync(dispatch_get_main_queue(), ^{ - [_outputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - }); - } - [_outputStream open]; - - _self = self; - } - - return _inputStream; -} - -- (BOOL)isEmpty { - return [self.HTTPBodyParts count] == 0; -} - -#pragma mark - NSStreamDelegate - -- (void)stream:(NSStream *)stream - handleEvent:(NSStreamEvent)eventCode -{ - if (eventCode & NSStreamEventHasSpaceAvailable) { - [self handleOutputStreamSpaceAvailable]; - } -} - -- (void)handleOutputStreamSpaceAvailable { - while ([_outputStream hasSpaceAvailable]) { - if ([_buffer length] > 0) { - NSInteger numberOfBytesWritten = [_outputStream write:[_buffer bytes] maxLength:[_buffer length]]; - if (numberOfBytesWritten < 0) { - [self close]; - return; - } - - [_buffer replaceBytesInRange:NSMakeRange(0, numberOfBytesWritten) withBytes:NULL length:0]; - } else { - if (!self.currentHTTPBodyPart) { - if (!self.HTTPBodyPartEnumerator) { - self.HTTPBodyPartEnumerator = [self.HTTPBodyParts objectEnumerator]; - } - self.currentHTTPBodyPart = [self.HTTPBodyPartEnumerator nextObject]; - } - - if (!self.currentHTTPBodyPart) { - [self close]; - return; - } - - [_buffer setLength:self.bufferLength]; - - NSInteger numberOfBytesRead = [self.currentHTTPBodyPart read:[_buffer mutableBytes] maxLength:[_buffer length]]; - if (numberOfBytesRead < 0) { - [self close]; - return; - } - - [_buffer setLength:numberOfBytesRead]; - - if(numberOfBytesRead == 0) { - self.currentHTTPBodyPart = nil; - } - - if (self.delay > 0.0f) { - [NSThread sleepForTimeInterval:self.delay]; - } - } - } -} - -- (void)close { - [_outputStream close]; - _outputStream.delegate = nil; - - _self = nil; -} - -- (unsigned long long)contentLength { - unsigned long long length = 0; - for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { - length += [bodyPart contentLength]; - } - - return length; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFMultipartBodyStreamProvider *bodyStreamCopy = [[[self class] allocWithZone:zone] initWithStringEncoding:self.stringEncoding]; - - for (AFHTTPBodyPart *bodyPart in self.HTTPBodyParts) { - [bodyStreamCopy appendHTTPBodyPart:[bodyPart copy]]; - } - - [bodyStreamCopy setInitialAndFinalBoundaries]; - - return bodyStreamCopy; -} - -@end - -#pragma mark - - -typedef enum { - AFInitialPhase = 0, - AFEncapsulationBoundaryPhase = 1, - AFHeaderPhase = 2, - AFBodyPhase = 3, - AFFinalBoundaryPhase = 4, - AFCompletedPhase = 5, -} AFHTTPBodyPartReadPhase; - -@interface AFHTTPBodyPart () { - AFHTTPBodyPartReadPhase _phase; - NSInputStream *_inputStream; - unsigned long long _phaseReadOffset; -} - -- (BOOL)transitionToNextPhase; -- (NSInteger)readData:(NSData *)data - intoBuffer:(uint8_t *)buffer - maxLength:(NSUInteger)length; -@end - -@implementation AFHTTPBodyPart -@synthesize stringEncoding = _stringEncoding; -@synthesize headers = _headers; -@synthesize body = _body; -@synthesize bodyContentLength = _bodyContentLength; -@synthesize hasInitialBoundary = _hasInitialBoundary; -@synthesize hasFinalBoundary = _hasFinalBoundary; - -- (id)init { - self = [super init]; - if (!self) { - return nil; - } - - [self transitionToNextPhase]; - - return self; -} - -- (void)dealloc { - if (_inputStream) { - [_inputStream close]; - _inputStream = nil; - } -} - -- (NSInputStream *)inputStream { - if (!_inputStream) { - if ([self.body isKindOfClass:[NSData class]]) { - _inputStream = [NSInputStream inputStreamWithData:self.body]; - } else if ([self.body isKindOfClass:[NSURL class]]) { - _inputStream = [NSInputStream inputStreamWithURL:self.body]; - } else if ([self.body isKindOfClass:[NSInputStream class]]) { - _inputStream = self.body; - } - } - - return _inputStream; -} - -- (NSString *)stringForHeaders { - NSMutableString *headerString = [NSMutableString string]; - for (NSString *field in [self.headers allKeys]) { - [headerString appendString:[NSString stringWithFormat:@"%@: %@%@", field, [self.headers valueForKey:field], kAFMultipartFormCRLF]]; - } - [headerString appendString:kAFMultipartFormCRLF]; - - return [NSString stringWithString:headerString]; -} - -- (unsigned long long)contentLength { - unsigned long long length = 0; - - NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding]; - length += [encapsulationBoundaryData length]; - - NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; - length += [headersData length]; - - length += _bodyContentLength; - - NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]); - length += [closingBoundaryData length]; - - return length; -} - -- (BOOL)hasBytesAvailable { - // Allows `read:maxLength:` to be called again if `AFMultipartFormFinalBoundary` doesn't fit into the available buffer - if (_phase == AFFinalBoundaryPhase) { - return YES; - } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wcovered-switch-default" - switch (self.inputStream.streamStatus) { - case NSStreamStatusNotOpen: - case NSStreamStatusOpening: - case NSStreamStatusOpen: - case NSStreamStatusReading: - case NSStreamStatusWriting: - return YES; - case NSStreamStatusAtEnd: - case NSStreamStatusClosed: - case NSStreamStatusError: - default: - return NO; - } -#pragma clang diagnostic pop - -} - -- (NSInteger)read:(uint8_t *)buffer - maxLength:(NSUInteger)length -{ - NSInteger bytesRead = 0; - - if (_phase == AFEncapsulationBoundaryPhase) { - NSData *encapsulationBoundaryData = [([self hasInitialBoundary] ? AFMultipartFormInitialBoundary() : AFMultipartFormEncapsulationBoundary()) dataUsingEncoding:self.stringEncoding]; - bytesRead += [self readData:encapsulationBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)]; - } - - if (_phase == AFHeaderPhase) { - NSData *headersData = [[self stringForHeaders] dataUsingEncoding:self.stringEncoding]; - bytesRead += [self readData:headersData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)]; - } - - if (_phase == AFBodyPhase) { - if ([self.inputStream hasBytesAvailable]) { - bytesRead += [self.inputStream read:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)]; - } - - if (![self.inputStream hasBytesAvailable]) { - [self transitionToNextPhase]; - } - } - - if (_phase == AFFinalBoundaryPhase) { - NSData *closingBoundaryData = ([self hasFinalBoundary] ? [AFMultipartFormFinalBoundary() dataUsingEncoding:self.stringEncoding] : [NSData data]); - bytesRead += [self readData:closingBoundaryData intoBuffer:&buffer[bytesRead] maxLength:(length - (NSUInteger)bytesRead)]; - } - - return bytesRead; -} - -- (NSInteger)readData:(NSData *)data - intoBuffer:(uint8_t *)buffer - maxLength:(NSUInteger)length -{ - NSRange range = NSMakeRange((NSUInteger)_phaseReadOffset, MIN([data length] - ((NSUInteger)_phaseReadOffset), length)); - [data getBytes:buffer range:range]; - - _phaseReadOffset += range.length; - - if (((NSUInteger)_phaseReadOffset) >= [data length]) { - [self transitionToNextPhase]; - } - - return (NSInteger)range.length; -} - -- (BOOL)transitionToNextPhase { - if (![[NSThread currentThread] isMainThread]) { - [self performSelectorOnMainThread:@selector(transitionToNextPhase) withObject:nil waitUntilDone:YES]; - return YES; - } - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wcovered-switch-default" - switch (_phase) { - case AFInitialPhase: - _phase = AFEncapsulationBoundaryPhase; - break; - case AFEncapsulationBoundaryPhase: - _phase = AFHeaderPhase; - break; - case AFHeaderPhase: - [self.inputStream scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; - [self.inputStream open]; - _phase = AFBodyPhase; - break; - case AFBodyPhase: - [self.inputStream close]; - _phase = AFFinalBoundaryPhase; - break; - case AFFinalBoundaryPhase: - case AFCompletedPhase: - default: - _phase = AFCompletedPhase; - break; - } - _phaseReadOffset = 0; -#pragma clang diagnostic pop - - return YES; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFHTTPBodyPart *bodyPart = [[[self class] allocWithZone:zone] init]; - - bodyPart.stringEncoding = self.stringEncoding; - bodyPart.headers = self.headers; - bodyPart.bodyContentLength = self.bodyContentLength; - bodyPart.body = self.body; - - return bodyPart; -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h deleted file mode 100644 index 2ec99ac6bd78..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +++ /dev/null @@ -1,133 +0,0 @@ -// AFHTTPRequestOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFURLConnectionOperation.h" - -/** - `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. - */ -@interface AFHTTPRequestOperation : AFURLConnectionOperation - -///---------------------------------------------- -/// @name Getting HTTP URL Connection Information -///---------------------------------------------- - -/** - The last HTTP response received by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSHTTPURLResponse *response; - -///---------------------------------------------------------- -/// @name Managing And Checking For Acceptable HTTP Responses -///---------------------------------------------------------- - -/** - 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`. - */ -@property (nonatomic, readonly) BOOL hasAcceptableStatusCode; - -/** - 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`. - */ -@property (nonatomic, readonly) BOOL hasAcceptableContentType; - -/** - The callback dispatch queue on success. If `NULL` (default), the main queue is used. - */ -@property (nonatomic, assign) dispatch_queue_t successCallbackQueue; - -/** - The callback dispatch queue on failure. If `NULL` (default), the main queue is used. - */ -@property (nonatomic, assign) dispatch_queue_t failureCallbackQueue; - -///------------------------------------------------------------ -/// @name Managing Acceptable HTTP Status Codes & Content Types -///------------------------------------------------------------ - -/** - 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 - - By default, this is the range 200 to 299, inclusive. - */ -+ (NSIndexSet *)acceptableStatusCodes; - -/** - Adds status codes to the set of acceptable HTTP status codes returned by `+acceptableStatusCodes` in subsequent calls by this class and its descendants. - - @param statusCodes The status codes to be added to the set of acceptable HTTP status codes - */ -+ (void)addAcceptableStatusCodes:(NSIndexSet *)statusCodes; - -/** - 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 - - By default, this is `nil`. - */ -+ (NSSet *)acceptableContentTypes; - -/** - Adds content types to the set of acceptable MIME types returned by `+acceptableContentTypes` in subsequent calls by this class and its descendants. - - @param contentTypes The content types to be added to the set of acceptable MIME types - */ -+ (void)addAcceptableContentTypes:(NSSet *)contentTypes; - - -///----------------------------------------------------- -/// @name Determining Whether A Request Can Be Processed -///----------------------------------------------------- - -/** - 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`. - - @param urlRequest The request that is determined to be supported or not supported for this class. - */ -+ (BOOL)canProcessRequest:(NSURLRequest *)urlRequest; - -///----------------------------------------------------------- -/// @name Setting Completion Block Success / Failure Callbacks -///----------------------------------------------------------- - -/** - 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. - - @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. - @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. - - @discussion This method should be overridden in subclasses in order to specify the response object passed into the success block. - */ -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; - -@end - -///---------------- -/// @name Functions -///---------------- - -/** - Returns a set of MIME types detected in an HTTP `Accept` or `Content-Type` header. - */ -extern NSSet * AFContentTypesFromHTTPHeader(NSString *string); - diff --git a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m deleted file mode 100644 index 98aa07cd1f19..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +++ /dev/null @@ -1,318 +0,0 @@ -// AFHTTPRequestOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFHTTPRequestOperation.h" -#import - -// Workaround for change in imp_implementationWithBlock() with Xcode 4.5 -#if defined(__IPHONE_6_0) || defined(__MAC_10_8) -#define AF_CAST_TO_BLOCK id -#else -#define AF_CAST_TO_BLOCK __bridge void * -#endif - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wstrict-selector-match" - -NSSet * AFContentTypesFromHTTPHeader(NSString *string) { - if (!string) { - return nil; - } - - NSArray *mediaRanges = [string componentsSeparatedByString:@","]; - NSMutableSet *mutableContentTypes = [NSMutableSet setWithCapacity:mediaRanges.count]; - - [mediaRanges enumerateObjectsUsingBlock:^(NSString *mediaRange, __unused NSUInteger idx, __unused BOOL *stop) { - NSRange parametersRange = [mediaRange rangeOfString:@";"]; - if (parametersRange.location != NSNotFound) { - mediaRange = [mediaRange substringToIndex:parametersRange.location]; - } - - mediaRange = [mediaRange stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - - if (mediaRange.length > 0) { - [mutableContentTypes addObject:mediaRange]; - } - }]; - - return [NSSet setWithSet:mutableContentTypes]; -} - -static void AFGetMediaTypeAndSubtypeWithString(NSString *string, NSString **type, NSString **subtype) { - NSScanner *scanner = [NSScanner scannerWithString:string]; - [scanner setCharactersToBeSkipped:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; - [scanner scanUpToString:@"/" intoString:type]; - [scanner scanString:@"/" intoString:nil]; - [scanner scanUpToString:@";" intoString:subtype]; -} - -static NSString * AFStringFromIndexSet(NSIndexSet *indexSet) { - NSMutableString *string = [NSMutableString string]; - - NSRange range = NSMakeRange([indexSet firstIndex], 1); - while (range.location != NSNotFound) { - NSUInteger nextIndex = [indexSet indexGreaterThanIndex:range.location]; - while (nextIndex == range.location + range.length) { - range.length++; - nextIndex = [indexSet indexGreaterThanIndex:nextIndex]; - } - - if (string.length) { - [string appendString:@","]; - } - - if (range.length == 1) { - [string appendFormat:@"%lu", (long)range.location]; - } else { - NSUInteger firstIndex = range.location; - NSUInteger lastIndex = firstIndex + range.length - 1; - [string appendFormat:@"%lu-%lu", (long)firstIndex, (long)lastIndex]; - } - - range.location = nextIndex; - range.length = 1; - } - - return string; -} - -static void AFSwizzleClassMethodWithClassAndSelectorUsingBlock(Class klass, SEL selector, id block) { - Method originalMethod = class_getClassMethod(klass, selector); - IMP implementation = imp_implementationWithBlock((AF_CAST_TO_BLOCK)block); - class_replaceMethod(objc_getMetaClass([NSStringFromClass(klass) UTF8String]), selector, implementation, method_getTypeEncoding(originalMethod)); -} - -#pragma mark - - -@interface AFHTTPRequestOperation () -@property (readwrite, nonatomic, strong) NSURLRequest *request; -@property (readwrite, nonatomic, strong) NSHTTPURLResponse *response; -@property (readwrite, nonatomic, strong) NSError *HTTPError; -@end - -@implementation AFHTTPRequestOperation -@synthesize HTTPError = _HTTPError; -@synthesize successCallbackQueue = _successCallbackQueue; -@synthesize failureCallbackQueue = _failureCallbackQueue; -@dynamic request; -@dynamic response; - -- (void)dealloc { - if (_successCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_release(_successCallbackQueue); -#endif - _successCallbackQueue = NULL; - } - - if (_failureCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_release(_failureCallbackQueue); -#endif - _failureCallbackQueue = NULL; - } -} - -- (NSError *)error { - if (!self.HTTPError && self.response) { - if (![self hasAcceptableStatusCode] || ![self hasAcceptableContentType]) { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - [userInfo setValue:self.responseString forKey:NSLocalizedRecoverySuggestionErrorKey]; - [userInfo setValue:[self.request URL] forKey:NSURLErrorFailingURLErrorKey]; - [userInfo setValue:self.request forKey:AFNetworkingOperationFailingURLRequestErrorKey]; - [userInfo setValue:self.response forKey:AFNetworkingOperationFailingURLResponseErrorKey]; - - if (![self hasAcceptableStatusCode]) { - NSUInteger statusCode = ([self.response isKindOfClass:[NSHTTPURLResponse class]]) ? (NSUInteger)[self.response statusCode] : 200; - [userInfo setValue:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Expected status code in (%@), got %d", @"AFNetworking", nil), AFStringFromIndexSet([[self class] acceptableStatusCodes]), statusCode] forKey:NSLocalizedDescriptionKey]; - self.HTTPError = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorBadServerResponse userInfo:userInfo]; - } else if (![self hasAcceptableContentType]) { - // Don't invalidate content type if there is no content - if ([self.responseData length] > 0) { - [userInfo setValue:[NSString stringWithFormat:NSLocalizedStringFromTable(@"Expected content type %@, got %@", @"AFNetworking", nil), [[self class] acceptableContentTypes], [self.response MIMEType]] forKey:NSLocalizedDescriptionKey]; - self.HTTPError = [[NSError alloc] initWithDomain:AFNetworkingErrorDomain code:NSURLErrorCannotDecodeContentData userInfo:userInfo]; - } - } - } - } - - if (self.HTTPError) { - return self.HTTPError; - } else { - return [super error]; - } -} - -- (NSStringEncoding)responseStringEncoding { - // When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to have a default charset value of "ISO-8859-1" when received via HTTP. Data in character sets other than "ISO-8859-1" or its subsets MUST be labeled with an appropriate charset value. - // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.4.1 - if (self.response && !self.response.textEncodingName && self.responseData) { - NSString *type = nil; - AFGetMediaTypeAndSubtypeWithString([[self.response allHeaderFields] valueForKey:@"Content-Type"], &type, nil); - - if ([type isEqualToString:@"text"]) { - return NSISOLatin1StringEncoding; - } - } - - return [super responseStringEncoding]; -} - -- (void)pause { - unsigned long long offset = 0; - if ([self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey]) { - offset = [[self.outputStream propertyForKey:NSStreamFileCurrentOffsetKey] unsignedLongLongValue]; - } else { - offset = [[self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey] length]; - } - - NSMutableURLRequest *mutableURLRequest = [self.request mutableCopy]; - if ([[self.response allHeaderFields] valueForKey:@"ETag"]) { - [mutableURLRequest setValue:[[self.response allHeaderFields] valueForKey:@"ETag"] forHTTPHeaderField:@"If-Range"]; - } - [mutableURLRequest setValue:[NSString stringWithFormat:@"bytes=%llu-", offset] forHTTPHeaderField:@"Range"]; - self.request = mutableURLRequest; - - [super pause]; -} - -- (BOOL)hasAcceptableStatusCode { - if (!self.response) { - return NO; - } - - NSUInteger statusCode = ([self.response isKindOfClass:[NSHTTPURLResponse class]]) ? (NSUInteger)[self.response statusCode] : 200; - return ![[self class] acceptableStatusCodes] || [[[self class] acceptableStatusCodes] containsIndex:statusCode]; -} - -- (BOOL)hasAcceptableContentType { - if (!self.response) { - return NO; - } - - // Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream". - // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec7.html - NSString *contentType = [self.response MIMEType]; - if (!contentType) { - contentType = @"application/octet-stream"; - } - - return ![[self class] acceptableContentTypes] || [[[self class] acceptableContentTypes] containsObject:contentType]; -} - -- (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue { - if (successCallbackQueue != _successCallbackQueue) { - if (_successCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_release(_successCallbackQueue); -#endif - _successCallbackQueue = NULL; - } - - if (successCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_retain(successCallbackQueue); -#endif - _successCallbackQueue = successCallbackQueue; - } - } -} - -- (void)setFailureCallbackQueue:(dispatch_queue_t)failureCallbackQueue { - if (failureCallbackQueue != _failureCallbackQueue) { - if (_failureCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_release(_failureCallbackQueue); -#endif - _failureCallbackQueue = NULL; - } - - if (failureCallbackQueue) { -#if !OS_OBJECT_USE_OBJC - dispatch_retain(failureCallbackQueue); -#endif - _failureCallbackQueue = failureCallbackQueue; - } - } -} - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ - // completionBlock is manually nilled out in AFURLConnectionOperation to break the retain cycle. -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^{ - if (self.error) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { - dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ - success(self, self.responseData); - }); - } - } - }; -#pragma clang diagnostic pop -} - -#pragma mark - AFHTTPRequestOperation - -+ (NSIndexSet *)acceptableStatusCodes { - return [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(200, 100)]; -} - -+ (void)addAcceptableStatusCodes:(NSIndexSet *)statusCodes { - NSMutableIndexSet *mutableStatusCodes = [[NSMutableIndexSet alloc] initWithIndexSet:[self acceptableStatusCodes]]; - [mutableStatusCodes addIndexes:statusCodes]; - AFSwizzleClassMethodWithClassAndSelectorUsingBlock([self class], @selector(acceptableStatusCodes), ^(__unused id _self) { - return mutableStatusCodes; - }); -} - -+ (NSSet *)acceptableContentTypes { - return nil; -} - -+ (void)addAcceptableContentTypes:(NSSet *)contentTypes { - NSMutableSet *mutableContentTypes = [[NSMutableSet alloc] initWithSet:[self acceptableContentTypes] copyItems:YES]; - [mutableContentTypes unionSet:contentTypes]; - AFSwizzleClassMethodWithClassAndSelectorUsingBlock([self class], @selector(acceptableContentTypes), ^(__unused id _self) { - return mutableContentTypes; - }); -} - -+ (BOOL)canProcessRequest:(NSURLRequest *)request { - if ([[self class] isEqual:[AFHTTPRequestOperation class]]) { - return YES; - } - - return [[self acceptableContentTypes] intersectsSet:AFContentTypesFromHTTPHeader([request valueForHTTPHeaderField:@"Accept"])]; -} - -@end - -#pragma clang diagnostic pop diff --git a/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h deleted file mode 100644 index 68b28ed3b2d5..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +++ /dev/null @@ -1,108 +0,0 @@ -// AFImageRequestOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFHTTPRequestOperation.h" - -#import - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -#import -#endif - -/** - `AFImageRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading an processing images. - - ## Acceptable Content Types - - By default, `AFImageRequestOperation` accepts the following MIME types, which correspond to the image formats supported by UIImage or NSImage: - - - `image/tiff` - - `image/jpeg` - - `image/gif` - - `image/png` - - `image/ico` - - `image/x-icon` - - `image/bmp` - - `image/x-bmp` - - `image/x-xbitmap` - - `image/x-win-bitmap` - */ -@interface AFImageRequestOperation : AFHTTPRequestOperation - -/** - 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. - */ -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -@property (readonly, nonatomic, strong) UIImage *responseImage; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -@property (readonly, nonatomic, strong) NSImage *responseImage; -#endif - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -/** - 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. - */ -@property (nonatomic, assign) CGFloat imageScale; -#endif - -/** - Creates and returns an `AFImageRequestOperation` object and sets the specified success callback. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation. - @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. - - @return A new image request operation - */ -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(UIImage *image))success; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSImage *image))success; -#endif - -/** - Creates and returns an `AFImageRequestOperation` object and sets the specified success callback. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation. - @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. - @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. - @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. - - @return A new image request operation - */ -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(UIImage *(^)(UIImage *image))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(NSImage *(^)(NSImage *image))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; -#endif - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m deleted file mode 100644 index 0a0390f81840..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +++ /dev/null @@ -1,234 +0,0 @@ -// AFImageRequestOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFImageRequestOperation.h" - -static dispatch_queue_t image_request_operation_processing_queue() { - static dispatch_queue_t af_image_request_operation_processing_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_image_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.image-request.processing", DISPATCH_QUEUE_CONCURRENT); - }); - - return af_image_request_operation_processing_queue; -} - -@interface AFImageRequestOperation () -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -@property (readwrite, nonatomic, strong) UIImage *responseImage; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -@property (readwrite, nonatomic, strong) NSImage *responseImage; -#endif -@end - -@implementation AFImageRequestOperation -@synthesize responseImage = _responseImage; -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -@synthesize imageScale = _imageScale; -#endif - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(UIImage *image))success -{ - return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, UIImage *image) { - if (success) { - success(image); - } - } failure:nil]; -} -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSImage *image))success -{ - return [self imageRequestOperationWithRequest:urlRequest imageProcessingBlock:nil success:^(NSURLRequest __unused *request, NSHTTPURLResponse __unused *response, NSImage *image) { - if (success) { - success(image); - } - } failure:nil]; -} -#endif - - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(UIImage *(^)(UIImage *))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure -{ - AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if (success) { - UIImage *image = responseObject; - if (imageProcessingBlock) { - dispatch_async(image_request_operation_processing_queue(), ^(void) { - UIImage *processedImage = imageProcessingBlock(image); - - dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) { - success(operation.request, operation.response, processedImage); - }); - }); - } else { - success(operation.request, operation.response, image); - } - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - failure(operation.request, operation.response, error); - } - }]; - - - return requestOperation; -} -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -+ (instancetype)imageRequestOperationWithRequest:(NSURLRequest *)urlRequest - imageProcessingBlock:(NSImage *(^)(NSImage *))imageProcessingBlock - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure -{ - AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if (success) { - NSImage *image = responseObject; - if (imageProcessingBlock) { - dispatch_async(image_request_operation_processing_queue(), ^(void) { - NSImage *processedImage = imageProcessingBlock(image); - - dispatch_async(operation.successCallbackQueue ?: dispatch_get_main_queue(), ^(void) { - success(operation.request, operation.response, processedImage); - }); - }); - } else { - success(operation.request, operation.response, image); - } - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - failure(operation.request, operation.response, error); - } - }]; - - return requestOperation; -} -#endif - -- (id)initWithRequest:(NSURLRequest *)urlRequest { - self = [super initWithRequest:urlRequest]; - if (!self) { - return nil; - } - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - self.imageScale = [[UIScreen mainScreen] scale]; -#endif - - return self; -} - - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -- (UIImage *)responseImage { - if (!_responseImage && [self.responseData length] > 0 && [self isFinished]) { - UIImage *image = [UIImage imageWithData:self.responseData]; - - self.responseImage = [UIImage imageWithCGImage:[image CGImage] scale:self.imageScale orientation:image.imageOrientation]; - } - - return _responseImage; -} - -- (void)setImageScale:(CGFloat)imageScale { -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wfloat-equal" - if (imageScale == _imageScale) { - return; - } -#pragma clang diagnostic pop - - _imageScale = imageScale; - - self.responseImage = nil; -} -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -- (NSImage *)responseImage { - if (!_responseImage && [self.responseData length] > 0 && [self isFinished]) { - // Ensure that the image is set to it's correct pixel width and height - NSBitmapImageRep *bitimage = [[NSBitmapImageRep alloc] initWithData:self.responseData]; - self.responseImage = [[NSImage alloc] initWithSize:NSMakeSize([bitimage pixelsWide], [bitimage pixelsHigh])]; - [self.responseImage addRepresentation:bitimage]; - } - - return _responseImage; -} -#endif - -#pragma mark - AFHTTPRequestOperation - -+ (NSSet *)acceptableContentTypes { - return [NSSet setWithObjects:@"image/tiff", @"image/jpeg", @"image/gif", @"image/png", @"image/ico", @"image/x-icon", @"image/bmp", @"image/x-bmp", @"image/x-xbitmap", @"image/x-win-bitmap", nil]; -} - -+ (BOOL)canProcessRequest:(NSURLRequest *)request { - static NSSet * _acceptablePathExtension = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _acceptablePathExtension = [[NSSet alloc] initWithObjects:@"tif", @"tiff", @"jpg", @"jpeg", @"gif", @"png", @"ico", @"bmp", @"cur", nil]; - }); - - return [_acceptablePathExtension containsObject:[[request URL] pathExtension]] || [super canProcessRequest:request]; -} - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^ { - dispatch_async(image_request_operation_processing_queue(), ^(void) { - if (self.error) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - UIImage *image = nil; -#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) - NSImage *image = nil; -#endif - - image = self.responseImage; - - dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ - success(self, image); - }); - } - } - }); - }; -#pragma clang diagnostic pop -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h deleted file mode 100644 index 5493a40775fe..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +++ /dev/null @@ -1,71 +0,0 @@ -// AFJSONRequestOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFHTTPRequestOperation.h" - -/** - `AFJSONRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and working with JSON response data. - - ## Acceptable Content Types - - By default, `AFJSONRequestOperation` accepts the following MIME types, which includes the official standard, `application/json`, as well as other commonly-used types: - - - `application/json` - - `text/json` - - @warning JSON parsing will use the built-in `NSJSONSerialization` class. - */ -@interface AFJSONRequestOperation : AFHTTPRequestOperation - -///---------------------------- -/// @name Getting Response Data -///---------------------------- - -/** - 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. - */ -@property (readonly, nonatomic, strong) id responseJSON; - -/** - Options for reading the response JSON data and creating the Foundation objects. For possible values, see the `NSJSONSerialization` documentation section "NSJSONReadingOptions". - */ -@property (nonatomic, assign) NSJSONReadingOptions JSONReadingOptions; - -///---------------------------------- -/// @name Creating Request Operations -///---------------------------------- - -/** - Creates and returns an `AFJSONRequestOperation` object and sets the specified success and failure callbacks. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation - @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. - @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. - - @return A new JSON request operation - */ -+ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure; - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m deleted file mode 100644 index 008aaccbbb6f..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +++ /dev/null @@ -1,142 +0,0 @@ -// AFJSONRequestOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFJSONRequestOperation.h" - -static dispatch_queue_t json_request_operation_processing_queue() { - static dispatch_queue_t af_json_request_operation_processing_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_json_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.json-request.processing", DISPATCH_QUEUE_CONCURRENT); - }); - - return af_json_request_operation_processing_queue; -} - -@interface AFJSONRequestOperation () -@property (readwrite, nonatomic, strong) id responseJSON; -@property (readwrite, nonatomic, strong) NSError *JSONError; -@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; -@end - -@implementation AFJSONRequestOperation -@synthesize responseJSON = _responseJSON; -@synthesize JSONReadingOptions = _JSONReadingOptions; -@synthesize JSONError = _JSONError; -@dynamic lock; - -+ (instancetype)JSONRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id JSON))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON))failure -{ - AFJSONRequestOperation *requestOperation = [(AFJSONRequestOperation *)[self alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if (success) { - success(operation.request, operation.response, responseObject); - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - failure(operation.request, operation.response, error, [(AFJSONRequestOperation *)operation responseJSON]); - } - }]; - - return requestOperation; -} - - -- (id)responseJSON { - [self.lock lock]; - if (!_responseJSON && [self.responseData length] > 0 && [self isFinished] && !self.JSONError) { - NSError *error = nil; - - // Workaround for behavior of Rails to return a single space for `head :ok` (a workaround for a bug in Safari), which is not interpreted as valid input by NSJSONSerialization. - // See https://github.com/rails/rails/issues/1742 - if ([self.responseData length] == 0 || [self.responseString isEqualToString:@" "]) { - self.responseJSON = nil; - } else { - // Workaround for a bug in NSJSONSerialization when Unicode character escape codes are used instead of the actual character - // See http://stackoverflow.com/a/12843465/157142 - NSData *JSONData = [self.responseString dataUsingEncoding:self.responseStringEncoding]; - self.responseJSON = [NSJSONSerialization JSONObjectWithData:JSONData options:self.JSONReadingOptions error:&error]; - } - - self.JSONError = error; - } - [self.lock unlock]; - - return _responseJSON; -} - -- (NSError *)error { - if (_JSONError) { - return _JSONError; - } else { - return [super error]; - } -} - -#pragma mark - AFHTTPRequestOperation - -+ (NSSet *)acceptableContentTypes { - return [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript", nil]; -} - -+ (BOOL)canProcessRequest:(NSURLRequest *)request { - return [[[request URL] pathExtension] isEqualToString:@"json"] || [super canProcessRequest:request]; -} - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^ { - if (self.error) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - dispatch_async(json_request_operation_processing_queue(), ^{ - id JSON = self.responseJSON; - - if (self.JSONError) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { - dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ - success(self, JSON); - }); - } - } - }); - } - }; -#pragma clang diagnostic pop -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h deleted file mode 100644 index bac7b5a27c61..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +++ /dev/null @@ -1,75 +0,0 @@ -// AFNetworkActivityIndicatorManager.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import - -/** - `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. - - 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: - - [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; - - 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. - - See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: - http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 - */ -@interface AFNetworkActivityIndicatorManager : NSObject - -/** - A Boolean value indicating whether the manager is enabled. - - @discussion If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. - */ -@property (nonatomic, assign, getter = isEnabled) BOOL enabled; - -/** - A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. - */ -@property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; - -/** - Returns the shared network activity indicator manager object for the system. - - @return The systemwide network activity indicator manager. - */ -+ (instancetype)sharedManager; - -/** - Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. - */ -- (void)incrementActivityCount; - -/** - Decrements the number of active network requests. If this number becomes zero before decrementing, this will stop animating the status bar network activity indicator. - */ -- (void)decrementActivityCount; - -@end - -#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m b/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m deleted file mode 100644 index b7e4256ff853..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +++ /dev/null @@ -1,145 +0,0 @@ -// AFNetworkActivityIndicatorManager.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFNetworkActivityIndicatorManager.h" - -#import "AFHTTPRequestOperation.h" - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -static NSTimeInterval const kAFNetworkActivityIndicatorInvisibilityDelay = 0.17; - -@interface AFNetworkActivityIndicatorManager () -@property (readwrite, assign) NSInteger activityCount; -@property (readwrite, nonatomic, strong) NSTimer *activityIndicatorVisibilityTimer; -@property (readonly, getter = isNetworkActivityIndicatorVisible) BOOL networkActivityIndicatorVisible; - -- (void)updateNetworkActivityIndicatorVisibility; -- (void)updateNetworkActivityIndicatorVisibilityDelayed; -@end - -@implementation AFNetworkActivityIndicatorManager -@synthesize activityCount = _activityCount; -@synthesize activityIndicatorVisibilityTimer = _activityIndicatorVisibilityTimer; -@synthesize enabled = _enabled; -@dynamic networkActivityIndicatorVisible; - -+ (instancetype)sharedManager { - static AFNetworkActivityIndicatorManager *_sharedManager = nil; - static dispatch_once_t oncePredicate; - dispatch_once(&oncePredicate, ^{ - _sharedManager = [[self alloc] init]; - }); - - return _sharedManager; -} - -+ (NSSet *)keyPathsForValuesAffectingIsNetworkActivityIndicatorVisible { - return [NSSet setWithObject:@"activityCount"]; -} - -- (id)init { - self = [super init]; - if (!self) { - return nil; - } - - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkingOperationDidStart:) name:AFNetworkingOperationDidStartNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkingOperationDidFinish:) name:AFNetworkingOperationDidFinishNotification object:nil]; - - return self; -} - -- (void)dealloc { - [[NSNotificationCenter defaultCenter] removeObserver:self]; - - [_activityIndicatorVisibilityTimer invalidate]; - -} - -- (void)updateNetworkActivityIndicatorVisibilityDelayed { - if (self.enabled) { - // Delay hiding of activity indicator for a short interval, to avoid flickering - if (![self isNetworkActivityIndicatorVisible]) { - [self.activityIndicatorVisibilityTimer invalidate]; - self.activityIndicatorVisibilityTimer = [NSTimer timerWithTimeInterval:kAFNetworkActivityIndicatorInvisibilityDelay target:self selector:@selector(updateNetworkActivityIndicatorVisibility) userInfo:nil repeats:NO]; - [[NSRunLoop mainRunLoop] addTimer:self.activityIndicatorVisibilityTimer forMode:NSRunLoopCommonModes]; - } else { - [self performSelectorOnMainThread:@selector(updateNetworkActivityIndicatorVisibility) withObject:nil waitUntilDone:NO modes:[NSArray arrayWithObject:NSRunLoopCommonModes]]; - } - } -} - -- (BOOL)isNetworkActivityIndicatorVisible { - return _activityCount > 0; -} - -- (void)updateNetworkActivityIndicatorVisibility { - [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:[self isNetworkActivityIndicatorVisible]]; -} - -// Not exposed, but used if activityCount is set via KVC. -- (NSInteger)activityCount { - return _activityCount; -} - -- (void)setActivityCount:(NSInteger)activityCount { - @synchronized(self) { - _activityCount = activityCount; - } - [self updateNetworkActivityIndicatorVisibilityDelayed]; -} - -- (void)incrementActivityCount { - [self willChangeValueForKey:@"activityCount"]; - @synchronized(self) { - _activityCount++; - } - [self didChangeValueForKey:@"activityCount"]; - [self updateNetworkActivityIndicatorVisibilityDelayed]; -} - -- (void)decrementActivityCount { - [self willChangeValueForKey:@"activityCount"]; - @synchronized(self) { - _activityCount = MAX(_activityCount - 1, 0); - } - [self didChangeValueForKey:@"activityCount"]; - [self updateNetworkActivityIndicatorVisibilityDelayed]; -} - -- (void)networkingOperationDidStart:(NSNotification *)notification { - AFURLConnectionOperation *connectionOperation = [notification object]; - if (connectionOperation.request.URL) { - [self incrementActivityCount]; - } -} - -- (void)networkingOperationDidFinish:(NSNotification *)notification { - AFURLConnectionOperation *connectionOperation = [notification object]; - if (connectionOperation.request.URL) { - [self decrementActivityCount]; - } -} - -@end - -#endif diff --git a/Pods/AFNetworking/AFNetworking/AFNetworking.h b/Pods/AFNetworking/AFNetworking/AFNetworking.h deleted file mode 100644 index b8f840b92cfb..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFNetworking.h +++ /dev/null @@ -1,43 +0,0 @@ -// AFNetworking.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import - -#ifndef _AFNETWORKING_ - #define _AFNETWORKING_ - - #import "AFURLConnectionOperation.h" - - #import "AFHTTPRequestOperation.h" - #import "AFJSONRequestOperation.h" - #import "AFXMLRequestOperation.h" - #import "AFPropertyListRequestOperation.h" - #import "AFHTTPClient.h" - - #import "AFImageRequestOperation.h" - - #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - #import "AFNetworkActivityIndicatorManager.h" - #import "UIImageView+AFNetworking.h" - #endif -#endif /* _AFNETWORKING_ */ diff --git a/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h deleted file mode 100644 index 9ebb6057437f..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +++ /dev/null @@ -1,68 +0,0 @@ -// AFPropertyListRequestOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFHTTPRequestOperation.h" - -/** - `AFPropertyListRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and deserializing objects with property list (plist) response data. - - ## Acceptable Content Types - - By default, `AFPropertyListRequestOperation` accepts the following MIME types: - - - `application/x-plist` - */ -@interface AFPropertyListRequestOperation : AFHTTPRequestOperation - -///---------------------------- -/// @name Getting Response Data -///---------------------------- - -/** - An object deserialized from a plist constructed using the response data. - */ -@property (readonly, nonatomic) id responsePropertyList; - -///-------------------------------------- -/// @name Managing Property List Behavior -///-------------------------------------- - -/** - One of the `NSPropertyListMutabilityOptions` options, specifying the mutability of objects deserialized from the property list. By default, this is `NSPropertyListImmutable`. - */ -@property (nonatomic, assign) NSPropertyListReadOptions propertyListReadOptions; - -/** - Creates and returns an `AFPropertyListRequestOperation` object and sets the specified success and failure callbacks. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation - @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. - @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. - - @return A new property list request operation - */ -+ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure; - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m deleted file mode 100644 index 4d6123b56d1a..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +++ /dev/null @@ -1,142 +0,0 @@ -// AFPropertyListRequestOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFPropertyListRequestOperation.h" - -static dispatch_queue_t property_list_request_operation_processing_queue() { - static dispatch_queue_t af_property_list_request_operation_processing_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_property_list_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.property-list-request.processing", DISPATCH_QUEUE_CONCURRENT); - }); - - return af_property_list_request_operation_processing_queue; -} - -@interface AFPropertyListRequestOperation () -@property (readwrite, nonatomic) id responsePropertyList; -@property (readwrite, nonatomic, assign) NSPropertyListFormat propertyListFormat; -@property (readwrite, nonatomic) NSError *propertyListError; -@end - -@implementation AFPropertyListRequestOperation -@synthesize responsePropertyList = _responsePropertyList; -@synthesize propertyListReadOptions = _propertyListReadOptions; -@synthesize propertyListFormat = _propertyListFormat; -@synthesize propertyListError = _propertyListError; - -+ (instancetype)propertyListRequestOperationWithRequest:(NSURLRequest *)request - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, id propertyList))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id propertyList))failure -{ - AFPropertyListRequestOperation *requestOperation = [(AFPropertyListRequestOperation *)[self alloc] initWithRequest:request]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if (success) { - success(operation.request, operation.response, responseObject); - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - failure(operation.request, operation.response, error, [(AFPropertyListRequestOperation *)operation responsePropertyList]); - } - }]; - - return requestOperation; -} - -- (id)initWithRequest:(NSURLRequest *)urlRequest { - self = [super initWithRequest:urlRequest]; - if (!self) { - return nil; - } - - self.propertyListReadOptions = NSPropertyListImmutable; - - return self; -} - - -- (id)responsePropertyList { - if (!_responsePropertyList && [self.responseData length] > 0 && [self isFinished]) { - NSPropertyListFormat format; - NSError *error = nil; - self.responsePropertyList = [NSPropertyListSerialization propertyListWithData:self.responseData options:self.propertyListReadOptions format:&format error:&error]; - self.propertyListFormat = format; - self.propertyListError = error; - } - - return _responsePropertyList; -} - -- (NSError *)error { - if (_propertyListError) { - return _propertyListError; - } else { - return [super error]; - } -} - -#pragma mark - AFHTTPRequestOperation - -+ (NSSet *)acceptableContentTypes { - return [NSSet setWithObjects:@"application/x-plist", nil]; -} - -+ (BOOL)canProcessRequest:(NSURLRequest *)request { - return [[[request URL] pathExtension] isEqualToString:@"plist"] || [super canProcessRequest:request]; -} - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^ { - if (self.error) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - dispatch_async(property_list_request_operation_processing_queue(), ^(void) { - id propertyList = self.responsePropertyList; - - if (self.propertyListError) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { - dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ - success(self, propertyList); - }); - } - } - }); - } - }; -#pragma clang diagnostic pop -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h deleted file mode 100644 index b3a94db10617..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +++ /dev/null @@ -1,379 +0,0 @@ -// AFURLConnectionOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import - -#import - -/** - `AFURLConnectionOperation` is a subclass of `NSOperation` that implements `NSURLConnection` delegate methods. - - ## Subclassing Notes - - This is the base class of all network request operations. You may wish to create your own subclass in order to implement additional `NSURLConnection` delegate methods (see "`NSURLConnection` Delegate Methods" below), or to provide additional properties and/or class constructors. - - If you are creating a subclass that communicates over the HTTP or HTTPS protocols, you may want to consider subclassing `AFHTTPRequestOperation` instead, as it supports specifying acceptable content types or status codes. - - ## NSURLConnection Delegate Methods - - `AFURLConnectionOperation` implements the following `NSURLConnection` delegate methods: - - - `connection:didReceiveResponse:` - - `connection:didReceiveData:` - - `connectionDidFinishLoading:` - - `connection:didFailWithError:` - - `connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:` - - `connection:willCacheResponse:` - - `connection:canAuthenticateAgainstProtectionSpace:` - - `connection:didReceiveAuthenticationChallenge:` - - `connectionShouldUseCredentialStorage:` - - `connection:needNewBodyStream:` - - If any of these methods are overridden in a subclass, they _must_ call the `super` implementation first. - - ## Class Constructors - - Class constructors, or methods that return an unowned instance, are the preferred way for subclasses to encapsulate any particular logic for handling the setup or parsing of response data. For instance, `AFJSONRequestOperation` provides `JSONRequestOperationWithRequest:success:failure:`, which takes block arguments, whose parameter on for a successful request is the JSON object initialized from the `response data`. - - ## Callbacks and Completion Blocks - - The built-in `completionBlock` provided by `NSOperation` allows for custom behavior to be executed after the request finishes. It is a common pattern for class constructors in subclasses to take callback block parameters, and execute them conditionally in the body of its `completionBlock`. Make sure to handle cancelled operations appropriately when setting a `completionBlock` (i.e. returning early before parsing response data). See the implementation of any of the `AFHTTPRequestOperation` subclasses for an example of this. - - Subclasses are strongly discouraged from overriding `setCompletionBlock:`, as `AFURLConnectionOperation`'s implementation includes a workaround to mitigate retain cycles, and what Apple rather ominously refers to as ["The Deallocation Problem"](http://developer.apple.com/library/ios/#technotes/tn2109/). - - ## SSL Pinning - - Relying on the CA trust model to validate SSL certificates exposes your app to security vulnerabilities, such as man-in-the-middle attacks. For applications that connect to known servers, SSL certificate pinning provides an increased level of security, by checking server certificate validity against those specified in the app bundle. - - SSL with certificate pinning is strongly recommended for any application that transmits sensitive information to an external webservice. - - When `_AFNETWORKING_PIN_SSL_CERTIFICATES_` is defined and the Security framework is linked, connections will be validated on all matching certificates with a `.cer` extension in the bundle root. - - ## NSCoding & NSCopying Conformance - - `AFURLConnectionOperation` conforms to the `NSCoding` and `NSCopying` protocols, allowing operations to be archived to disk, and copied in memory, respectively. However, because of the intrinsic limitations of capturing the exact state of an operation at a particular moment, there are some important caveats to keep in mind: - - ### NSCoding Caveats - - - Encoded operations do not include any block or stream properties. Be sure to set `completionBlock`, `outputStream`, and any callback blocks as necessary when using `-initWithCoder:` or `NSKeyedUnarchiver`. - - Operations are paused on `encodeWithCoder:`. If the operation was encoded while paused or still executing, its archived state will return `YES` for `isReady`. Otherwise, the state of an operation when encoding will remain unchanged. - - ### NSCopying Caveats - - - `-copy` and `-copyWithZone:` return a new operation with the `NSURLRequest` of the original. So rather than an exact copy of the operation at that particular instant, the copying mechanism returns a completely new instance, which can be useful for retrying operations. - - A copy of an operation will not include the `outputStream` of the original. - - Operation copies do not include `completionBlock`. `completionBlock` often strongly captures a reference to `self`, which would otherwise have the unintuitive side-effect of pointing to the _original_ operation when copied. - */ - -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -typedef enum { - AFSSLPinningModeNone, - AFSSLPinningModePublicKey, - AFSSLPinningModeCertificate, -} AFURLConnectionOperationSSLPinningMode; -#endif - -@interface AFURLConnectionOperation : NSOperation = __IPHONE_5_0) || \ - (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8) -NSURLConnectionDataDelegate, -#endif -NSCoding, NSCopying> - -///------------------------------- -/// @name Accessing Run Loop Modes -///------------------------------- - -/** - The run loop modes in which the operation will run on the network thread. By default, this is a single-member set containing `NSRunLoopCommonModes`. - */ -@property (nonatomic, strong) NSSet *runLoopModes; - -///----------------------------------------- -/// @name Getting URL Connection Information -///----------------------------------------- - -/** - The request used by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSURLRequest *request; - -/** - The last response received by the operation's connection. - */ -@property (readonly, nonatomic, strong) NSURLResponse *response; - -/** - The error, if any, that occurred in the lifecycle of the request. - */ -@property (readonly, nonatomic, strong) NSError *error; - -///---------------------------- -/// @name Getting Response Data -///---------------------------- - -/** - The data received during the request. - */ -@property (readonly, nonatomic, strong) NSData *responseData; - -/** - The string representation of the response data. - */ -@property (readonly, nonatomic, copy) NSString *responseString; - -/** - The string encoding of the response. - - @discussion If the response does not specify a valid string encoding, `responseStringEncoding` will return `NSUTF8StringEncoding`. - */ -@property (readonly, nonatomic, assign) NSStringEncoding responseStringEncoding; - -///------------------------------- -/// @name Managing URL Credentials -///------------------------------- - -/** - Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. - - @discussion This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. - */ -@property (nonatomic, assign) BOOL shouldUseCredentialStorage; - -/** - The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. - - @discussion This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. - */ -@property (nonatomic, strong) NSURLCredential *credential; - -/** - The pinning mode which will be used for SSL connections. `AFSSLPinningModePublicKey` by default. - - @discussion To enable SSL Pinning, `#define _AFNETWORKING_PIN_SSL_CERTIFICATES_` in `Prefix.pch`. Also, make sure that the Security framework is linked with the binary. See the "SSL Pinning" section in the `AFURLConnectionOperation`" header for more information. - */ -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -@property (nonatomic, assign) AFURLConnectionOperationSSLPinningMode SSLPinningMode; -#endif - -///------------------------ -/// @name Accessing Streams -///------------------------ - -/** - The input stream used to read data to be sent during the request. - - @discussion This property acts as a proxy to the `HTTPBodyStream` property of `request`. - */ -@property (nonatomic, strong) NSInputStream *inputStream; - -/** - The output stream that is used to write data received until the request is finished. - - @discussion By default, data is accumulated into a buffer that is stored into `responseData` upon completion of the request. When `outputStream` is set, the data will not be accumulated into an internal buffer, and as a result, the `responseData` property of the completed request will be `nil`. The output stream will be scheduled in the network thread runloop upon being set. - */ -@property (nonatomic, strong) NSOutputStream *outputStream; - -///--------------------------------------------- -/// @name Managing Request Operation Information -///--------------------------------------------- - -/** - The user info dictionary for the receiver. - */ -@property (nonatomic, strong) NSDictionary *userInfo; - -///------------------------------------------------------ -/// @name Initializing an AFURLConnectionOperation Object -///------------------------------------------------------ - -/** - Initializes and returns a newly allocated operation object with a url connection configured with the specified url request. - - @param urlRequest The request object to be used by the operation connection. - - @discussion This is the designated initializer. - */ -- (id)initWithRequest:(NSURLRequest *)urlRequest; - -///---------------------------------- -/// @name Pausing / Resuming Requests -///---------------------------------- - -/** - Pauses the execution of the request operation. - - @discussion A paused operation returns `NO` for `-isReady`, `-isExecuting`, and `-isFinished`. As such, it will remain in an `NSOperationQueue` until it is either cancelled or resumed. Pausing a finished, cancelled, or paused operation has no effect. - */ -- (void)pause; - -/** - Whether the request operation is currently paused. - - @return `YES` if the operation is currently paused, otherwise `NO`. - */ -- (BOOL)isPaused; - -/** - Resumes the execution of the paused request operation. - - @discussion Pause/Resume behavior varies depending on the underlying implementation for the operation class. In its base implementation, resuming a paused requests restarts the original request. However, since HTTP defines a specification for how to request a specific content range, `AFHTTPRequestOperation` will resume downloading the request from where it left off, instead of restarting the original request. - */ -- (void)resume; - -///---------------------------------------------- -/// @name Configuring Backgrounding Task Behavior -///---------------------------------------------- - -/** - Specifies that the operation should continue execution after the app has entered the background, and the expiration handler for that background task. - - @param handler A handler to be called shortly before the application’s remaining background time reaches 0. The handler is wrapped in a block that cancels the operation, and cleans up and marks the end of execution, unlike the `handler` parameter in `UIApplication -beginBackgroundTaskWithExpirationHandler:`, which expects this to be done in the handler itself. The handler is called synchronously on the main thread, thus blocking the application’s suspension momentarily while the application is notified. - */ -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler; -#endif - -///--------------------------------- -/// @name Setting Progress Callbacks -///--------------------------------- - -/** - Sets a callback to be called when an undetermined number of bytes have been uploaded to the server. - - @param block A block object to be called when an undetermined number of bytes have been uploaded to the server. This block has no return value and takes three arguments: the number of bytes written since the last time the upload progress block was called, the total bytes written, and the total bytes expected to be written during the request, as initially determined by the length of the HTTP body. This block may be called multiple times, and will execute on the main thread. - */ -- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block; - -/** - Sets a callback to be called when an undetermined number of bytes have been downloaded from the server. - - @param block A block object to be called when an undetermined number of bytes have been downloaded from the server. This block has no return value and takes three arguments: the number of bytes read since the last time the download progress block was called, the total bytes read, and the total bytes expected to be read during the request, as initially determined by the expected content size of the `NSHTTPURLResponse` object. This block may be called multiple times, and will execute on the main thread. - */ -- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block; - -///------------------------------------------------- -/// @name Setting NSURLConnection Delegate Callbacks -///------------------------------------------------- - -/** - Sets a block to be executed to determine whether the connection should be able to respond to a protection space's form of authentication, as handled by the `NSURLConnectionDelegate` method `connection:canAuthenticateAgainstProtectionSpace:`. - - @param block A block object to be executed to determine whether the connection should be able to respond to a protection space's form of authentication. The block has a `BOOL` return type and takes two arguments: the URL connection object, and the protection space to authenticate against. - - @discussion If `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` is defined, `connection:canAuthenticateAgainstProtectionSpace:` will accept invalid SSL certificates, returning `YES` if the protection space authentication method is `NSURLAuthenticationMethodServerTrust`. - */ -- (void)setAuthenticationAgainstProtectionSpaceBlock:(BOOL (^)(NSURLConnection *connection, NSURLProtectionSpace *protectionSpace))block; - -/** - Sets a block to be executed when the connection must authenticate a challenge in order to download its request, as handled by the `NSURLConnectionDelegate` method `connection:didReceiveAuthenticationChallenge:`. - - @param block A block object to be executed when the connection must authenticate a challenge in order to download its request. The block has no return type and takes two arguments: the URL connection object, and the challenge that must be authenticated. - - @discussion If `_AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_` is defined, `connection:didReceiveAuthenticationChallenge:` will attempt to have the challenge sender use credentials with invalid SSL certificates. - */ -- (void)setAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block; - -/** - Sets a block to be executed when the server redirects the request from one URL to another URL, or when the request URL changed by the `NSURLProtocol` subclass handling the request in order to standardize its format, as handled by the `NSURLConnectionDelegate` method `connection:willSendRequest:redirectResponse:`. - - @param block A block object to be executed when the request URL was changed. The block returns an `NSURLRequest` object, the URL request to redirect, and takes three arguments: the URL connection object, the the proposed redirected request, and the URL response that caused the redirect. - */ -- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block; - - -/** - Sets a block to be executed to modify the response a connection will cache, if any, as handled by the `NSURLConnectionDelegate` method `connection:willCacheResponse:`. - - @param block A block object to be executed to determine what response a connection will cache, if any. The block returns an `NSCachedURLResponse` object, the cached response to store in memory or `nil` to prevent the response from being cached, and takes two arguments: the URL connection object, and the cached response provided for the request. - */ -- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block; - -@end - -///---------------- -/// @name Constants -///---------------- - -/** - ## Network Reachability - - The following constants are provided by `AFURLConnectionOperation` as possible SSL Pinning options. - - enum { - AFSSLPinningModeNone, - AFSSLPinningModePublicKey, - AFSSLPinningModeCertificate, - } - - `AFSSLPinningModeNone` - Do not pin SSL connections - - `AFSSLPinningModePublicKey` - Pin SSL connections to certificate public key (SPKI). - - `AFSSLPinningModeCertificate` - Pin SSL connections to exact certificate. This may cause problems when your certificate expires and needs re-issuance. - - ## User info dictionary keys - - These keys may exist in the user info dictionary, in addition to those defined for NSError. - - - `NSString * const AFNetworkingOperationFailingURLRequestErrorKey` - - `NSString * const AFNetworkingOperationFailingURLResponseErrorKey` - - ### Constants - - `AFNetworkingOperationFailingURLRequestErrorKey` - The corresponding value is an `NSURLRequest` containing the request of the operation associated with an error. This key is only present in the `AFNetworkingErrorDomain`. - - `AFNetworkingOperationFailingURLResponseErrorKey` - The corresponding value is an `NSURLResponse` containing the response of the operation associated with an error. This key is only present in the `AFNetworkingErrorDomain`. - - ## Error Domains - - The following error domain is predefined. - - - `NSString * const AFNetworkingErrorDomain` - - ### Constants - - `AFNetworkingErrorDomain` - AFNetworking errors. Error codes for `AFNetworkingErrorDomain` correspond to codes in `NSURLErrorDomain`. - */ -extern NSString * const AFNetworkingErrorDomain; -extern NSString * const AFNetworkingOperationFailingURLRequestErrorKey; -extern NSString * const AFNetworkingOperationFailingURLResponseErrorKey; - -///-------------------- -/// @name Notifications -///-------------------- - -/** - Posted when an operation begins executing. - */ -extern NSString * const AFNetworkingOperationDidStartNotification; - -/** - Posted when an operation finishes. - */ -extern NSString * const AFNetworkingOperationDidFinishNotification; diff --git a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m b/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m deleted file mode 100644 index 51cfd6b5ea5d..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +++ /dev/null @@ -1,818 +0,0 @@ -// AFURLConnectionOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFURLConnectionOperation.h" - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import -#endif - -#if !__has_feature(objc_arc) -#error AFNetworking must be built with ARC. -// You can turn on ARC for only AFNetworking files by adding -fobjc-arc to the build phase for each of its files. -#endif - -typedef enum { - AFOperationPausedState = -1, - AFOperationReadyState = 1, - AFOperationExecutingState = 2, - AFOperationFinishedState = 3, -} _AFOperationState; - -typedef signed short AFOperationState; - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -typedef UIBackgroundTaskIdentifier AFBackgroundTaskIdentifier; -#else -typedef id AFBackgroundTaskIdentifier; -#endif - -static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock"; - -NSString * const AFNetworkingErrorDomain = @"AFNetworkingErrorDomain"; -NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey"; -NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"AFNetworkingOperationFailingURLResponseErrorKey"; - -NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start"; -NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish"; - -typedef void (^AFURLConnectionOperationProgressBlock)(NSUInteger bytes, long long totalBytes, long long totalBytesExpected); -typedef BOOL (^AFURLConnectionOperationAuthenticationAgainstProtectionSpaceBlock)(NSURLConnection *connection, NSURLProtectionSpace *protectionSpace); -typedef void (^AFURLConnectionOperationAuthenticationChallengeBlock)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge); -typedef NSCachedURLResponse * (^AFURLConnectionOperationCacheResponseBlock)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse); -typedef NSURLRequest * (^AFURLConnectionOperationRedirectResponseBlock)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse); - -static inline NSString * AFKeyPathFromOperationState(AFOperationState state) { - switch (state) { - case AFOperationReadyState: - return @"isReady"; - case AFOperationExecutingState: - return @"isExecuting"; - case AFOperationFinishedState: - return @"isFinished"; - case AFOperationPausedState: - return @"isPaused"; - default: - return @"state"; - } -} - -static inline BOOL AFStateTransitionIsValid(AFOperationState fromState, AFOperationState toState, BOOL isCancelled) { - switch (fromState) { - case AFOperationReadyState: - switch (toState) { - case AFOperationPausedState: - case AFOperationExecutingState: - return YES; - case AFOperationFinishedState: - return isCancelled; - default: - return NO; - } - case AFOperationExecutingState: - switch (toState) { - case AFOperationPausedState: - case AFOperationFinishedState: - return YES; - default: - return NO; - } - case AFOperationFinishedState: - return NO; - case AFOperationPausedState: - return toState == AFOperationReadyState; - default: - return YES; - } -} - -@interface AFURLConnectionOperation () -@property (readwrite, nonatomic, assign) AFOperationState state; -@property (readwrite, nonatomic, assign, getter = isCancelled) BOOL cancelled; -@property (readwrite, nonatomic, strong) NSRecursiveLock *lock; -@property (readwrite, nonatomic, strong) NSURLConnection *connection; -@property (readwrite, nonatomic, strong) NSURLRequest *request; -@property (readwrite, nonatomic, strong) NSURLResponse *response; -@property (readwrite, nonatomic, strong) NSError *error; -@property (readwrite, nonatomic, strong) NSData *responseData; -@property (readwrite, nonatomic, copy) NSString *responseString; -@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding; -@property (readwrite, nonatomic, assign) long long totalBytesRead; -@property (readwrite, nonatomic, assign) AFBackgroundTaskIdentifier backgroundTaskIdentifier; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock uploadProgress; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationProgressBlock downloadProgress; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationAgainstProtectionSpaceBlock authenticationAgainstProtectionSpace; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationAuthenticationChallengeBlock authenticationChallenge; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationCacheResponseBlock cacheResponse; -@property (readwrite, nonatomic, copy) AFURLConnectionOperationRedirectResponseBlock redirectResponse; - -- (void)operationDidStart; -- (void)finish; -- (void)cancelConnection; -@end - -@implementation AFURLConnectionOperation -@synthesize state = _state; -@synthesize cancelled = _cancelled; -@synthesize connection = _connection; -@synthesize runLoopModes = _runLoopModes; -@synthesize request = _request; -@synthesize response = _response; -@synthesize error = _error; -@synthesize responseData = _responseData; -@synthesize responseString = _responseString; -@synthesize responseStringEncoding = _responseStringEncoding; -@synthesize totalBytesRead = _totalBytesRead; -@dynamic inputStream; -@synthesize outputStream = _outputStream; -@synthesize credential = _credential; -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -@synthesize SSLPinningMode = _SSLPinningMode; -#endif -@synthesize shouldUseCredentialStorage = _shouldUseCredentialStorage; -@synthesize userInfo = _userInfo; -@synthesize backgroundTaskIdentifier = _backgroundTaskIdentifier; -@synthesize uploadProgress = _uploadProgress; -@synthesize downloadProgress = _downloadProgress; -@synthesize authenticationAgainstProtectionSpace = _authenticationAgainstProtectionSpace; -@synthesize authenticationChallenge = _authenticationChallenge; -@synthesize cacheResponse = _cacheResponse; -@synthesize redirectResponse = _redirectResponse; -@synthesize lock = _lock; - -+ (void) __attribute__((noreturn)) networkRequestThreadEntryPoint:(id)__unused object { - do { - @autoreleasepool { - [[NSRunLoop currentRunLoop] run]; - } - } while (YES); -} - -+ (NSThread *)networkRequestThread { - static NSThread *_networkRequestThread = nil; - static dispatch_once_t oncePredicate; - dispatch_once(&oncePredicate, ^{ - _networkRequestThread = [[NSThread alloc] initWithTarget:self selector:@selector(networkRequestThreadEntryPoint:) object:nil]; - [_networkRequestThread start]; - }); - - return _networkRequestThread; -} - -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -+ (NSArray *)pinnedCertificates { - static NSArray *_pinnedCertificates = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; - NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; - - NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]]; - for (NSString *path in paths) { - NSData *certificateData = [NSData dataWithContentsOfFile:path]; - [certificates addObject:certificateData]; - } - - _pinnedCertificates = [[NSArray alloc] initWithArray:certificates]; - }); - - return _pinnedCertificates; -} - -+ (NSArray *)pinnedPublicKeys { - static NSArray *_pinnedPublicKeys = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - NSArray *pinnedCertificates = [self pinnedCertificates]; - NSMutableArray *publicKeys = [NSMutableArray arrayWithCapacity:[pinnedCertificates count]]; - - for (NSData *data in pinnedCertificates) { - SecCertificateRef allowedCertificate = SecCertificateCreateWithData(NULL, (__bridge CFDataRef)data); - NSCParameterAssert(allowedCertificate); - - SecCertificateRef allowedCertificates[] = {allowedCertificate}; - CFArrayRef certificates = CFArrayCreate(NULL, (const void **)allowedCertificates, 1, NULL); - - SecPolicyRef policy = SecPolicyCreateBasicX509(); - SecTrustRef allowedTrust = NULL; - OSStatus status = SecTrustCreateWithCertificates(certificates, policy, &allowedTrust); - NSAssert(status == noErr, @"SecTrustCreateWithCertificates error: %ld", (long int)status); - - SecKeyRef allowedPublicKey = SecTrustCopyPublicKey(allowedTrust); - [publicKeys addObject:(__bridge_transfer id)allowedPublicKey]; - - CFRelease(allowedTrust); - CFRelease(policy); - CFRelease(certificates); - CFRelease(allowedCertificate); - } - - _pinnedPublicKeys = [[NSArray alloc] initWithArray:publicKeys]; - }); - - return _pinnedPublicKeys; -} -#endif - -- (id)initWithRequest:(NSURLRequest *)urlRequest { - self = [super init]; - if (!self) { - return nil; - } - - self.lock = [[NSRecursiveLock alloc] init]; - self.lock.name = kAFNetworkingLockName; - - self.runLoopModes = [NSSet setWithObject:NSRunLoopCommonModes]; - - self.request = urlRequest; - - self.shouldUseCredentialStorage = YES; - - self.outputStream = [NSOutputStream outputStreamToMemory]; - - self.state = AFOperationReadyState; - - return self; -} - -- (void)dealloc { - if (_outputStream) { - [_outputStream close]; - _outputStream = nil; - } - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) - if (_backgroundTaskIdentifier) { - [[UIApplication sharedApplication] endBackgroundTask:_backgroundTaskIdentifier]; - _backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } -#endif -} - -- (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p, state: %@, cancelled: %@ request: %@, response: %@>", NSStringFromClass([self class]), self, AFKeyPathFromOperationState(self.state), ([self isCancelled] ? @"YES" : @"NO"), self.request, self.response]; -} - -- (void)setCompletionBlock:(void (^)(void))block { - [self.lock lock]; - if (!block) { - [super setCompletionBlock:nil]; - } else { - __weak __typeof(&*self)weakSelf = self; - [super setCompletionBlock:^ { - __strong __typeof(&*weakSelf)strongSelf = weakSelf; - - block(); - [strongSelf setCompletionBlock:nil]; - }]; - } - [self.lock unlock]; -} - -- (NSInputStream *)inputStream { - return self.request.HTTPBodyStream; -} - -- (void)setInputStream:(NSInputStream *)inputStream { - [self willChangeValueForKey:@"inputStream"]; - NSMutableURLRequest *mutableRequest = [self.request mutableCopy]; - mutableRequest.HTTPBodyStream = inputStream; - self.request = mutableRequest; - [self didChangeValueForKey:@"inputStream"]; -} - -- (void)setOutputStream:(NSOutputStream *)outputStream { - if (outputStream == _outputStream) { - return; - } - - [self willChangeValueForKey:@"outputStream"]; - if (_outputStream) { - [_outputStream close]; - } - _outputStream = outputStream; - [self didChangeValueForKey:@"outputStream"]; -} - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -- (void)setShouldExecuteAsBackgroundTaskWithExpirationHandler:(void (^)(void))handler { - [self.lock lock]; - if (!self.backgroundTaskIdentifier) { - UIApplication *application = [UIApplication sharedApplication]; - __weak __typeof(&*self)weakSelf = self; - self.backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^{ - __strong __typeof(&*weakSelf)strongSelf = weakSelf; - - if (handler) { - handler(); - } - - if (strongSelf) { - [strongSelf cancel]; - - [application endBackgroundTask:strongSelf.backgroundTaskIdentifier]; - strongSelf.backgroundTaskIdentifier = UIBackgroundTaskInvalid; - } - }]; - } - [self.lock unlock]; -} -#endif - -- (void)setUploadProgressBlock:(void (^)(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite))block { - self.uploadProgress = block; -} - -- (void)setDownloadProgressBlock:(void (^)(NSUInteger bytesRead, long long totalBytesRead, long long totalBytesExpectedToRead))block { - self.downloadProgress = block; -} - -- (void)setAuthenticationAgainstProtectionSpaceBlock:(BOOL (^)(NSURLConnection *, NSURLProtectionSpace *))block { - self.authenticationAgainstProtectionSpace = block; -} - -- (void)setAuthenticationChallengeBlock:(void (^)(NSURLConnection *connection, NSURLAuthenticationChallenge *challenge))block { - self.authenticationChallenge = block; -} - -- (void)setCacheResponseBlock:(NSCachedURLResponse * (^)(NSURLConnection *connection, NSCachedURLResponse *cachedResponse))block { - self.cacheResponse = block; -} - -- (void)setRedirectResponseBlock:(NSURLRequest * (^)(NSURLConnection *connection, NSURLRequest *request, NSURLResponse *redirectResponse))block { - self.redirectResponse = block; -} - -- (void)setState:(AFOperationState)state { - if (!AFStateTransitionIsValid(self.state, state, [self isCancelled])) { - return; - } - - [self.lock lock]; - NSString *oldStateKey = AFKeyPathFromOperationState(self.state); - NSString *newStateKey = AFKeyPathFromOperationState(state); - - [self willChangeValueForKey:newStateKey]; - [self willChangeValueForKey:oldStateKey]; - _state = state; - [self didChangeValueForKey:oldStateKey]; - [self didChangeValueForKey:newStateKey]; - [self.lock unlock]; -} - -- (NSString *)responseString { - [self.lock lock]; - if (!_responseString && self.response && self.responseData) { - self.responseString = [[NSString alloc] initWithData:self.responseData encoding:self.responseStringEncoding]; - } - [self.lock unlock]; - - return _responseString; -} - -- (NSStringEncoding)responseStringEncoding { - [self.lock lock]; - if (!_responseStringEncoding && self.response) { - NSStringEncoding stringEncoding = NSUTF8StringEncoding; - if (self.response.textEncodingName) { - CFStringEncoding IANAEncoding = CFStringConvertIANACharSetNameToEncoding((__bridge CFStringRef)self.response.textEncodingName); - if (IANAEncoding != kCFStringEncodingInvalidId) { - stringEncoding = CFStringConvertEncodingToNSStringEncoding(IANAEncoding); - } - } - - self.responseStringEncoding = stringEncoding; - } - [self.lock unlock]; - - return _responseStringEncoding; -} - -- (void)pause { - if ([self isPaused] || [self isFinished] || [self isCancelled]) { - return; - } - - [self.lock lock]; - - if ([self isExecuting]) { - [self.connection performSelector:@selector(cancel) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - - dispatch_async(dispatch_get_main_queue(), ^{ - NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; - [notificationCenter postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; - }); - } - - self.state = AFOperationPausedState; - - [self.lock unlock]; -} - -- (BOOL)isPaused { - return self.state == AFOperationPausedState; -} - -- (void)resume { - if (![self isPaused]) { - return; - } - - [self.lock lock]; - self.state = AFOperationReadyState; - - [self start]; - [self.lock unlock]; -} - -#pragma mark - NSOperation - -- (BOOL)isReady { - return self.state == AFOperationReadyState && [super isReady]; -} - -- (BOOL)isExecuting { - return self.state == AFOperationExecutingState; -} - -- (BOOL)isFinished { - return self.state == AFOperationFinishedState; -} - -- (BOOL)isConcurrent { - return YES; -} - -- (void)start { - [self.lock lock]; - if ([self isReady]) { - self.state = AFOperationExecutingState; - - [self performSelector:@selector(operationDidStart) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - } - [self.lock unlock]; -} - -- (void)operationDidStart { - [self.lock lock]; - if (! [self isCancelled]) { - self.connection = [[NSURLConnection alloc] initWithRequest:self.request delegate:self startImmediately:NO]; - - NSRunLoop *runLoop = [NSRunLoop currentRunLoop]; - for (NSString *runLoopMode in self.runLoopModes) { - [self.connection scheduleInRunLoop:runLoop forMode:runLoopMode]; - [self.outputStream scheduleInRunLoop:runLoop forMode:runLoopMode]; - } - - [self.connection start]; - } - [self.lock unlock]; - - dispatch_async(dispatch_get_main_queue(), ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidStartNotification object:self]; - }); - - if ([self isCancelled]) { - [self finish]; - } -} - -- (void)finish { - self.state = AFOperationFinishedState; - - dispatch_async(dispatch_get_main_queue(), ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:AFNetworkingOperationDidFinishNotification object:self]; - }); -} - -- (void)cancel { - [self.lock lock]; - if (![self isFinished] && ![self isCancelled]) { - [self willChangeValueForKey:@"isCancelled"]; - _cancelled = YES; - [super cancel]; - [self didChangeValueForKey:@"isCancelled"]; - - // Cancel the connection on the thread it runs on to prevent race conditions - [self performSelector:@selector(cancelConnection) onThread:[[self class] networkRequestThread] withObject:nil waitUntilDone:NO modes:[self.runLoopModes allObjects]]; - } - [self.lock unlock]; -} - -- (void)cancelConnection { - NSDictionary *userInfo = nil; - if ([self.request URL]) { - userInfo = [NSDictionary dictionaryWithObject:[self.request URL] forKey:NSURLErrorFailingURLErrorKey]; - } - self.error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:userInfo]; - - if (self.connection) { - [self.connection cancel]; - - // Manually send this delegate message since `[self.connection cancel]` causes the connection to never send another message to its delegate - [self performSelector:@selector(connection:didFailWithError:) withObject:self.connection withObject:self.error]; - } -} - -#pragma mark - NSURLConnectionDelegate - -#ifdef _AFNETWORKING_PIN_SSL_CERTIFICATES_ -- (void)connection:(NSURLConnection *)connection -willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ - if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { - SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; - SecCertificateRef certificate = SecTrustGetCertificateAtIndex(serverTrust, 0); - NSData *certificateData = (__bridge_transfer NSData *)SecCertificateCopyData(certificate); - - if ([[[self class] pinnedCertificates] containsObject:certificateData]) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - switch (self.SSLPinningMode) { - case AFSSLPinningModePublicKey: { - id publicKey = (__bridge_transfer id)SecTrustCopyPublicKey(serverTrust); - - if ([[self.class pinnedPublicKeys] containsObject:publicKey]) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] cancelAuthenticationChallenge:challenge]; - } - - break; - } - case AFSSLPinningModeCertificate: { - SecCertificateRef serverCertificate = SecTrustGetCertificateAtIndex(serverTrust, 0); - NSData *serverCertificateData = (__bridge_transfer NSData *)SecCertificateCopyData(serverCertificate); - - if ([[[self class] pinnedCertificates] containsObject:serverCertificateData]) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] cancelAuthenticationChallenge:challenge]; - } - - break; - } - case AFSSLPinningModeNone: { -#ifdef _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_ - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; -#else - SecTrustResultType result = 0; - OSStatus status = SecTrustEvaluate(serverTrust, &result); - NSAssert(status == noErr, @"SecTrustEvaluate error: %ld", (long int)status); - - if (result == kSecTrustResultUnspecified || result == kSecTrustResultProceed) { - NSURLCredential *credential = [NSURLCredential credentialForTrust:serverTrust]; - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] cancelAuthenticationChallenge:challenge]; - } -#endif - break; - } - } - } - } -} -#endif - - -- (BOOL)connection:(NSURLConnection *)connection -canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace -{ -#ifdef _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_ - if ([protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { - return YES; - } -#endif - - if (self.authenticationAgainstProtectionSpace) { - return self.authenticationAgainstProtectionSpace(connection, protectionSpace); - } else if ([protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust] || [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodClientCertificate]) { - return NO; - } else { - return YES; - } -} - -- (void)connection:(NSURLConnection *)connection -didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge -{ -#ifdef _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_ - if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) { - [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge]; - return; - } -#endif - - if (self.authenticationChallenge) { - self.authenticationChallenge(connection, challenge); - } else { - if ([challenge previousFailureCount] == 0) { - NSURLCredential *credential = nil; - - NSString *user = [[self.request URL] user]; - NSString *password = [[self.request URL] password]; - - if (user && password) { - credential = [NSURLCredential credentialWithUser:user password:password persistence:NSURLCredentialPersistenceNone]; - } else if (user) { - credential = [[[NSURLCredentialStorage sharedCredentialStorage] credentialsForProtectionSpace:[challenge protectionSpace]] objectForKey:user]; - } else { - credential = [[NSURLCredentialStorage sharedCredentialStorage] defaultCredentialForProtectionSpace:[challenge protectionSpace]]; - } - - if (!credential) { - credential = self.credential; - } - - if (credential) { - [[challenge sender] useCredential:credential forAuthenticationChallenge:challenge]; - } else { - [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; - } - } else { - [[challenge sender] continueWithoutCredentialForAuthenticationChallenge:challenge]; - } - } -} - -- (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection __unused *)connection { - return self.shouldUseCredentialStorage; -} - -- (NSInputStream *)connection:(NSURLConnection __unused *)connection - needNewBodyStream:(NSURLRequest *)request -{ - if ([request.HTTPBodyStream conformsToProtocol:@protocol(NSCopying)]) { - return [request.HTTPBodyStream copy]; - } - - return nil; -} - -- (NSURLRequest *)connection:(NSURLConnection *)connection - willSendRequest:(NSURLRequest *)request - redirectResponse:(NSURLResponse *)redirectResponse -{ - if (self.redirectResponse) { - return self.redirectResponse(connection, request, redirectResponse); - } else { - return request; - } -} - -- (void)connection:(NSURLConnection __unused *)connection - didSendBodyData:(NSInteger)bytesWritten - totalBytesWritten:(NSInteger)totalBytesWritten -totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite -{ - if (self.uploadProgress) { - dispatch_async(dispatch_get_main_queue(), ^{ - self.uploadProgress((NSUInteger)bytesWritten, totalBytesWritten, totalBytesExpectedToWrite); - }); - } -} - -- (void)connection:(NSURLConnection __unused *)connection -didReceiveResponse:(NSURLResponse *)response -{ - self.response = response; - - [self.outputStream open]; -} - -- (void)connection:(NSURLConnection __unused *)connection - didReceiveData:(NSData *)data -{ - if ([self.outputStream hasSpaceAvailable]) { - const uint8_t *dataBuffer = (uint8_t *) [data bytes]; - [self.outputStream write:&dataBuffer[0] maxLength:[data length]]; - } - - dispatch_async(dispatch_get_main_queue(), ^{ - self.totalBytesRead += [data length]; - - if (self.downloadProgress) { - self.downloadProgress([data length], self.totalBytesRead, self.response.expectedContentLength); - } - }); -} - -- (void)connectionDidFinishLoading:(NSURLConnection __unused *)connection { - self.responseData = [self.outputStream propertyForKey:NSStreamDataWrittenToMemoryStreamKey]; - - [self.outputStream close]; - - [self finish]; - - self.connection = nil; -} - -- (void)connection:(NSURLConnection __unused *)connection - didFailWithError:(NSError *)error -{ - self.error = error; - - [self.outputStream close]; - - [self finish]; - - self.connection = nil; -} - -- (NSCachedURLResponse *)connection:(NSURLConnection *)connection - willCacheResponse:(NSCachedURLResponse *)cachedResponse -{ - if (self.cacheResponse) { - return self.cacheResponse(connection, cachedResponse); - } else { - if ([self isCancelled]) { - return nil; - } - - return cachedResponse; - } -} - -#pragma mark - NSCoding - -- (id)initWithCoder:(NSCoder *)aDecoder { - NSURLRequest *request = [aDecoder decodeObjectForKey:@"request"]; - - self = [self initWithRequest:request]; - if (!self) { - return nil; - } - - self.state = (AFOperationState)[aDecoder decodeIntegerForKey:@"state"]; - self.cancelled = [aDecoder decodeBoolForKey:@"isCancelled"]; - self.response = [aDecoder decodeObjectForKey:@"response"]; - self.error = [aDecoder decodeObjectForKey:@"error"]; - self.responseData = [aDecoder decodeObjectForKey:@"responseData"]; - self.totalBytesRead = [[aDecoder decodeObjectForKey:@"totalBytesRead"] longLongValue]; - - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [self pause]; - - [aCoder encodeObject:self.request forKey:@"request"]; - - switch (self.state) { - case AFOperationExecutingState: - case AFOperationPausedState: - [aCoder encodeInteger:AFOperationReadyState forKey:@"state"]; - break; - default: - [aCoder encodeInteger:self.state forKey:@"state"]; - break; - } - - [aCoder encodeBool:[self isCancelled] forKey:@"isCancelled"]; - [aCoder encodeObject:self.response forKey:@"response"]; - [aCoder encodeObject:self.error forKey:@"error"]; - [aCoder encodeObject:self.responseData forKey:@"responseData"]; - [aCoder encodeObject:[NSNumber numberWithLongLong:self.totalBytesRead] forKey:@"totalBytesRead"]; -} - -#pragma mark - NSCopying - -- (id)copyWithZone:(NSZone *)zone { - AFURLConnectionOperation *operation = [(AFURLConnectionOperation *)[[self class] allocWithZone:zone] initWithRequest:self.request]; - - operation.uploadProgress = self.uploadProgress; - operation.downloadProgress = self.downloadProgress; - operation.authenticationAgainstProtectionSpace = self.authenticationAgainstProtectionSpace; - operation.authenticationChallenge = self.authenticationChallenge; - operation.cacheResponse = self.cacheResponse; - operation.redirectResponse = self.redirectResponse; - - return operation; -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h deleted file mode 100644 index 4130932e6988..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +++ /dev/null @@ -1,89 +0,0 @@ -// AFXMLRequestOperation.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFHTTPRequestOperation.h" - -#import - -/** - `AFXMLRequestOperation` is a subclass of `AFHTTPRequestOperation` for downloading and working with XML response data. - - ## Acceptable Content Types - - By default, `AFXMLRequestOperation` accepts the following MIME types, which includes the official standard, `application/xml`, as well as other commonly-used types: - - - `application/xml` - - `text/xml` - - ## Use With AFHTTPClient - - When `AFXMLRequestOperation` is registered with `AFHTTPClient`, the response object in the success callback of `HTTPRequestOperationWithRequest:success:failure:` will be an instance of `NSXMLParser`. On platforms that support `NSXMLDocument`, you have the option to ignore the response object, and simply use the `responseXMLDocument` property of the operation argument of the callback. - */ -@interface AFXMLRequestOperation : AFHTTPRequestOperation - -///---------------------------- -/// @name Getting Response Data -///---------------------------- - -/** - An `NSXMLParser` object constructed from the response data. - */ -@property (readonly, nonatomic, strong) NSXMLParser *responseXMLParser; - -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -/** - An `NSXMLDocument` 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. - */ -@property (readonly, nonatomic, strong) NSXMLDocument *responseXMLDocument; -#endif - -/** - Creates and returns an `AFXMLRequestOperation` object and sets the specified success and failure callbacks. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation - @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 XML parser constructed with the response data of request. - @param failure A block object to be executed when the operation finishes unsuccessfully. 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 error that occurred. - - @return A new XML request operation - */ -+ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure; - - -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -/** - Creates and returns an `AFXMLRequestOperation` object and sets the specified success and failure callbacks. - - @param urlRequest The request object to be loaded asynchronously during execution of the operation - @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 XML document created from the response data of request. - @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 XML. 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. - - @return A new XML request operation - */ -+ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure; -#endif - -@end diff --git a/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m b/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m deleted file mode 100644 index 30a76b90ae9f..000000000000 --- a/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +++ /dev/null @@ -1,166 +0,0 @@ -// AFXMLRequestOperation.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import "AFXMLRequestOperation.h" - -#include - -static dispatch_queue_t xml_request_operation_processing_queue() { - static dispatch_queue_t af_xml_request_operation_processing_queue; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - af_xml_request_operation_processing_queue = dispatch_queue_create("com.alamofire.networking.xml-request.processing", DISPATCH_QUEUE_CONCURRENT); - }); - - return af_xml_request_operation_processing_queue; -} - -@interface AFXMLRequestOperation () -@property (readwrite, nonatomic, strong) NSXMLParser *responseXMLParser; -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -@property (readwrite, nonatomic, strong) NSXMLDocument *responseXMLDocument; -#endif -@property (readwrite, nonatomic, strong) NSError *XMLError; -@end - -@implementation AFXMLRequestOperation -@synthesize responseXMLParser = _responseXMLParser; -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -@synthesize responseXMLDocument = _responseXMLDocument; -#endif -@synthesize XMLError = _XMLError; - -+ (instancetype)XMLParserRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLParser *XMLParser))failure -{ - AFXMLRequestOperation *requestOperation = [(AFXMLRequestOperation *)[self alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if (success) { - success(operation.request, operation.response, responseObject); - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - failure(operation.request, operation.response, error, [(AFXMLRequestOperation *)operation responseXMLParser]); - } - }]; - - return requestOperation; -} - -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -+ (instancetype)XMLDocumentRequestOperationWithRequest:(NSURLRequest *)urlRequest - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLDocument *document))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, NSXMLDocument *document))failure -{ - AFXMLRequestOperation *requestOperation = [[self alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, __unused id responseObject) { - if (success) { - NSXMLDocument *XMLDocument = [(AFXMLRequestOperation *)operation responseXMLDocument]; - success(operation.request, operation.response, XMLDocument); - } - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if (failure) { - NSXMLDocument *XMLDocument = [(AFXMLRequestOperation *)operation responseXMLDocument]; - failure(operation.request, operation.response, error, XMLDocument); - } - }]; - - return requestOperation; -} -#endif - - -- (NSXMLParser *)responseXMLParser { - if (!_responseXMLParser && [self.responseData length] > 0 && [self isFinished]) { - self.responseXMLParser = [[NSXMLParser alloc] initWithData:self.responseData]; - } - - return _responseXMLParser; -} - -#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED -- (NSXMLDocument *)responseXMLDocument { - if (!_responseXMLDocument && [self.responseData length] > 0 && [self isFinished]) { - NSError *error = nil; - self.responseXMLDocument = [[NSXMLDocument alloc] initWithData:self.responseData options:0 error:&error]; - self.XMLError = error; - } - - return _responseXMLDocument; -} -#endif - -- (NSError *)error { - if (_XMLError) { - return _XMLError; - } else { - return [super error]; - } -} - -#pragma mark - NSOperation - -- (void)cancel { - [super cancel]; - - self.responseXMLParser.delegate = nil; -} - -#pragma mark - AFHTTPRequestOperation - -+ (NSSet *)acceptableContentTypes { - return [NSSet setWithObjects:@"application/xml", @"text/xml", nil]; -} - -+ (BOOL)canProcessRequest:(NSURLRequest *)request { - return [[[request URL] pathExtension] isEqualToString:@"xml"] || [super canProcessRequest:request]; -} - -- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success - failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure -{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Warc-retain-cycles" - self.completionBlock = ^ { - dispatch_async(xml_request_operation_processing_queue(), ^(void) { - NSXMLParser *XMLParser = self.responseXMLParser; - - if (self.error) { - if (failure) { - dispatch_async(self.failureCallbackQueue ?: dispatch_get_main_queue(), ^{ - failure(self, self.error); - }); - } - } else { - if (success) { - dispatch_async(self.successCallbackQueue ?: dispatch_get_main_queue(), ^{ - success(self, XMLParser); - }); - } - } - }); - }; -#pragma clang diagnostic pop -} - -@end diff --git a/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h deleted file mode 100644 index f9a389f614c3..000000000000 --- a/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +++ /dev/null @@ -1,78 +0,0 @@ -// UIImageView+AFNetworking.h -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import "AFImageRequestOperation.h" - -#import - -#if __IPHONE_OS_VERSION_MIN_REQUIRED -#import - -/** - This category adds methods to the UIKit framework's `UIImageView` class. The methods in this category provide support for loading remote images asynchronously from a URL. - */ -@interface UIImageView (AFNetworking) - -/** - Creates and enqueues an image request operation, which asynchronously downloads the image from the specified URL, and sets it the request is finished. Any previous image request for the receiver will be cancelled. If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. - - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` - - @param url The URL used for the image request. - */ -- (void)setImageWithURL:(NSURL *)url; - -/** - Creates and enqueues an image request operation, which asynchronously downloads the image from the specified URL. Any previous image request for the receiver will be cancelled. If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. - - @param url The URL used for the image request. - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. - - @discussion By default, URL requests have a cache policy of `NSURLCacheStorageAllowed` and a timeout interval of 30 seconds, and are set not handle cookies. To configure URL requests differently, use `setImageWithURLRequest:placeholderImage:success:failure:` - */ -- (void)setImageWithURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage; - -/** - Creates and enqueues an image request operation, which asynchronously downloads the image with the specified URL request object. Any previous image request for the receiver will be cancelled. If the image is cached locally, the image is set immediately, otherwise the specified placeholder image will be set immediately, and then the remote image will be set once the request is finished. - - @param urlRequest The URL request used for the image request. - @param placeholderImage The image to be set initially, until the image request finishes. If `nil`, the image view will not change its image until the image request finishes. - @param success A block to be executed when the image request operation 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 sent from the client, the response received from the server, and the image created from the response data of request. If the image was returned from cache, the request and response parameters will be `nil`. - @param failure A block object to be executed when the image request operation finishes unsuccessfully, or that 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 error object describing the network or parsing error that occurred. - - @discussion If a success block is specified, it is the responsibility of the block to set the image of the image view before returning. If no success block is specified, the default behavior of setting the image with `self.image = image` is executed. - */ -- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure; - -/** - Cancels any executing image request operation for the receiver, if one exists. - */ -- (void)cancelImageRequestOperation; - -@end - -#endif diff --git a/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m b/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m deleted file mode 100644 index f3409970bfd3..000000000000 --- a/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +++ /dev/null @@ -1,184 +0,0 @@ -// UIImageView+AFNetworking.m -// -// Copyright (c) 2011 Gowalla (http://gowalla.com/) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -#import -#import - -#if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#import "UIImageView+AFNetworking.h" - -@interface AFImageCache : NSCache -- (UIImage *)cachedImageForRequest:(NSURLRequest *)request; -- (void)cacheImage:(UIImage *)image - forRequest:(NSURLRequest *)request; -@end - -#pragma mark - - -static char kAFImageRequestOperationObjectKey; - -@interface UIImageView (_AFNetworking) -@property (readwrite, nonatomic, strong, setter = af_setImageRequestOperation:) AFImageRequestOperation *af_imageRequestOperation; -@end - -@implementation UIImageView (_AFNetworking) -@dynamic af_imageRequestOperation; -@end - -#pragma mark - - -@implementation UIImageView (AFNetworking) - -- (AFHTTPRequestOperation *)af_imageRequestOperation { - return (AFHTTPRequestOperation *)objc_getAssociatedObject(self, &kAFImageRequestOperationObjectKey); -} - -- (void)af_setImageRequestOperation:(AFImageRequestOperation *)imageRequestOperation { - objc_setAssociatedObject(self, &kAFImageRequestOperationObjectKey, imageRequestOperation, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -+ (NSOperationQueue *)af_sharedImageRequestOperationQueue { - static NSOperationQueue *_af_imageRequestOperationQueue = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _af_imageRequestOperationQueue = [[NSOperationQueue alloc] init]; - [_af_imageRequestOperationQueue setMaxConcurrentOperationCount:NSOperationQueueDefaultMaxConcurrentOperationCount]; - }); - - return _af_imageRequestOperationQueue; -} - -+ (AFImageCache *)af_sharedImageCache { - static AFImageCache *_af_imageCache = nil; - static dispatch_once_t oncePredicate; - dispatch_once(&oncePredicate, ^{ - _af_imageCache = [[AFImageCache alloc] init]; - }); - - return _af_imageCache; -} - -#pragma mark - - -- (void)setImageWithURL:(NSURL *)url { - [self setImageWithURL:url placeholderImage:nil]; -} - -- (void)setImageWithURL:(NSURL *)url - placeholderImage:(UIImage *)placeholderImage -{ - NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; - [request addValue:@"image/*" forHTTPHeaderField:@"Accept"]; - - [self setImageWithURLRequest:request placeholderImage:placeholderImage success:nil failure:nil]; -} - -- (void)setImageWithURLRequest:(NSURLRequest *)urlRequest - placeholderImage:(UIImage *)placeholderImage - success:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, UIImage *image))success - failure:(void (^)(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error))failure -{ - [self cancelImageRequestOperation]; - - UIImage *cachedImage = [[[self class] af_sharedImageCache] cachedImageForRequest:urlRequest]; - if (cachedImage) { - if (success) { - success(nil, nil, cachedImage); - } else { - self.image = cachedImage; - } - - self.af_imageRequestOperation = nil; - } else { - self.image = placeholderImage; - - AFImageRequestOperation *requestOperation = [[AFImageRequestOperation alloc] initWithRequest:urlRequest]; - [requestOperation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) { - if ([urlRequest isEqual:[self.af_imageRequestOperation request]]) { - if (success) { - success(operation.request, operation.response, responseObject); - } else if (responseObject) { - self.image = responseObject; - } - - if (self.af_imageRequestOperation == operation) { - self.af_imageRequestOperation = nil; - } - } - - [[[self class] af_sharedImageCache] cacheImage:responseObject forRequest:urlRequest]; - } failure:^(AFHTTPRequestOperation *operation, NSError *error) { - if ([urlRequest isEqual:[self.af_imageRequestOperation request]]) { - if (failure) { - failure(operation.request, operation.response, error); - } - - if (self.af_imageRequestOperation == operation) { - self.af_imageRequestOperation = nil; - } - } - }]; - - self.af_imageRequestOperation = requestOperation; - - [[[self class] af_sharedImageRequestOperationQueue] addOperation:self.af_imageRequestOperation]; - } -} - -- (void)cancelImageRequestOperation { - [self.af_imageRequestOperation cancel]; - self.af_imageRequestOperation = nil; -} - -@end - -#pragma mark - - -static inline NSString * AFImageCacheKeyFromURLRequest(NSURLRequest *request) { - return [[request URL] absoluteString]; -} - -@implementation AFImageCache - -- (UIImage *)cachedImageForRequest:(NSURLRequest *)request { - switch ([request cachePolicy]) { - case NSURLRequestReloadIgnoringCacheData: - case NSURLRequestReloadIgnoringLocalAndRemoteCacheData: - return nil; - default: - break; - } - - return [self objectForKey:AFImageCacheKeyFromURLRequest(request)]; -} - -- (void)cacheImage:(UIImage *)image - forRequest:(NSURLRequest *)request -{ - if (image && request) { - [self setObject:image forKey:AFImageCacheKeyFromURLRequest(request)]; - } -} - -@end - -#endif diff --git a/Pods/AFNetworking/LICENSE b/Pods/AFNetworking/LICENSE deleted file mode 100644 index 42d32adadadd..000000000000 --- a/Pods/AFNetworking/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Gowalla (http://gowalla.com/) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/Pods/AFNetworking/README.md b/Pods/AFNetworking/README.md deleted file mode 100644 index e60615f5ffe5..000000000000 --- a/Pods/AFNetworking/README.md +++ /dev/null @@ -1,186 +0,0 @@ -

- AFNetworking -

- -AFNetworking is a delightful networking library for iOS and Mac OS X. It's built on top of [NSURLConnection](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html), [NSOperation](http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html), and other familiar Foundation technologies. It has a modular architecture with well-designed, feature-rich APIs that are a joy to use. For example, here's how easy it is to get JSON from a URL: - -``` objective-c -NSURL *url = [NSURL URLWithString:@"https://alpha-api.app.net/stream/0/posts/stream/global"]; -NSURLRequest *request = [NSURLRequest requestWithURL:url]; -AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { - NSLog(@"App.net Global Stream: %@", JSON); -} failure:nil]; -[operation start]; -``` - -Perhaps the most important feature of all, however, is the amazing community of developers who use and contribute to AFNetworking every day. AFNetworking powers some of the most popular and critically-acclaimed apps on the iPhone, iPad, and Mac. - -Choose AFNetworking for your next project, or migrate over your existing projects—you'll be happy you did! - -## How To Get Started - -- [Download AFNetworking](https://github.com/AFNetworking/AFNetworking/zipball/master) and try out the included Mac and iPhone example apps -- Read the ["Getting Started" guide](https://github.com/AFNetworking/AFNetworking/wiki/Getting-Started-with-AFNetworking), [FAQ](https://github.com/AFNetworking/AFNetworking/wiki/AFNetworking-FAQ), or [other articles in the wiki](https://github.com/AFNetworking/AFNetworking/wiki) -- Check out the [complete documentation](http://afnetworking.github.com/AFNetworking/) for a comprehensive look at the APIs available in AFNetworking -- Watch the [NSScreencast episode about AFNetworking](http://nsscreencast.com/episodes/6-afnetworking) for a quick introduction to how to use it in your application -- Questions? [Stack Overflow](http://stackoverflow.com/questions/tagged/afnetworking) is the best place to find answers - -## Overview - -

- AFNetworking Architecture Diagram -

- -AFNetworking is architected to be as small and modular as possible, in order to make it simple to use and extend. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Core
AFURLConnectionOperationAn NSOperation that implements the NSURLConnection delegate methods.
HTTP Requests
AFHTTPRequestOperationA 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.
AFJSONRequestOperationA subclass of AFHTTPRequestOperation for downloading and working with JSON response data.
AFXMLRequestOperationA subclass of AFHTTPRequestOperation for downloading and working with XML response data.
AFPropertyListRequestOperationA subclass of AFHTTPRequestOperation for downloading and deserializing objects with property list response data.
HTTP Client
AFHTTPClient - Captures the common patterns of communicating with an web application over HTTP, including: - -
    -
  • Making requests from relative paths of a base URL
  • -
  • Setting HTTP headers to be added automatically to requests
  • -
  • Authenticating requests with HTTP Basic credentials or an OAuth token
  • -
  • Managing an NSOperationQueue for requests made by the client
  • -
  • Generating query strings or HTTP bodies from an NSDictionary
  • -
  • Constructing multipart form requests
  • -
  • Automatically parsing HTTP response data into its corresponding object representation
  • -
  • Monitoring and responding to changes in network reachability
  • -
-
Images
AFImageRequestOperationA subclass of AFHTTPRequestOperation for downloading and processing images.
UIImageView+AFNetworkingAdds methods to UIImageView for loading remote images asynchronously from a URL.
- -## Example Usage - -### XML Request - -``` objective-c -NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://api.flickr.com/services/rest/?method=flickr.groups.browse&api_key=b6300e17ad3c506e706cb0072175d047&cat_id=34427469792%40N01&format=rest"]]; -AFXMLRequestOperation *operation = [AFXMLRequestOperation XMLParserRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, NSXMLParser *XMLParser) { - XMLParser.delegate = self; - [XMLParser parse]; -} failure:nil]; -[operation start]; -``` - -### Image Request - -``` objective-c -UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)]; -[imageView setImageWithURL:[NSURL URLWithString:@"http://i.imgur.com/r4uwx.jpg"] placeholderImage:[UIImage imageNamed:@"placeholder-avatar"]]; -``` - -### API Client Request - -``` objective-c -// AFAppDotNetAPIClient is a subclass of AFHTTPClient, which defines the base URL and default HTTP headers for NSURLRequests it creates -[[AFAppDotNetAPIClient sharedClient] getPath:@"stream/0/posts/stream/global" parameters:nil success:^(AFHTTPRequestOperation *operation, id JSON) { - NSLog(@"App.net Global Stream: %@", JSON); -} failure:nil]; -``` - -### File Upload with Progress Callback - -``` objective-c -NSURL *url = [NSURL URLWithString:@"http://api-base-url.com"]; -AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url]; -NSData *imageData = UIImageJPEGRepresentation([UIImage imageNamed:@"avatar.jpg"], 0.5); -NSMutableURLRequest *request = [httpClient multipartFormRequestWithMethod:@"POST" path:@"/upload" parameters:nil constructingBodyWithBlock: ^(id formData) { - [formData appendPartWithFileData:imageData name:@"avatar" fileName:@"avatar.jpg" mimeType:@"image/jpeg"]; -}]; - -AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; -[operation setUploadProgressBlock:^(NSUInteger bytesWritten, long long totalBytesWritten, long long totalBytesExpectedToWrite) { - NSLog(@"Sent %lld of %lld bytes", totalBytesWritten, totalBytesExpectedToWrite); -}]; -[httpClient enqueueHTTPRequestOperation:operation]; -``` - -### Streaming Request - -``` objective-c -NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://localhost:8080/encode"]]; - -AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:request]; -operation.inputStream = [NSInputStream inputStreamWithFileAtPath:[[NSBundle mainBundle] pathForResource:@"large-image" ofType:@"tiff"]]; -operation.outputStream = [NSOutputStream outputStreamToMemory]; -[operation start]; -``` - -## Requirements - -AFNetworking 1.0 and higher requires either [iOS 5.0](http://developer.apple.com/library/ios/#releasenotes/General/WhatsNewIniPhoneOS/Articles/iPhoneOS4.html) and above, or [Mac OS 10.7](http://developer.apple.com/library/mac/#releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_6.html#//apple_ref/doc/uid/TP40008898-SW7) ([64-bit with modern Cocoa runtime](https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtVersionsPlatforms.html)) and above. - -For compatibility with iOS 4.3, use the latest 0.10.x release. - -### ARC - -AFNetworking uses ARC as of its 1.0 release. - -If you are using AFNetworking 1.0 in your non-arc project, you will need to set a `-fobjc-arc` compiler flag on all of the AFNetworking source files. Conversely, if you are adding a pre-1.0 version of AFNetworking, you will need to set a `-fno-objc-arc` compiler flag. - -To set a compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Now select all AFNetworking source files, press Enter, insert `-fobjc-arc` or `-fno-objc-arc` and then "Done" to enable or disable ARC for AFNetworking. - -## Credits - -AFNetworking was created by [Scott Raymond](https://github.com/sco/) and [Mattt Thompson](https://github.com/mattt/) in the development of [Gowalla for iPhone](http://en.wikipedia.org/wiki/Gowalla). - -AFNetworking's logo was designed by [Alan Defibaugh](http://www.alandefibaugh.com/). - -And most of all, thanks to AFNetworking's [growing list of contributors](https://github.com/AFNetworking/AFNetworking/contributors). - -## Contact - -Follow AFNetworking on Twitter ([@AFNetworking](https://twitter.com/AFNetworking)) - -### Creators - -[Mattt Thompson](https://github.com/mattt) -[@mattt](https://twitter.com/mattt) - -[Scott Raymond](https://github.com/sco) -[@sco](https://twitter.com/sco) - -## License - -AFNetworking is available under the MIT license. See the LICENSE file for more info. - diff --git a/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h b/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h deleted file mode 120000 index a88168d71da2..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFHTTPClient.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h deleted file mode 120000 index d51daed27c1c..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h deleted file mode 120000 index f7c5e913d350..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFImageRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h deleted file mode 120000 index 4dd9622727ff..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFJSONRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h b/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h deleted file mode 120000 index a09102c76d08..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFNetworking.h b/Pods/BuildHeaders/AFNetworking/AFNetworking.h deleted file mode 120000 index 83dd518f7b2a..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFNetworking.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFNetworking.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h deleted file mode 120000 index fb82b5c57062..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFPropertyListRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h b/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h deleted file mode 120000 index 360459d4c03d..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFURLConnectionOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h b/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h deleted file mode 120000 index c5c354bbcb28..000000000000 --- a/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/AFXMLRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h b/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h deleted file mode 120000 index 7c7e6c38e965..000000000000 --- a/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +++ /dev/null @@ -1 +0,0 @@ -../../AFNetworking/AFNetworking/UIImageView+AFNetworking.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/CTidy.h b/Pods/BuildHeaders/CTidy/CTidy.h deleted file mode 120000 index f087809dce05..000000000000 --- a/Pods/BuildHeaders/CTidy/CTidy.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/CTidy/CTidy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/access.h b/Pods/BuildHeaders/CTidy/access.h deleted file mode 120000 index 0a1c73fa429e..000000000000 --- a/Pods/BuildHeaders/CTidy/access.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/access.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/attrdict.h b/Pods/BuildHeaders/CTidy/attrdict.h deleted file mode 120000 index 9e6a207f5752..000000000000 --- a/Pods/BuildHeaders/CTidy/attrdict.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/attrdict.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/attrs.h b/Pods/BuildHeaders/CTidy/attrs.h deleted file mode 120000 index ed2e7f5b4821..000000000000 --- a/Pods/BuildHeaders/CTidy/attrs.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/attrs.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/buffio.h b/Pods/BuildHeaders/CTidy/buffio.h deleted file mode 120000 index da37b880046d..000000000000 --- a/Pods/BuildHeaders/CTidy/buffio.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/include/buffio.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/charsets.h b/Pods/BuildHeaders/CTidy/charsets.h deleted file mode 120000 index 67f77a4b4e31..000000000000 --- a/Pods/BuildHeaders/CTidy/charsets.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/charsets.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/clean.h b/Pods/BuildHeaders/CTidy/clean.h deleted file mode 120000 index 2607fdba9b3e..000000000000 --- a/Pods/BuildHeaders/CTidy/clean.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/clean.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/config.h b/Pods/BuildHeaders/CTidy/config.h deleted file mode 120000 index 6f4aafe9ab2f..000000000000 --- a/Pods/BuildHeaders/CTidy/config.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/config.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/entities.h b/Pods/BuildHeaders/CTidy/entities.h deleted file mode 120000 index 5797137c8a18..000000000000 --- a/Pods/BuildHeaders/CTidy/entities.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/entities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/fileio.h b/Pods/BuildHeaders/CTidy/fileio.h deleted file mode 120000 index 5c34a79bc4da..000000000000 --- a/Pods/BuildHeaders/CTidy/fileio.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/fileio.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/forward.h b/Pods/BuildHeaders/CTidy/forward.h deleted file mode 120000 index 4afef8bfcc72..000000000000 --- a/Pods/BuildHeaders/CTidy/forward.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/forward.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/iconvtc.h b/Pods/BuildHeaders/CTidy/iconvtc.h deleted file mode 120000 index 45fb642a0cf6..000000000000 --- a/Pods/BuildHeaders/CTidy/iconvtc.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/iconvtc.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/lexer.h b/Pods/BuildHeaders/CTidy/lexer.h deleted file mode 120000 index 64a6e3971bb2..000000000000 --- a/Pods/BuildHeaders/CTidy/lexer.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/lexer.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/mappedio.h b/Pods/BuildHeaders/CTidy/mappedio.h deleted file mode 120000 index 1d8a8d7f369a..000000000000 --- a/Pods/BuildHeaders/CTidy/mappedio.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/mappedio.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/message.h b/Pods/BuildHeaders/CTidy/message.h deleted file mode 120000 index 0d296757b762..000000000000 --- a/Pods/BuildHeaders/CTidy/message.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/message.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/parser.h b/Pods/BuildHeaders/CTidy/parser.h deleted file mode 120000 index c3222ac96fcc..000000000000 --- a/Pods/BuildHeaders/CTidy/parser.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/parser.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/platform.h b/Pods/BuildHeaders/CTidy/platform.h deleted file mode 120000 index 7985b2caa99c..000000000000 --- a/Pods/BuildHeaders/CTidy/platform.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/include/platform.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/pprint.h b/Pods/BuildHeaders/CTidy/pprint.h deleted file mode 120000 index 80c1379861e5..000000000000 --- a/Pods/BuildHeaders/CTidy/pprint.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/pprint.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/streamio.h b/Pods/BuildHeaders/CTidy/streamio.h deleted file mode 120000 index 9ec64e822619..000000000000 --- a/Pods/BuildHeaders/CTidy/streamio.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/streamio.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/tags.h b/Pods/BuildHeaders/CTidy/tags.h deleted file mode 120000 index da5c205e56be..000000000000 --- a/Pods/BuildHeaders/CTidy/tags.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/tags.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/tidy-int.h b/Pods/BuildHeaders/CTidy/tidy-int.h deleted file mode 120000 index 1b70800384a4..000000000000 --- a/Pods/BuildHeaders/CTidy/tidy-int.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/tidy-int.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/tidy.h b/Pods/BuildHeaders/CTidy/tidy.h deleted file mode 120000 index dca2f077bbfe..000000000000 --- a/Pods/BuildHeaders/CTidy/tidy.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/include/tidy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/tidyenum.h b/Pods/BuildHeaders/CTidy/tidyenum.h deleted file mode 120000 index 348fa9e44c9c..000000000000 --- a/Pods/BuildHeaders/CTidy/tidyenum.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/include/tidyenum.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/tmbstr.h b/Pods/BuildHeaders/CTidy/tmbstr.h deleted file mode 120000 index 2ca1097a1e4b..000000000000 --- a/Pods/BuildHeaders/CTidy/tmbstr.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/tmbstr.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/utf8.h b/Pods/BuildHeaders/CTidy/utf8.h deleted file mode 120000 index f329ed4b199b..000000000000 --- a/Pods/BuildHeaders/CTidy/utf8.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/utf8.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/version.h b/Pods/BuildHeaders/CTidy/version.h deleted file mode 120000 index 57eb0195c467..000000000000 --- a/Pods/BuildHeaders/CTidy/version.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/version.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CTidy/win32tc.h b/Pods/BuildHeaders/CTidy/win32tc.h deleted file mode 120000 index 8fd10af70c9c..000000000000 --- a/Pods/BuildHeaders/CTidy/win32tc.h +++ /dev/null @@ -1 +0,0 @@ -../../CTidy/libtidy/src/win32tc.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h b/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h deleted file mode 120000 index 663f80831fa6..000000000000 --- a/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../CocoaLumberjack/Lumberjack/DDASLLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h b/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h deleted file mode 120000 index 950a053abdbf..000000000000 --- a/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h b/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h deleted file mode 120000 index 18c21496b74a..000000000000 --- a/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../CocoaLumberjack/Lumberjack/DDFileLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CocoaLumberjack/DDLog.h b/Pods/BuildHeaders/CocoaLumberjack/DDLog.h deleted file mode 120000 index 8af615d50315..000000000000 --- a/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +++ /dev/null @@ -1 +0,0 @@ -../../CocoaLumberjack/Lumberjack/DDLog.h \ No newline at end of file diff --git a/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h b/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h deleted file mode 120000 index 6c7bb5439056..000000000000 --- a/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../CocoaLumberjack/Lumberjack/DDTTYLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAccessibilityElement.h b/Pods/BuildHeaders/DTCoreText/DTAccessibilityElement.h deleted file mode 120000 index 59b0f36bd4aa..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAccessibilityElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAccessibilityElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAccessibilityViewProxy.h b/Pods/BuildHeaders/DTCoreText/DTAccessibilityViewProxy.h deleted file mode 120000 index 532cea6e4a6b..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAccessibilityViewProxy.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAccessibilityViewProxy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAnchorHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTAnchorHTMLElement.h deleted file mode 120000 index 61742b65d6ce..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAnchorHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAnchorHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAttributedLabel.h b/Pods/BuildHeaders/DTCoreText/DTAttributedLabel.h deleted file mode 120000 index 7b751f726f58..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAttributedLabel.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAttributedLabel.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAttributedTextCell.h b/Pods/BuildHeaders/DTCoreText/DTAttributedTextCell.h deleted file mode 120000 index a7b6056b504f..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAttributedTextCell.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAttributedTextCell.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAttributedTextContentView.h b/Pods/BuildHeaders/DTCoreText/DTAttributedTextContentView.h deleted file mode 120000 index 322075574e90..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAttributedTextContentView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAttributedTextContentView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTAttributedTextView.h b/Pods/BuildHeaders/DTCoreText/DTAttributedTextView.h deleted file mode 120000 index 3707908013c5..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTAttributedTextView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTAttributedTextView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTBreakHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTBreakHTMLElement.h deleted file mode 120000 index 073489254b38..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTBreakHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTBreakHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCSSListStyle.h b/Pods/BuildHeaders/DTCoreText/DTCSSListStyle.h deleted file mode 120000 index b0f368020518..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCSSListStyle.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCSSListStyle.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCSSStylesheet.h b/Pods/BuildHeaders/DTCoreText/DTCSSStylesheet.h deleted file mode 120000 index ea8830f842ac..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCSSStylesheet.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCSSStylesheet.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTColor+HTML.h b/Pods/BuildHeaders/DTCoreText/DTColor+HTML.h deleted file mode 120000 index c12f38bc37be..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTColor+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTColor+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCompatibility.h b/Pods/BuildHeaders/DTCoreText/DTCompatibility.h deleted file mode 120000 index bc77b203a447..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCompatibility.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCompatibility.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreText.h b/Pods/BuildHeaders/DTCoreText/DTCoreText.h deleted file mode 120000 index 8dab43589a52..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreText.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreText.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextConstants.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextConstants.h deleted file mode 120000 index 6014613f5185..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextConstants.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextConstants.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextFontCollection.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextFontCollection.h deleted file mode 120000 index e074ae4a86e1..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextFontCollection.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextFontCollection.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextFontDescriptor.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextFontDescriptor.h deleted file mode 120000 index 6176025dcf9b..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextFontDescriptor.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextFontDescriptor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextFunctions.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextFunctions.h deleted file mode 120000 index 566b75b544de..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextFunctions.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextFunctions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextGlyphRun.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextGlyphRun.h deleted file mode 120000 index f2a5d79f9f55..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextGlyphRun.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextGlyphRun.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame+Cursor.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame+Cursor.h deleted file mode 120000 index 5b91435d9a49..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame+Cursor.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextLayoutFrame+Cursor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame.h deleted file mode 120000 index 76af805f3158..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrame.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextLayoutFrame.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrameAccessibilityElementGenerator.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrameAccessibilityElementGenerator.h deleted file mode 120000 index 71a494429aeb..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutFrameAccessibilityElementGenerator.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextLayoutFrameAccessibilityElementGenerator.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutLine.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutLine.h deleted file mode 120000 index 1edae631a2db..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayoutLine.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextLayoutLine.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayouter.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextLayouter.h deleted file mode 120000 index 63bccd78bdd6..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextLayouter.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextLayouter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTCoreTextParagraphStyle.h b/Pods/BuildHeaders/DTCoreText/DTCoreTextParagraphStyle.h deleted file mode 120000 index 599c04e3e1e8..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTCoreTextParagraphStyle.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTCoreTextParagraphStyle.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderTextAttachment.h deleted file mode 120000 index dbd2525440c3..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTDictationPlaceholderTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderView.h b/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderView.h deleted file mode 120000 index f93569b40cc2..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTDictationPlaceholderView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTDictationPlaceholderView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHTMLAttributedStringBuilder.h b/Pods/BuildHeaders/DTCoreText/DTHTMLAttributedStringBuilder.h deleted file mode 120000 index ba23fb3410d1..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHTMLAttributedStringBuilder.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHTMLAttributedStringBuilder.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTHTMLElement.h deleted file mode 120000 index b27d47496bdd..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHTMLParserNode.h b/Pods/BuildHeaders/DTCoreText/DTHTMLParserNode.h deleted file mode 120000 index d174e89ddce6..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHTMLParserNode.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHTMLParserNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHTMLParserTextNode.h b/Pods/BuildHeaders/DTCoreText/DTHTMLParserTextNode.h deleted file mode 120000 index be986374478a..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHTMLParserTextNode.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHTMLParserTextNode.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHTMLWriter.h b/Pods/BuildHeaders/DTCoreText/DTHTMLWriter.h deleted file mode 120000 index cc18ff76af6c..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHTMLWriter.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHTMLWriter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTHorizontalRuleHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTHorizontalRuleHTMLElement.h deleted file mode 120000 index 174fc062b218..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTHorizontalRuleHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTHorizontalRuleHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTIframeTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTIframeTextAttachment.h deleted file mode 120000 index 6e86766c8530..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTIframeTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTIframeTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTImage+HTML.h b/Pods/BuildHeaders/DTCoreText/DTImage+HTML.h deleted file mode 120000 index 0dde477c54cc..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTImage+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTImage+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTImageTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTImageTextAttachment.h deleted file mode 120000 index 622ec8dd32c0..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTImageTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTImageTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTLazyImageView.h b/Pods/BuildHeaders/DTCoreText/DTLazyImageView.h deleted file mode 120000 index c712524d1fc8..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTLazyImageView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTLazyImageView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTLinkButton.h b/Pods/BuildHeaders/DTCoreText/DTLinkButton.h deleted file mode 120000 index f31b34e1e9b7..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTLinkButton.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTLinkButton.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTListItemHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTListItemHTMLElement.h deleted file mode 120000 index 581c0bfdc045..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTListItemHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTListItemHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTObjectTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTObjectTextAttachment.h deleted file mode 120000 index 12cb5833361f..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTObjectTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTObjectTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTStylesheetHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTStylesheetHTMLElement.h deleted file mode 120000 index 4f4d9df9dcb4..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTStylesheetHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTStylesheetHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTTextAttachment.h deleted file mode 120000 index 1b65e9d52594..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTTextAttachmentHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTTextAttachmentHTMLElement.h deleted file mode 120000 index be6f6ada47ba..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTTextAttachmentHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTTextAttachmentHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTTextBlock.h b/Pods/BuildHeaders/DTCoreText/DTTextBlock.h deleted file mode 120000 index f9a1fe34b186..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTTextBlock.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTTextBlock.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTTextHTMLElement.h b/Pods/BuildHeaders/DTCoreText/DTTextHTMLElement.h deleted file mode 120000 index 56ce07964071..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTTextHTMLElement.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTTextHTMLElement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTVideoTextAttachment.h b/Pods/BuildHeaders/DTCoreText/DTVideoTextAttachment.h deleted file mode 120000 index 0a5992fa5b3e..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTVideoTextAttachment.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTVideoTextAttachment.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/DTWebVideoView.h b/Pods/BuildHeaders/DTCoreText/DTWebVideoView.h deleted file mode 120000 index 17e214dc5f1d..000000000000 --- a/Pods/BuildHeaders/DTCoreText/DTWebVideoView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/DTWebVideoView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTCoreText.h b/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTCoreText.h deleted file mode 120000 index 97852c5f7a7e..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTCoreText.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSAttributedString+DTCoreText.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTDebug.h b/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTDebug.h deleted file mode 120000 index fb5a17086fd1..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSAttributedString+DTDebug.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSAttributedString+DTDebug.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSAttributedString+HTML.h b/Pods/BuildHeaders/DTCoreText/NSAttributedString+HTML.h deleted file mode 120000 index 6fb7ecf46b59..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSAttributedString+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSAttributedString+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSAttributedString+SmallCaps.h b/Pods/BuildHeaders/DTCoreText/NSAttributedString+SmallCaps.h deleted file mode 120000 index 3bb57d5f942f..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSAttributedString+SmallCaps.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSAttributedString+SmallCaps.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSAttributedStringRunDelegates.h b/Pods/BuildHeaders/DTCoreText/NSAttributedStringRunDelegates.h deleted file mode 120000 index 05643fb34574..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSAttributedStringRunDelegates.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSAttributedStringRunDelegates.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSCharacterSet+HTML.h b/Pods/BuildHeaders/DTCoreText/NSCharacterSet+HTML.h deleted file mode 120000 index d5e8d13c9b6d..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSCharacterSet+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSCharacterSet+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSDictionary+DTCoreText.h b/Pods/BuildHeaders/DTCoreText/NSDictionary+DTCoreText.h deleted file mode 120000 index 6e06a3e45110..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSDictionary+DTCoreText.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSDictionary+DTCoreText.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSMutableAttributedString+HTML.h b/Pods/BuildHeaders/DTCoreText/NSMutableAttributedString+HTML.h deleted file mode 120000 index e7cfdba93436..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSMutableAttributedString+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSMutableAttributedString+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSMutableString+HTML.h b/Pods/BuildHeaders/DTCoreText/NSMutableString+HTML.h deleted file mode 120000 index 6d4228c627f8..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSMutableString+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSMutableString+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSScanner+HTML.h b/Pods/BuildHeaders/DTCoreText/NSScanner+HTML.h deleted file mode 120000 index ba9fab3ff5b5..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSScanner+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSScanner+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSString+CSS.h b/Pods/BuildHeaders/DTCoreText/NSString+CSS.h deleted file mode 120000 index 535dd78e4ac1..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSString+CSS.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSString+CSS.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSString+HTML.h b/Pods/BuildHeaders/DTCoreText/NSString+HTML.h deleted file mode 120000 index 4ee7a7cde7a1..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSString+HTML.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSString+HTML.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/NSString+Paragraphs.h b/Pods/BuildHeaders/DTCoreText/NSString+Paragraphs.h deleted file mode 120000 index 38e318e75a91..000000000000 --- a/Pods/BuildHeaders/DTCoreText/NSString+Paragraphs.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/NSString+Paragraphs.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTCoreText/UIFont+DTCoreText.h b/Pods/BuildHeaders/DTCoreText/UIFont+DTCoreText.h deleted file mode 120000 index bccce6eb9adf..000000000000 --- a/Pods/BuildHeaders/DTCoreText/UIFont+DTCoreText.h +++ /dev/null @@ -1 +0,0 @@ -../../DTCoreText/Core/Source/UIFont+DTCoreText.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTActivityTitleView.h b/Pods/BuildHeaders/DTFoundation/DTActivityTitleView.h deleted file mode 120000 index 4bf257bedf06..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTActivityTitleView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/DTActivityTitleView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTAsyncFileDeleter.h b/Pods/BuildHeaders/DTFoundation/DTAsyncFileDeleter.h deleted file mode 120000 index 79f4622710e1..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTAsyncFileDeleter.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTAsyncFileDeleter.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTBase64Coding.h b/Pods/BuildHeaders/DTFoundation/DTBase64Coding.h deleted file mode 120000 index 54f3462ae2eb..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTBase64Coding.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTBase64Coding.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTBlockFunctions.h b/Pods/BuildHeaders/DTFoundation/DTBlockFunctions.h deleted file mode 120000 index 12a7be671846..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTBlockFunctions.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTBlockFunctions.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTCustomColoredAccessory.h b/Pods/BuildHeaders/DTFoundation/DTCustomColoredAccessory.h deleted file mode 120000 index 1085e16e3d46..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTCustomColoredAccessory.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/DTCustomColoredAccessory.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTExtendedFileAttributes.h b/Pods/BuildHeaders/DTFoundation/DTExtendedFileAttributes.h deleted file mode 120000 index aff694931935..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTExtendedFileAttributes.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTExtendedFileAttributes.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTFolderMonitor.h b/Pods/BuildHeaders/DTFoundation/DTFolderMonitor.h deleted file mode 120000 index d7f9d9b7247e..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTFolderMonitor.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTFolderMonitor.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTFoundationConstants.h b/Pods/BuildHeaders/DTFoundation/DTFoundationConstants.h deleted file mode 120000 index abc27341ae9c..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTFoundationConstants.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTFoundationConstants.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTHTMLParser.h b/Pods/BuildHeaders/DTFoundation/DTHTMLParser.h deleted file mode 120000 index 92590c1f4d43..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTHTMLParser.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTHTMLParser/DTHTMLParser.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTLog.h b/Pods/BuildHeaders/DTFoundation/DTLog.h deleted file mode 120000 index ade72ffabd37..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTLog.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTLog.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTPieProgressIndicator.h b/Pods/BuildHeaders/DTFoundation/DTPieProgressIndicator.h deleted file mode 120000 index 118c96d5b81d..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTPieProgressIndicator.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/DTPieProgressIndicator.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTSmartPagingScrollView.h b/Pods/BuildHeaders/DTFoundation/DTSmartPagingScrollView.h deleted file mode 120000 index 178d2387b1eb..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTSmartPagingScrollView.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/DTSmartPagingScrollView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTTiledLayerWithoutFade.h b/Pods/BuildHeaders/DTFoundation/DTTiledLayerWithoutFade.h deleted file mode 120000 index 35920126ee66..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTTiledLayerWithoutFade.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/DTTiledLayerWithoutFade.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTUtils.h b/Pods/BuildHeaders/DTFoundation/DTUtils.h deleted file mode 120000 index 3c43e64a1bf5..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTUtils.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTUtils.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTVersion.h b/Pods/BuildHeaders/DTFoundation/DTVersion.h deleted file mode 120000 index 914e06aa4057..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTVersion.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTVersion.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/DTWeakSupport.h b/Pods/BuildHeaders/DTFoundation/DTWeakSupport.h deleted file mode 120000 index c55afd07d846..000000000000 --- a/Pods/BuildHeaders/DTFoundation/DTWeakSupport.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/DTWeakSupport.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSArray+DTError.h b/Pods/BuildHeaders/DTFoundation/NSArray+DTError.h deleted file mode 120000 index 07fec9752831..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSArray+DTError.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSArray+DTError.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSData+DTCrypto.h b/Pods/BuildHeaders/DTFoundation/NSData+DTCrypto.h deleted file mode 120000 index 0062396b81c2..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSData+DTCrypto.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSData+DTCrypto.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSDictionary+DTError.h b/Pods/BuildHeaders/DTFoundation/NSDictionary+DTError.h deleted file mode 120000 index a2d5a125e03e..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSDictionary+DTError.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSDictionary+DTError.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSFileWrapper+DTCopying.h b/Pods/BuildHeaders/DTFoundation/NSFileWrapper+DTCopying.h deleted file mode 120000 index 10ce07c8132a..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSFileWrapper+DTCopying.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSFileWrapper+DTCopying.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSMutableArray+DTMoving.h b/Pods/BuildHeaders/DTFoundation/NSMutableArray+DTMoving.h deleted file mode 120000 index 941109ff6b98..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSMutableArray+DTMoving.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSMutableArray+DTMoving.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSString+DTFormatNumbers.h b/Pods/BuildHeaders/DTFoundation/NSString+DTFormatNumbers.h deleted file mode 120000 index 8534f2628760..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSString+DTFormatNumbers.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSString+DTFormatNumbers.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSString+DTPaths.h b/Pods/BuildHeaders/DTFoundation/NSString+DTPaths.h deleted file mode 120000 index 2dcb1a643f44..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSString+DTPaths.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSString+DTPaths.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSString+DTURLEncoding.h b/Pods/BuildHeaders/DTFoundation/NSString+DTURLEncoding.h deleted file mode 120000 index 11592102bcc5..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSString+DTURLEncoding.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSString+DTURLEncoding.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSString+DTUtilities.h b/Pods/BuildHeaders/DTFoundation/NSString+DTUtilities.h deleted file mode 120000 index a98c423ce0fb..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSString+DTUtilities.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSString+DTUtilities.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSURL+DTAppLinks.h b/Pods/BuildHeaders/DTFoundation/NSURL+DTAppLinks.h deleted file mode 120000 index 6884cab7c9fd..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSURL+DTAppLinks.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/NSURL+DTAppLinks.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSURL+DTComparing.h b/Pods/BuildHeaders/DTFoundation/NSURL+DTComparing.h deleted file mode 120000 index 4094157791e5..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSURL+DTComparing.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSURL+DTComparing.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/NSURL+DTUnshorten.h b/Pods/BuildHeaders/DTFoundation/NSURL+DTUnshorten.h deleted file mode 120000 index d2cb85333624..000000000000 --- a/Pods/BuildHeaders/DTFoundation/NSURL+DTUnshorten.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/NSURL+DTUnshorten.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/UIApplication+DTNetworkActivity.h b/Pods/BuildHeaders/DTFoundation/UIApplication+DTNetworkActivity.h deleted file mode 120000 index cc7d445c1a85..000000000000 --- a/Pods/BuildHeaders/DTFoundation/UIApplication+DTNetworkActivity.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/UIApplication+DTNetworkActivity.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/UIImage+DTFoundation.h b/Pods/BuildHeaders/DTFoundation/UIImage+DTFoundation.h deleted file mode 120000 index ed6bd638810d..000000000000 --- a/Pods/BuildHeaders/DTFoundation/UIImage+DTFoundation.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/UIImage+DTFoundation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/UIView+DTFoundation.h b/Pods/BuildHeaders/DTFoundation/UIView+DTFoundation.h deleted file mode 120000 index 9fc400fb8abb..000000000000 --- a/Pods/BuildHeaders/DTFoundation/UIView+DTFoundation.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/UIView+DTFoundation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/DTFoundation/UIWebView+DTFoundation.h b/Pods/BuildHeaders/DTFoundation/UIWebView+DTFoundation.h deleted file mode 120000 index e43bc4c97db9..000000000000 --- a/Pods/BuildHeaders/DTFoundation/UIWebView+DTFoundation.h +++ /dev/null @@ -1 +0,0 @@ -../../DTFoundation/Core/Source/iOS/UIWebView+DTFoundation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/JSONKit/JSONKit.h b/Pods/BuildHeaders/JSONKit/JSONKit.h deleted file mode 120000 index ed38c558c32b..000000000000 --- a/Pods/BuildHeaders/JSONKit/JSONKit.h +++ /dev/null @@ -1 +0,0 @@ -../../JSONKit/JSONKit.h \ No newline at end of file diff --git a/Pods/BuildHeaders/MGImageUtilities/UIImage+ProportionalFill.h b/Pods/BuildHeaders/MGImageUtilities/UIImage+ProportionalFill.h deleted file mode 120000 index 639db6a594c2..000000000000 --- a/Pods/BuildHeaders/MGImageUtilities/UIImage+ProportionalFill.h +++ /dev/null @@ -1 +0,0 @@ -../../MGImageUtilities/Classes/UIImage+ProportionalFill.h \ No newline at end of file diff --git a/Pods/BuildHeaders/MGImageUtilities/UIImage+Tint.h b/Pods/BuildHeaders/MGImageUtilities/UIImage+Tint.h deleted file mode 120000 index c0ea7a7ebfb4..000000000000 --- a/Pods/BuildHeaders/MGImageUtilities/UIImage+Tint.h +++ /dev/null @@ -1 +0,0 @@ -../../MGImageUtilities/Classes/UIImage+Tint.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/MPCJSONDataSerializer.h b/Pods/BuildHeaders/Mixpanel/MPCJSONDataSerializer.h deleted file mode 120000 index 557829396634..000000000000 --- a/Pods/BuildHeaders/Mixpanel/MPCJSONDataSerializer.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Library/JSON/MPCJSONDataSerializer.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/MPCJSONSerializer.h b/Pods/BuildHeaders/Mixpanel/MPCJSONSerializer.h deleted file mode 120000 index 54d3cc649b68..000000000000 --- a/Pods/BuildHeaders/Mixpanel/MPCJSONSerializer.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Library/JSON/MPCJSONSerializer.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/MPCSerializedJSONData.h b/Pods/BuildHeaders/Mixpanel/MPCSerializedJSONData.h deleted file mode 120000 index a7c3095aaa9f..000000000000 --- a/Pods/BuildHeaders/Mixpanel/MPCSerializedJSONData.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Library/JSON/MPCSerializedJSONData.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/Mixpanel.h b/Pods/BuildHeaders/Mixpanel/Mixpanel.h deleted file mode 120000 index d3d248891550..000000000000 --- a/Pods/BuildHeaders/Mixpanel/Mixpanel.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Mixpanel.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/NSData+MPBase64.h b/Pods/BuildHeaders/Mixpanel/NSData+MPBase64.h deleted file mode 120000 index 9812ccd74790..000000000000 --- a/Pods/BuildHeaders/Mixpanel/NSData+MPBase64.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Library/NSData_Base64/NSData+MPBase64.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Mixpanel/ODIN.h b/Pods/BuildHeaders/Mixpanel/ODIN.h deleted file mode 120000 index 806b560251ab..000000000000 --- a/Pods/BuildHeaders/Mixpanel/ODIN.h +++ /dev/null @@ -1 +0,0 @@ -../../Mixpanel/Mixpanel/Library/ODIN/ODIN.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSLogger-CocoaLumberjack-connector/DDNSLoggerLogger.h b/Pods/BuildHeaders/NSLogger-CocoaLumberjack-connector/DDNSLoggerLogger.h deleted file mode 120000 index 5e79151fefa7..000000000000 --- a/Pods/BuildHeaders/NSLogger-CocoaLumberjack-connector/DDNSLoggerLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../NSLogger-CocoaLumberjack-connector/DDNSLoggerLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSLogger/LoggerClient.h b/Pods/BuildHeaders/NSLogger/LoggerClient.h deleted file mode 120000 index 6344b53b8954..000000000000 --- a/Pods/BuildHeaders/NSLogger/LoggerClient.h +++ /dev/null @@ -1 +0,0 @@ -../../NSLogger/Client Logger/iOS/LoggerClient.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSLogger/LoggerCommon.h b/Pods/BuildHeaders/NSLogger/LoggerCommon.h deleted file mode 120000 index 81837c3d2014..000000000000 --- a/Pods/BuildHeaders/NSLogger/LoggerCommon.h +++ /dev/null @@ -1 +0,0 @@ -../../NSLogger/Client Logger/iOS/LoggerCommon.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSObject-SafeExpectations/NSDictionary+SafeExpectations.h b/Pods/BuildHeaders/NSObject-SafeExpectations/NSDictionary+SafeExpectations.h deleted file mode 120000 index e6f102a1e48e..000000000000 --- a/Pods/BuildHeaders/NSObject-SafeExpectations/NSDictionary+SafeExpectations.h +++ /dev/null @@ -1 +0,0 @@ -../../NSObject-SafeExpectations/NSDictionary+SafeExpectations.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSObject-SafeExpectations/NSObject+SafeExpectations.h b/Pods/BuildHeaders/NSObject-SafeExpectations/NSObject+SafeExpectations.h deleted file mode 120000 index c5faa0b5f129..000000000000 --- a/Pods/BuildHeaders/NSObject-SafeExpectations/NSObject+SafeExpectations.h +++ /dev/null @@ -1 +0,0 @@ -../../NSObject-SafeExpectations/NSObject+SafeExpectations.h \ No newline at end of file diff --git a/Pods/BuildHeaders/NSURL+IDN/NSURL+IDN.h b/Pods/BuildHeaders/NSURL+IDN/NSURL+IDN.h deleted file mode 120000 index 32ea27ffd10b..000000000000 --- a/Pods/BuildHeaders/NSURL+IDN/NSURL+IDN.h +++ /dev/null @@ -1 +0,0 @@ -../../NSURL+IDN/NSURL+IDN.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h deleted file mode 120000 index ddea87e25ed3..000000000000 --- a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubs.h +++ /dev/null @@ -1 +0,0 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubs.h \ No newline at end of file diff --git a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h b/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h deleted file mode 120000 index fe2a9462ee51..000000000000 --- a/Pods/BuildHeaders/OHHTTPStubs/OHHTTPStubsResponse.h +++ /dev/null @@ -1 +0,0 @@ -../../OHHTTPStubs/OHHTTPStubs/OHHTTPStubsResponse.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastDataManager.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastDataManager.h deleted file mode 120000 index e0ddf5085e0a..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastDataManager.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastDataManager.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastDatabase.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastDatabase.h deleted file mode 120000 index b6481caf9c95..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastDatabase.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastDatabase.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastEvent.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastEvent.h deleted file mode 120000 index e7d6f8f6355e..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastEvent.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastEvent.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastEventLogger.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastEventLogger.h deleted file mode 120000 index 5811df3a0dc7..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastEventLogger.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastEventLogger.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastMeasurement.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastMeasurement.h deleted file mode 120000 index 486ad6a20b79..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastMeasurement.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastMeasurement.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastNetworkReachability.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastNetworkReachability.h deleted file mode 120000 index ea25ffa7f225..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastNetworkReachability.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastNetworkReachability.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutDelegate.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutDelegate.h deleted file mode 120000 index 20729e53182b..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutDelegate.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastOptOutDelegate.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutViewController.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutViewController.h deleted file mode 120000 index 19723ee12e64..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastOptOutViewController.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastOptOutViewController.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastParameters.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastParameters.h deleted file mode 120000 index 07bf531cebae..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastParameters.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastParameters.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastPolicy.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastPolicy.h deleted file mode 120000 index c83bdbf9ca10..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastPolicy.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastPolicy.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadJSONOperation.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadJSONOperation.h deleted file mode 120000 index fae836e60ef1..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadJSONOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastUploadJSONOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadManager.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadManager.h deleted file mode 120000 index b718051dde05..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUploadManager.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastUploadManager.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUtils.h b/Pods/BuildHeaders/Quantcast-Measure/QuantcastUtils.h deleted file mode 120000 index 07bdb4f308d9..000000000000 --- a/Pods/BuildHeaders/Quantcast-Measure/QuantcastUtils.h +++ /dev/null @@ -1 +0,0 @@ -../../Quantcast-Measure/Quantcast-iOS-Measurement/QuantcastUtils.h \ No newline at end of file diff --git a/Pods/BuildHeaders/Reachability/Reachability.h b/Pods/BuildHeaders/Reachability/Reachability.h deleted file mode 120000 index d374abf23fdb..000000000000 --- a/Pods/BuildHeaders/Reachability/Reachability.h +++ /dev/null @@ -1 +0,0 @@ -../../Reachability/Reachability.h \ No newline at end of file diff --git a/Pods/BuildHeaders/SFHFKeychainUtils/SFHFKeychainUtils.h b/Pods/BuildHeaders/SFHFKeychainUtils/SFHFKeychainUtils.h deleted file mode 120000 index 04aac0488afd..000000000000 --- a/Pods/BuildHeaders/SFHFKeychainUtils/SFHFKeychainUtils.h +++ /dev/null @@ -1 +0,0 @@ -../../SFHFKeychainUtils/security/SFHFKeychainUtils.h \ No newline at end of file diff --git a/Pods/BuildHeaders/SSKeychain/SSKeychain.h b/Pods/BuildHeaders/SSKeychain/SSKeychain.h deleted file mode 120000 index e29ede6a3147..000000000000 --- a/Pods/BuildHeaders/SSKeychain/SSKeychain.h +++ /dev/null @@ -1 +0,0 @@ -../../SSKeychain/SSKeychain/SSKeychain.h \ No newline at end of file diff --git a/Pods/BuildHeaders/SVProgressHUD/SVProgressHUD.h b/Pods/BuildHeaders/SVProgressHUD/SVProgressHUD.h deleted file mode 120000 index 76a59716466a..000000000000 --- a/Pods/BuildHeaders/SVProgressHUD/SVProgressHUD.h +++ /dev/null @@ -1 +0,0 @@ -../../SVProgressHUD/SVProgressHUD/SVProgressHUD.h \ No newline at end of file diff --git a/Pods/BuildHeaders/UIDeviceIdentifier/UIDeviceHardware.h b/Pods/BuildHeaders/UIDeviceIdentifier/UIDeviceHardware.h deleted file mode 120000 index 4dda44aa2933..000000000000 --- a/Pods/BuildHeaders/UIDeviceIdentifier/UIDeviceHardware.h +++ /dev/null @@ -1 +0,0 @@ -../../UIDeviceIdentifier/UIDeviceIdentifier/UIDeviceHardware.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPBase64Utils.h b/Pods/BuildHeaders/WPXMLRPC/WPBase64Utils.h deleted file mode 120000 index 5b0741cc9f1d..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPBase64Utils.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPBase64Utils.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPStringUtils.h b/Pods/BuildHeaders/WPXMLRPC/WPStringUtils.h deleted file mode 120000 index 21b3353e915b..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPStringUtils.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPStringUtils.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPC.h b/Pods/BuildHeaders/WPXMLRPC/WPXMLRPC.h deleted file mode 120000 index 038bb9420301..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPC.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPXMLRPC.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDataCleaner.h b/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDataCleaner.h deleted file mode 120000 index e43e609423e0..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDataCleaner.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPXMLRPCDataCleaner.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoder.h b/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoder.h deleted file mode 120000 index 5a1d3e4f31fd..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoder.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPXMLRPCDecoder.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoderDelegate.h b/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoderDelegate.h deleted file mode 120000 index 2adf1411dd22..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCDecoderDelegate.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPXMLRPCDecoderDelegate.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCEncoder.h b/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCEncoder.h deleted file mode 120000 index d89c50b124e3..000000000000 --- a/Pods/BuildHeaders/WPXMLRPC/WPXMLRPCEncoder.h +++ /dev/null @@ -1 +0,0 @@ -../../wpxmlrpc/WPXMLRPC/WPXMLRPCEncoder.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPComOAuthController.h b/Pods/BuildHeaders/WordPressApi/WPComOAuthController.h deleted file mode 120000 index 1d06e4f807c6..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPComOAuthController.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPComOAuthController.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPHTTPAuthenticationAlertView.h b/Pods/BuildHeaders/WordPressApi/WPHTTPAuthenticationAlertView.h deleted file mode 120000 index aa0c5bfea935..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPHTTPAuthenticationAlertView.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPHTTPAuthenticationAlertView.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPRSDParser.h b/Pods/BuildHeaders/WordPressApi/WPRSDParser.h deleted file mode 120000 index d3d345930b8e..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPRSDParser.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPRSDParser.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPXMLRPCClient.h b/Pods/BuildHeaders/WordPressApi/WPXMLRPCClient.h deleted file mode 120000 index 3b727c885ab7..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPXMLRPCClient.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPXMLRPCClient.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequest.h b/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequest.h deleted file mode 120000 index 37679125a2f4..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequest.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPXMLRPCRequest.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequestOperation.h b/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequestOperation.h deleted file mode 120000 index 7b7755934161..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WPXMLRPCRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WPXMLRPCRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WordPressApi.h b/Pods/BuildHeaders/WordPressApi/WordPressApi.h deleted file mode 120000 index 8872ca53bf62..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WordPressApi.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WordPressApi.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WordPressBaseApi.h b/Pods/BuildHeaders/WordPressApi/WordPressBaseApi.h deleted file mode 120000 index 00244ed9e9af..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WordPressBaseApi.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WordPressBaseApi.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WordPressRestApi.h b/Pods/BuildHeaders/WordPressApi/WordPressRestApi.h deleted file mode 120000 index e9d5df631d24..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WordPressRestApi.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WordPressRestApi.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WordPressRestApiJSONRequestOperation.h b/Pods/BuildHeaders/WordPressApi/WordPressRestApiJSONRequestOperation.h deleted file mode 120000 index 216077903c51..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WordPressRestApiJSONRequestOperation.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WordPressRestApiJSONRequestOperation.h \ No newline at end of file diff --git a/Pods/BuildHeaders/WordPressApi/WordPressXMLRPCApi.h b/Pods/BuildHeaders/WordPressApi/WordPressXMLRPCApi.h deleted file mode 120000 index 06ee7fd04b5c..000000000000 --- a/Pods/BuildHeaders/WordPressApi/WordPressXMLRPCApi.h +++ /dev/null @@ -1 +0,0 @@ -../../WordPressApi/WordPressApi/WordPressXMLRPCApi.h \ No newline at end of file diff --git a/Pods/CTidy/CTidy/CTidy.h b/Pods/CTidy/CTidy/CTidy.h deleted file mode 100644 index 811611997cf3..000000000000 --- a/Pods/CTidy/CTidy/CTidy.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// CTidy.h -// TouchCode -// -// Created by Jonathan Wight on 03/07/08. -// Copyright 2011 toxicsoftware.com. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY TOXICSOFTWARE.COM ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TOXICSOFTWARE.COM OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of toxicsoftware.com. - -#import - -#include "tidy.h" -#include "buffio.h" - -typedef enum { - CTidyFormatHTML, - CTidyFormatXML, - CTidyFormatXHTML, -} CTidyFormat; - -@interface CTidy : NSObject { -} - -+ (CTidy *)tidy; - -- (NSData *)tidyData:(NSData *)inData inputFormat:(CTidyFormat)inInputFormat outputFormat:(CTidyFormat)inOutputFormat encoding:(NSString*)inEncoding diagnostics:(NSString **)outDiagnostics error:(NSError **)outError; - -- (NSString *)tidyString:(NSString *)inString inputFormat:(CTidyFormat)inInputFormat outputFormat:(CTidyFormat)inOutputFormat encoding:(NSString*)inEncoding diagnostics:(NSString **)outDiagnostics error:(NSError **)outError; - -- (NSString *)tidyHTMLString:(NSString *)inString encoding:(NSString*)inEncoding error:(NSError **)outError; -@end - diff --git a/Pods/CTidy/CTidy/CTidy.m b/Pods/CTidy/CTidy/CTidy.m deleted file mode 100644 index 8fe407de5a7f..000000000000 --- a/Pods/CTidy/CTidy/CTidy.m +++ /dev/null @@ -1,240 +0,0 @@ -// -// CTidy.m -// TouchCode -// -// Created by Jonathan Wight on 03/07/08. -// Copyright 2011 toxicsoftware.com. All rights reserved. -// -// Redistribution and use in source and binary forms, with or without modification, are -// permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this list of -// conditions and the following disclaimer. -// -// 2. Redistributions in binary form must reproduce the above copyright notice, this list -// of conditions and the following disclaimer in the documentation and/or other materials -// provided with the distribution. -// -// THIS SOFTWARE IS PROVIDED BY TOXICSOFTWARE.COM ``AS IS'' AND ANY EXPRESS OR IMPLIED -// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TOXICSOFTWARE.COM OR -// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// The views and conclusions contained in the software and documentation are those of the -// authors and should not be interpreted as representing official policies, either expressed -// or implied, of toxicsoftware.com. - -#import "CTidy.h" - -@interface CTidy () -@end - -#pragma mark - - -@implementation CTidy - -+ (CTidy *)tidy -{ - return([[self alloc] init]); -} - -- (NSData *)tidyData:(NSData *)inData inputFormat:(CTidyFormat)inInputFormat outputFormat:(CTidyFormat)inOutputFormat encoding:(NSString*)inEncoding diagnostics:(NSString **)outDiagnostics error:(NSError **)outError -{ - TidyDoc theTidyDocument = ig_tidyCreate(); - - int theResultCode = 0; - - // Set input format if input is XML (xhtml & html are the tidy 'default') - if (inInputFormat == CTidyFormatXML) - { - theResultCode = ig_tidyOptSetBool(theTidyDocument, TidyXmlTags, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - } - - // Set output format - TidyOptionId theOutputValue = TidyXmlOut; - if (inOutputFormat == CTidyFormatHTML) - theOutputValue = TidyHtmlOut; - else if (inOutputFormat == CTidyFormatXHTML) - theOutputValue = TidyXhtmlOut; - theResultCode = ig_tidyOptSetBool(theTidyDocument, theOutputValue, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - - // Force output even if errors found - theResultCode = ig_tidyOptSetBool(theTidyDocument, TidyForceOutput, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - - // Don't wrap long lines - theResultCode = ig_tidyOptSetInt(theTidyDocument, TidyWrapLen, 0); - NSAssert(theResultCode >= 0, @"tidyOptSetInt() should return 0"); - - // Set encoding - same for input and output - theResultCode = ig_tidySetInCharEncoding(theTidyDocument, inEncoding.UTF8String); - NSAssert(theResultCode >= 0, @"tidySetInCharEncoding() should return 0"); - theResultCode = ig_tidySetOutCharEncoding(theTidyDocument, inEncoding.UTF8String); - NSAssert(theResultCode >= 0, @"tidySetOutCharEncoding() should return 0"); - - // Create an error buffer - TidyBuffer theErrorBuffer; - ig_tidyBufInit(&theErrorBuffer); - theResultCode = ig_tidySetErrorBuffer(theTidyDocument, &theErrorBuffer); - NSAssert(theResultCode >= 0, @"tidySetErrorBuffer() should return 0"); - - // ############################################################################# - - // Create an input buffer and copy input to it (TODO uses 2X memory == bad!) - TidyBuffer theInputBuffer; - ig_tidyBufAlloc(&theInputBuffer, [inData length]); - memcpy(theInputBuffer.bp, [inData bytes], [inData length]); - theInputBuffer.size = [inData length]; - - // Parse the data. - theResultCode = ig_tidyParseBuffer(theTidyDocument, &theInputBuffer); - if (theResultCode < 0) - { - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String:(char *)theErrorBuffer.bp], NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:@"TODO_DOMAIN" code:theResultCode userInfo:theUserInfo]; - } - return(NULL); - } - - // Clean up input buffer. - ig_tidyBufFree(&theInputBuffer); - - // Repair the data - theResultCode = ig_tidyCleanAndRepair(theTidyDocument); - if (theResultCode < 0) - { - return(NULL); - } - - //theResultCode = tidyRunDiagnostics(theTidyDocument); - - // - TidyBuffer theOutputBuffer; - ig_tidyBufInit(&theOutputBuffer); - theResultCode = ig_tidySaveBuffer(theTidyDocument, &theOutputBuffer); - if (theResultCode < 0) - return(NULL); - NSAssert(theOutputBuffer.bp != NULL, @"The buffer should not be null."); - NSData *theOutput = [NSData dataWithBytes:theOutputBuffer.bp length:theOutputBuffer.size]; - ig_tidyBufFree(&theOutputBuffer); - - // - if (outDiagnostics && theErrorBuffer.bp != NULL) - { - NSData *theErrorData = [NSData dataWithBytes:theErrorBuffer.bp length:theErrorBuffer.size]; - *outDiagnostics = [[NSString alloc] initWithData:theErrorData encoding:NSUTF8StringEncoding]; - } - ig_tidyBufFree(&theErrorBuffer); - - // ############################################################################# - - ig_tidyRelease(theTidyDocument); - - return(theOutput); -} - -- (NSString *)tidyString:(NSString *)inString inputFormat:(CTidyFormat)inInputFormat outputFormat:(CTidyFormat)inOutputFormat encoding:(NSString*)inEncoding diagnostics:(NSString **)outDiagnostics error:(NSError **)outError -{ - TidyDoc theTidyDocument = ig_tidyCreate(); - - int theResultCode = 0; - - // Set input format if input is XML (xhtml & html are the tidy 'default') - if (inInputFormat == CTidyFormatXML) - { - theResultCode = ig_tidyOptSetBool(theTidyDocument, TidyXmlTags, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - } - - // Set output format - TidyOptionId theOutputValue = TidyXmlOut; - if (inOutputFormat == CTidyFormatHTML) - theOutputValue = TidyHtmlOut; - else if (inOutputFormat == CTidyFormatXHTML) - theOutputValue = TidyXhtmlOut; - theResultCode = ig_tidyOptSetBool(theTidyDocument, theOutputValue, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - - // Force output even if errors found - theResultCode = ig_tidyOptSetBool(theTidyDocument, TidyForceOutput, YES); - NSAssert(theResultCode >= 0, @"tidyOptSetBool() should return 0"); - - // Set encoding - same for input and output - theResultCode = ig_tidySetInCharEncoding(theTidyDocument, inEncoding.UTF8String); - NSAssert(theResultCode >= 0, @"tidySetInCharEncoding() should return 0"); - theResultCode = ig_tidySetOutCharEncoding(theTidyDocument, inEncoding.UTF8String); - NSAssert(theResultCode >= 0, @"tidySetOutCharEncoding() should return 0"); - - // Create an error buffer - TidyBuffer theErrorBuffer; - ig_tidyBufInit(&theErrorBuffer); - theResultCode = ig_tidySetErrorBuffer(theTidyDocument, &theErrorBuffer); - NSAssert(theResultCode >= 0, @"tidySetErrorBuffer() should return 0"); - - // ############################################################################# - - // Parse the data. - theResultCode = ig_tidyParseString(theTidyDocument, [inString UTF8String]); - if (theResultCode < 0) - { - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - [NSString stringWithUTF8String:(char *)theErrorBuffer.bp], NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:@"TODO_DOMAIN" code:theResultCode userInfo:theUserInfo]; - } - return(NULL); - } - - // Repair the data - theResultCode = ig_tidyCleanAndRepair(theTidyDocument); - if (theResultCode < 0) - { - return(NULL); - } - - //theResultCode = tidyRunDiagnostics(theTidyDocument); - - // - uint theBufferLength = 0; - - theResultCode = ig_tidySaveString(theTidyDocument, NULL, &theBufferLength); - - NSMutableData *theOutputBuffer = [NSMutableData dataWithLength:theBufferLength]; - - theResultCode = ig_tidySaveString(theTidyDocument, [theOutputBuffer mutableBytes], &theBufferLength); - - NSString *theString = [[NSString alloc] initWithData:theOutputBuffer encoding:NSUTF8StringEncoding]; - - // - if (outDiagnostics && theErrorBuffer.bp != NULL) - { - NSData *theErrorData = [NSData dataWithBytes:theErrorBuffer.bp length:theErrorBuffer.size]; - *outDiagnostics = [[NSString alloc] initWithData:theErrorData encoding:NSUTF8StringEncoding]; - } - ig_tidyBufFree(&theErrorBuffer); - - // ############################################################################# - - ig_tidyRelease(theTidyDocument); - - return(theString); -} - -- (NSString *)tidyHTMLString:(NSString *)inString encoding:(NSString*)inEncoding error:(NSError **)outError { - return [self tidyString:inString inputFormat:CTidyFormatHTML outputFormat:CTidyFormatXHTML encoding:inEncoding diagnostics:nil error:outError]; -} - -@end diff --git a/Pods/CTidy/LICENSE b/Pods/CTidy/LICENSE deleted file mode 100644 index be2bbd22c8a3..000000000000 --- a/Pods/CTidy/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2012, Francis Chong. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project. \ No newline at end of file diff --git a/Pods/CTidy/README.md b/Pods/CTidy/README.md deleted file mode 100644 index 1864e5a59efd..000000000000 --- a/Pods/CTidy/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# CTidy - -Standalone CTidy library extracted from [TouchXML](https://github.com/TouchCode/TouchXML) - -## Usage - -Convert HTML data to valid XHTML: - -````objc -NSString* html = @"

Hello

"; -NSString* xhtml = [[CTidy tidy] tidyHTMLString:html - encoding:@"UTF8" - error:&error]; -NSLog(@"%@", xhtml); -```` - -Output: - -````html - - - - - - - -
-
-

Hello

- - -```` - -## RubyMotion - -To use CTidy in RubyMotion, install following gem: - - gem install motion-tidy - -Add following to your Rakefile: - -```ruby -$:.unshift("/Library/RubyMotion/lib") -require 'motion/project' -require 'motion-cocoapods' -require 'motion-tidy' - -Motion::Project::App.setup do |app| - app.name = 'sample' - - # Only needed if you have not already specifying a pods dependency - app.pods do - pod 'CTidy', '>= 0.2.0' - end -end -``` - - -## Credit - -Based on [TouchXML](https://github.com/TouchCode/TouchXML) - -## License - -This code is licensed under the 2-clause BSD license ("Simplified BSD License" or "FreeBSD License") license. - diff --git a/Pods/CTidy/libtidy/include/buffio.h b/Pods/CTidy/libtidy/include/buffio.h deleted file mode 100644 index 944284ed4f4d..000000000000 --- a/Pods/CTidy/libtidy/include/buffio.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef __TIDY_BUFFIO_H__ -#define __TIDY_BUFFIO_H__ - -/** @file buffio.h - Treat buffer as an I/O stream. - - (c) 1998-2007 (W3C) MIT, ERCIM, Keio University - See tidy.h for the copyright notice. - - CVS Info : - - $Author: arnaud02 $ - $Date: 2007/01/23 11:17:45 $ - $Revision: 1.9 $ - - Requires buffer to automatically grow as bytes are added. - Must keep track of current read and write points. - -*/ - -#include "platform.h" -#include "tidy.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** TidyBuffer - A chunk of memory */ -TIDY_STRUCT -struct _TidyBuffer -{ - TidyAllocator* allocator; /**< Memory allocator */ - byte* bp; /**< Pointer to bytes */ - uint size; /**< # bytes currently in use */ - uint allocated; /**< # bytes allocated */ - uint next; /**< Offset of current input position */ -}; - -/** Initialize data structure using the default allocator */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufInit( TidyBuffer* buf ); - -/** Initialize data structure using the given custom allocator */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufInitWithAllocator( TidyBuffer* buf, TidyAllocator* allocator ); - -/** Free current buffer, allocate given amount, reset input pointer, - use the default allocator */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufAlloc( TidyBuffer* buf, uint allocSize ); - -/** Free current buffer, allocate given amount, reset input pointer, - use the given custom allocator */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufAllocWithAllocator( TidyBuffer* buf, - TidyAllocator* allocator, - uint allocSize ); - -/** Expand buffer to given size. -** Chunk size is minimum growth. Pass 0 for default of 256 bytes. -*/ -TIDY_EXPORT void TIDY_CALL ig_tidyBufCheckAlloc( TidyBuffer* buf, - uint allocSize, uint chunkSize ); - -/** Free current contents and zero out */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufFree( TidyBuffer* buf ); - -/** Set buffer bytes to 0 */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufClear( TidyBuffer* buf ); - -/** Attach to existing buffer */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufAttach( TidyBuffer* buf, byte* bp, uint size ); - -/** Detach from buffer. Caller must free. */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufDetach( TidyBuffer* buf ); - - -/** Append bytes to buffer. Expand if necessary. */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufAppend( TidyBuffer* buf, void* vp, uint size ); - -/** Append one byte to buffer. Expand if necessary. */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufPutByte( TidyBuffer* buf, byte bv ); - -/** Get byte from end of buffer */ -TIDY_EXPORT int TIDY_CALL ig_tidyBufPopByte( TidyBuffer* buf ); - - -/** Get byte from front of buffer. Increment input offset. */ -TIDY_EXPORT int TIDY_CALL ig_tidyBufGetByte( TidyBuffer* buf ); - -/** At end of buffer? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyBufEndOfInput( TidyBuffer* buf ); - -/** Put a byte back into the buffer. Decrement input offset. */ -TIDY_EXPORT void TIDY_CALL ig_tidyBufUngetByte( TidyBuffer* buf, byte bv ); - - -/************** - TIDY -**************/ - -/* Forward declarations -*/ - -/** Initialize a buffer input source */ -TIDY_EXPORT void TIDY_CALL ig_tidyInitInputBuffer( TidyInputSource* inp, TidyBuffer* buf ); - -/** Initialize a buffer output sink */ -TIDY_EXPORT void TIDY_CALL ig_tidyInitOutputBuffer( TidyOutputSink* outp, TidyBuffer* buf ); - -#ifdef __cplusplus -} -#endif -#endif /* __TIDY_BUFFIO_H__ */ - -/* - * local variables: - * mode: c - * indent-tabs-mode: nil - * c-basic-offset: 4 - * eval: (c-set-offset 'substatement-open 0) - * end: - */ diff --git a/Pods/CTidy/libtidy/include/platform.h b/Pods/CTidy/libtidy/include/platform.h deleted file mode 100644 index c30946b32b19..000000000000 --- a/Pods/CTidy/libtidy/include/platform.h +++ /dev/null @@ -1,636 +0,0 @@ -#ifndef __TIDY_PLATFORM_H__ -#define __TIDY_PLATFORM_H__ - -/* platform.h -- Platform specifics - - (c) 1998-2008 (W3C) MIT, ERCIM, Keio University - See tidy.h for the copyright notice. - - CVS Info : - - $Author: arnaud02 $ - $Date: 2008/03/17 12:57:01 $ - $Revision: 1.66 $ - -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - Uncomment and edit one of the following #defines if you - want to specify the config file at compile-time. -*/ - -/* #define TIDY_CONFIG_FILE "/etc/tidy_config.txt" */ /* original */ -/* #define TIDY_CONFIG_FILE "/etc/tidyrc" */ -/* #define TIDY_CONFIG_FILE "/etc/tidy.conf" */ - -/* - Uncomment the following #define if you are on a system - supporting the HOME environment variable. - It enables tidy to find config files named ~/.tidyrc if - the HTML_TIDY environment variable is not set. -*/ -/* #define TIDY_USER_CONFIG_FILE "~/.tidyrc" */ - -/* - Uncomment the following #define if your - system supports the call getpwnam(). - E.g. Unix and Linux. - - It enables tidy to find files named - ~your/foo for use in the HTML_TIDY environment - variable or CONFIG_FILE or USER_CONFIGFILE or - on the command line: -config ~joebob/tidy.cfg - - Contributed by Todd Lewis. -*/ - -/* #define SUPPORT_GETPWNAM */ - - -/* Enable/disable support for Big5 and Shift_JIS character encodings */ -#ifndef SUPPORT_ASIAN_ENCODINGS -#define SUPPORT_ASIAN_ENCODINGS 1 -#endif - -/* Enable/disable support for UTF-16 character encodings */ -#ifndef SUPPORT_UTF16_ENCODINGS -#define SUPPORT_UTF16_ENCODINGS 1 -#endif - -/* Enable/disable support for additional accessibility checks */ -#ifndef SUPPORT_ACCESSIBILITY_CHECKS -#define SUPPORT_ACCESSIBILITY_CHECKS 1 -#endif - - -/* Convenience defines for Mac platforms */ - -#if defined(macintosh) -/* Mac OS 6.x/7.x/8.x/9.x, with or without CarbonLib - MPW or Metrowerks 68K/PPC compilers */ -#define MAC_OS_CLASSIC -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Mac OS" -#endif - -/* needed for access() */ -#if !defined(_POSIX) && !defined(NO_ACCESS_SUPPORT) -#define NO_ACCESS_SUPPORT -#endif - -#ifdef SUPPORT_GETPWNAM -#undef SUPPORT_GETPWNAM -#endif - -#elif defined(__APPLE__) && defined(__MACH__) -/* Mac OS X (client) 10.x (or server 1.x/10.x) - gcc or Metrowerks MachO compilers */ -#define MAC_OS_X -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Mac OS X" -#endif -#endif - -#if defined(MAC_OS_CLASSIC) || defined(MAC_OS_X) -/* Any OS on Mac platform */ -#define MAC_OS -#define FILENAMES_CASE_SENSITIVE 0 -#define strcasecmp strcmp -#ifndef DFLT_REPL_CHARENC -#define DFLT_REPL_CHARENC MACROMAN -#endif -#endif - -/* Convenience defines for BSD like platforms */ - -#if defined(__FreeBSD__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "FreeBSD" -#endif - -#elif defined(__NetBSD__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "NetBSD" -#endif - -#elif defined(__OpenBSD__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "OpenBSD" -#endif - -#elif defined(__DragonFly__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "DragonFly" -#endif - -#elif defined(__MINT__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "FreeMiNT" -#endif - -#elif defined(__bsdi__) -#define BSD_BASED_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "BSD/OS" -#endif - -#endif - -/* Convenience defines for Windows platforms */ - -#if defined(WINDOWS) || defined(_WIN32) - -#define WINDOWS_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Windows" -#endif - -#if defined(__MWERKS__) || defined(__MSL__) -/* not available with Metrowerks Standard Library */ - -#ifdef SUPPORT_GETPWNAM -#undef SUPPORT_GETPWNAM -#endif - -/* needed for setmode() */ -#if !defined(NO_SETMODE_SUPPORT) -#define NO_SETMODE_SUPPORT -#endif - -#define strcasecmp _stricmp - -#endif - -#if defined(__BORLANDC__) -#define strcasecmp stricmp -#endif - -#define FILENAMES_CASE_SENSITIVE 0 -#define SUPPORT_POSIX_MAPPED_FILES 0 - -#endif - -/* Convenience defines for Linux platforms */ - -#if defined(linux) && defined(__alpha__) -/* Linux on Alpha - gcc compiler */ -#define LINUX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Linux/Alpha" -#endif - -#elif defined(linux) && defined(__sparc__) -/* Linux on Sparc - gcc compiler */ -#define LINUX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Linux/Sparc" -#endif - -#elif defined(linux) && (defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__)) -/* Linux on x86 - gcc compiler */ -#define LINUX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Linux/x86" -#endif - -#elif defined(linux) && defined(__powerpc__) -/* Linux on PPC - gcc compiler */ -#define LINUX_OS - -#if defined(__linux__) && defined(__powerpc__) - -/* #if #system(linux) */ -/* MkLinux on PPC - gcc (egcs) compiler */ -/* #define MAC_OS_MKLINUX */ -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "MkLinux" -#endif - -#else - -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Linux/PPC" -#endif - -#endif - -#elif defined(linux) || defined(__linux__) -/* generic Linux */ -#define LINUX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Linux" -#endif - -#endif - -/* Convenience defines for Solaris platforms */ - -#if defined(sun) -#define SOLARIS_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Solaris" -#endif -#endif - -/* Convenience defines for HPUX + gcc platforms */ - -#if defined(__hpux) -#define HPUX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "HPUX" -#endif -#endif - -/* Convenience defines for RISCOS + gcc platforms */ - -#if defined(__riscos__) -#define RISC_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "RISC OS" -#endif -#endif - -/* Convenience defines for OS/2 + icc/gcc platforms */ - -#if defined(__OS2__) || defined(__EMX__) -#define OS2_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "OS/2" -#endif -#define FILENAMES_CASE_SENSITIVE 0 -#define strcasecmp stricmp -#endif - -/* Convenience defines for IRIX */ - -#if defined(__sgi) -#define IRIX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "SGI IRIX" -#endif -#endif - -/* Convenience defines for AIX */ - -#if defined(_AIX) -#define AIX_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "IBM AIX" -#endif -#endif - - -/* Convenience defines for BeOS platforms */ - -#if defined(__BEOS__) -#define BE_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "BeOS" -#endif -#endif - -/* Convenience defines for Cygwin platforms */ - -#if defined(__CYGWIN__) -#define CYGWIN_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Cygwin" -#endif -#define FILENAMES_CASE_SENSITIVE 0 -#endif - -/* Convenience defines for OpenVMS */ - -#if defined(__VMS) -#define OPENVMS_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "OpenVMS" -#endif -#define FILENAMES_CASE_SENSITIVE 0 -#endif - -/* Convenience defines for DEC Alpha OSF + gcc platforms */ - -#if defined(__osf__) -#define OSF_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "DEC Alpha OSF" -#endif -#endif - -/* Convenience defines for ARM platforms */ - -#if defined(__arm) -#define ARM_OS - -#if defined(forARM) && defined(__NEWTON_H) - -/* Using Newton C++ Tools ARMCpp compiler */ -#define NEWTON_OS -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "Newton" -#endif - -#else - -#ifndef PLATFORM_NAME -#define PLATFORM_NAME "ARM" -#endif - -#endif - -#endif - -#include -#include -#include /* for longjmp on error exit */ -#include -#include /* may need for Unix V */ -#include -#include - -#ifdef NEEDS_MALLOC_H -#include -#endif - -#ifdef SUPPORT_GETPWNAM -#include -#endif - -#ifdef NEEDS_UNISTD_H -#include /* needed for unlink on some Unix systems */ -#endif - -/* This can be set at compile time. Usually Windows, -** except for Macintosh builds. -*/ -#ifndef DFLT_REPL_CHARENC -#define DFLT_REPL_CHARENC WIN1252 -#endif - -/* By default, use case-sensitive filename comparison. -*/ -#ifndef FILENAMES_CASE_SENSITIVE -#define FILENAMES_CASE_SENSITIVE 1 -#endif - - -/* - Tidy preserves the last modified time for the files it - cleans up. -*/ - -/* - If your platform doesn't support and the - utime() function, or and the futime() - function then set PRESERVE_FILE_TIMES to 0. - - If your platform doesn't support and the - futime() function, then set HAS_FUTIME to 0. - - If your platform supports and the - utime() function requires the file to be - closed first, then set UTIME_NEEDS_CLOSED_FILE to 1. -*/ - -/* Keep old PRESERVEFILETIMES define for compatibility */ -#ifdef PRESERVEFILETIMES -#undef PRESERVE_FILE_TIMES -#define PRESERVE_FILE_TIMES PRESERVEFILETIMES -#endif - -#ifndef PRESERVE_FILE_TIMES -#if defined(RISC_OS) || defined(OPENVMS_OS) || defined(OSF_OS) -#define PRESERVE_FILE_TIMES 0 -#else -#define PRESERVE_FILE_TIMES 1 -#endif -#endif - -#if PRESERVE_FILE_TIMES - -#ifndef HAS_FUTIME -#if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__) -#define HAS_FUTIME 0 -#else -#define HAS_FUTIME 1 -#endif -#endif - -#ifndef UTIME_NEEDS_CLOSED_FILE -#if defined(SOLARIS_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(LINUX_OS) -#define UTIME_NEEDS_CLOSED_FILE 1 -#else -#define UTIME_NEEDS_CLOSED_FILE 0 -#endif -#endif - -#if defined(MAC_OS_X) || (!defined(MAC_OS_CLASSIC) && !defined(__MSL__)) -#include -#include -#else -#include -#endif - -#if HAS_FUTIME -#include -#else -#include -#endif /* HASFUTIME */ - -/* - MS Windows needs _ prefix for Unix file functions. - Not required by Metrowerks Standard Library (MSL). - - Tidy uses following for preserving the last modified time. - - WINDOWS automatically set by Win16 compilers. - _WIN32 automatically set by Win32 compilers. -*/ -#if defined(_WIN32) && !defined(__MSL__) && !defined(__BORLANDC__) - -#define futime _futime -#define fstat _fstat -#define utimbuf _utimbuf /* Windows seems to want utimbuf */ -#define stat _stat -#define utime _utime -#define vsnprintf _vsnprintf -#endif /* _WIN32 */ - -#endif /* PRESERVE_FILE_TIMES */ - -/* - MS Windows needs _ prefix for Unix file functions. - Not required by Metrowerks Standard Library (MSL). - - WINDOWS automatically set by Win16 compilers. - _WIN32 automatically set by Win32 compilers. -*/ -#if defined(_WIN32) && !defined(__MSL__) && !defined(__BORLANDC__) - -#ifndef __WATCOMC__ -#define fileno _fileno -#define setmode _setmode -#endif - -#define access _access -#define strcasecmp _stricmp - -#if _MSC_VER > 1000 -#pragma warning( disable : 4189 ) /* local variable is initialized but not referenced */ -#pragma warning( disable : 4100 ) /* unreferenced formal parameter */ -#pragma warning( disable : 4706 ) /* assignment within conditional expression */ -#endif - -#if _MSC_VER > 1300 -#pragma warning( disable : 4996 ) /* disable depreciation warning */ -#endif - -#endif /* _WIN32 */ - -#if defined(_WIN32) - -#if (defined(_USRDLL) || defined(_WINDLL)) && !defined(TIDY_EXPORT) -#define TIDY_EXPORT __declspec( dllexport ) -#endif - -#ifndef TIDY_CALL -#ifdef _WIN64 -# define TIDY_CALL __fastcall -#else -# define TIDY_CALL __stdcall -#endif -#endif - -#endif /* _WIN32 */ - -/* hack for gnu sys/types.h file which defines uint and ulong */ - -#if defined(BE_OS) || defined(SOLARIS_OS) || defined(BSD_BASED_OS) || defined(OSF_OS) || defined(IRIX_OS) || defined(AIX_OS) -#include -#endif -#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS) -# undef uint -typedef unsigned int uint; -#endif -#if defined(HPUX_OS) || defined(CYGWIN_OS) || defined(MAC_OS) || defined(BSD_BASED_OS) || defined(_WIN32) -# undef ulong -typedef unsigned long ulong; -#endif - -/* -With GCC 4, __attribute__ ((visibility("default"))) can be used along compiling with tidylib -with "-fvisibility=hidden". See http://gcc.gnu.org/wiki/Visibility and build/gmake/Makefile. -*/ -/* -#if defined(__GNUC__) && __GNUC__ >= 4 -#define TIDY_EXPORT __attribute__ ((visibility("default"))) -#endif -*/ - -#ifndef TIDY_EXPORT /* Define it away for most builds */ -#define TIDY_EXPORT -#endif - -#ifndef TIDY_STRUCT -#define TIDY_STRUCT -#endif - -typedef unsigned char byte; - -typedef uint tchar; /* single, full character */ -typedef char tmbchar; /* single, possibly partial character */ -#ifndef TMBSTR_DEFINED -typedef tmbchar* tmbstr; /* pointer to buffer of possibly partial chars */ -typedef const tmbchar* ctmbstr; /* Ditto, but const */ -#define NULLSTR (tmbstr)"" -#define TMBSTR_DEFINED -#endif - -#ifndef TIDY_CALL -#define TIDY_CALL -#endif - -#if defined(__GNUC__) || defined(__INTEL_COMPILER) -# define ARG_UNUSED(x) x __attribute__((unused)) -#else -# define ARG_UNUSED(x) x -#endif - -/* HAS_VSNPRINTF triggers the use of "vsnprintf", which is safe related to - buffer overflow. Therefore, we make it the default unless HAS_VSNPRINTF - has been defined. */ -#ifndef HAS_VSNPRINTF -# define HAS_VSNPRINTF 1 -#endif - -#ifndef SUPPORT_POSIX_MAPPED_FILES -# define SUPPORT_POSIX_MAPPED_FILES 1 -#endif - -/* - bool is a reserved word in some but - not all C++ compilers depending on age - work around is to avoid bool altogether - by introducing a new enum called Bool -*/ -/* We could use the C99 definition where supported -typedef _Bool Bool; -#define no (_Bool)0 -#define yes (_Bool)1 -*/ -typedef enum -{ - no, - yes -} Bool; - -/* for NULL pointers -#define null ((const void*)0) -extern void* null; -*/ - -#if defined(DMALLOC) -#include "dmalloc.h" -#endif - -/* Opaque data structure. -* Cast to implementation type struct within lib. -* This will reduce inter-dependencies/conflicts w/ application code. -*/ -#if 1 -#define opaque_type( typenam )\ -struct _##typenam { int _opaque; };\ -typedef struct _##typenam const * typenam -#else -#define opaque_type(typenam) typedef const void* typenam -#endif - -/* Opaque data structure used to pass back -** and forth to keep current position in a -** list or other collection. -*/ -opaque_type( TidyIterator ); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __TIDY_PLATFORM_H__ */ - - -/* - * local variables: - * mode: c - * indent-tabs-mode: nil - * c-basic-offset: 4 - * eval: (c-set-offset 'substatement-open 0) - * end: - */ diff --git a/Pods/CTidy/libtidy/include/tidy.h b/Pods/CTidy/libtidy/include/tidy.h deleted file mode 100644 index 589cb11706c6..000000000000 --- a/Pods/CTidy/libtidy/include/tidy.h +++ /dev/null @@ -1,1097 +0,0 @@ -#ifndef __TIDY_H__ -#define __TIDY_H__ - -/** @file tidy.h - Defines HTML Tidy API implemented by tidy library. - - Public interface is const-correct and doesn't explicitly depend - on any globals. Thus, thread-safety may be introduced w/out - changing the interface. - - Looking ahead to a C++ wrapper, C functions always pass - this-equivalent as 1st arg. - - - Copyright (c) 1998-2008 World Wide Web Consortium - (Massachusetts Institute of Technology, European Research - Consortium for Informatics and Mathematics, Keio University). - All Rights Reserved. - - CVS Info : - - $Author: arnaud02 $ - $Date: 2008/04/22 11:00:42 $ - $Revision: 1.22 $ - - Contributing Author(s): - - Dave Raggett - - The contributing author(s) would like to thank all those who - helped with testing, bug fixes and suggestions for improvements. - This wouldn't have been possible without your help. - - COPYRIGHT NOTICE: - - This software and documentation is provided "as is," and - the copyright holders and contributing author(s) make no - representations or warranties, express or implied, including - but not limited to, warranties of merchantability or fitness - for any particular purpose or that the use of the software or - documentation will not infringe any third party patents, - copyrights, trademarks or other rights. - - The copyright holders and contributing author(s) will not be held - liable for any direct, indirect, special or consequential damages - arising out of any use of the software or documentation, even if - advised of the possibility of such damage. - - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, documentation and executables, - for any purpose, without fee, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - 2. Altered versions must be plainly marked as such and must - not be misrepresented as being the original source. - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - The copyright holders and contributing author(s) specifically - permit, without fee, and encourage the use of this source code - as a component for supporting the Hypertext Markup Language in - commercial products. If you use this source code in a product, - acknowledgment is not required but would be appreciated. - - - Created 2001-05-20 by Charles Reitzel - Updated 2002-07-01 by Charles Reitzel - 1st Implementation - -*/ - -#include "platform.h" -#include "tidyenum.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** @defgroup Opaque Opaque Types -** -** Cast to implementation types within lib. -** Reduces inter-dependencies/conflicts w/ application code. -** @{ -*/ - -/** @struct TidyDoc -** Opaque document datatype -*/ -opaque_type( TidyDoc ); - -/** @struct TidyOption -** Opaque option datatype -*/ -opaque_type( TidyOption ); - -/** @struct TidyNode -** Opaque node datatype -*/ -opaque_type( TidyNode ); - -/** @struct TidyAttr -** Opaque attribute datatype -*/ -opaque_type( TidyAttr ); - -/** @} end Opaque group */ - -TIDY_STRUCT struct _TidyBuffer; -typedef struct _TidyBuffer TidyBuffer; - - -/** @defgroup Memory Memory Allocation -** -** Tidy uses a user provided allocator for all -** memory allocations. If this allocator is -** not provided, then a default allocator is -** used which simply wraps standard C malloc/free -** calls. These wrappers call the panic function -** upon any failure. The default panic function -** prints an out of memory message to stderr, and -** calls exit(2). -** -** For applications in which it is unacceptable to -** abort in the case of memory allocation, then the -** panic function can be replaced with one which -** longjmps() out of the tidy code. For this to -** clean up completely, you should be careful not -** to use any tidy methods that open files as these -** will not be closed before panic() is called. -** -** TODO: associate file handles with tidyDoc and -** ensure that tidyDocRelease() can close them all. -** -** Calling the withAllocator() family ( -** tidyCreateWithAllocator, tidyBufInitWithAllocator, -** tidyBufAllocWithAllocator) allow settings custom -** allocators). -** -** All parts of the document use the same allocator. -** Calls that require a user provided buffer can -** optionally use a different allocator. -** -** For reference in designing a plug-in allocator, -** most allocations made by tidy are less than 100 -** bytes, corresponding to attribute names/values, etc. -** -** There is also an additional class of much larger -** allocations which are where most of the data from -** the lexer is stored. (It is not currently possible -** to use a separate allocator for the lexer, this -** would be a useful extension). -** -** In general, approximately 1/3rd of the memory -** used by tidy is freed during the parse, so if -** memory usage is an issue then an allocator that -** can reuse this memory is a good idea. -** -** @{ -*/ - -/** Prototype for the allocator's function table */ -struct _TidyAllocatorVtbl; -/** The allocators function table */ -typedef struct _TidyAllocatorVtbl TidyAllocatorVtbl; - -/** Prototype for the allocator */ -struct _TidyAllocator; -/** The allocator **/ -typedef struct _TidyAllocator TidyAllocator; - -/** An allocator's function table. All functions here must - be provided. - */ -struct _TidyAllocatorVtbl { - /** Called to allocate a block of nBytes of memory */ - void* (TIDY_CALL *alloc)( TidyAllocator *self, size_t nBytes ); - /** Called to resize (grow, in general) a block of memory. - Must support being called with NULL. - */ - void* (TIDY_CALL *realloc)( TidyAllocator *self, void *block, size_t nBytes ); - /** Called to free a previously allocated block of memory */ - void (TIDY_CALL *free)( TidyAllocator *self, void *block); - /** Called when a panic condition is detected. Must support - block == NULL. This function is not called if either alloc - or realloc fails; it is up to the allocator to do this. - Currently this function can only be called if an error is - detected in the tree integrity via the internal function - CheckNodeIntegrity(). This is a situation that can - only arise in the case of a programming error in tidylib. - You can turn off node integrity checking by defining - the constant NO_NODE_INTEGRITY_CHECK during the build. - **/ - void (TIDY_CALL *panic)( TidyAllocator *self, ctmbstr msg ); -}; - -/** An allocator. To create your own allocator, do something like - the following: - - typedef struct _MyAllocator { - TidyAllocator base; - ...other custom allocator state... - } MyAllocator; - - void* MyAllocator_alloc(TidyAllocator *base, void *block, size_t nBytes) - { - MyAllocator *self = (MyAllocator*)base; - ... - } - (etc) - - static const TidyAllocatorVtbl MyAllocatorVtbl = { - MyAllocator_alloc, - MyAllocator_realloc, - MyAllocator_free, - MyAllocator_panic - }; - - myAllocator allocator; - TidyDoc doc; - - allocator.base.vtbl = &MyAllocatorVtbl; - ...initialise allocator specific state... - doc = tidyCreateWithAllocator(&allocator); - ... - - Although this looks slightly long winded, the advantage is that to create - a custom allocator you simply need to set the vtbl pointer correctly. - The vtbl itself can reside in static/global data, and hence does not - need to be initialised each time an allocator is created, and furthermore - the memory is shared amongst all created allocators. -*/ -struct _TidyAllocator { - const TidyAllocatorVtbl *vtbl; -}; - -/** Callback for "malloc" replacement */ -typedef void* (TIDY_CALL *TidyMalloc)( size_t len ); -/** Callback for "realloc" replacement */ -typedef void* (TIDY_CALL *TidyRealloc)( void* buf, size_t len ); -/** Callback for "free" replacement */ -typedef void (TIDY_CALL *TidyFree)( void* buf ); -/** Callback for "out of memory" panic state */ -typedef void (TIDY_CALL *TidyPanic)( ctmbstr mssg ); - - -/** Give Tidy a malloc() replacement */ -TIDY_EXPORT Bool TIDY_CALL ig_tidySetMallocCall( TidyMalloc fmalloc ); -/** Give Tidy a realloc() replacement */ -TIDY_EXPORT Bool TIDY_CALL ig_tidySetReallocCall( TidyRealloc frealloc ); -/** Give Tidy a free() replacement */ -TIDY_EXPORT Bool TIDY_CALL ig_tidySetFreeCall( TidyFree ffree ); -/** Give Tidy an "out of memory" handler */ -TIDY_EXPORT Bool TIDY_CALL ig_tidySetPanicCall( TidyPanic fpanic ); - -/** @} end Memory group */ - -/** @defgroup Basic Basic Operations -** -** Tidy public interface -** -** Several functions return an integer document status: -** -**
-** 0    -> SUCCESS
-** >0   -> 1 == TIDY WARNING, 2 == TIDY ERROR
-** <0   -> SEVERE ERROR
-** 
-** -The following is a short example program. - -
-#include <tidy.h>
-#include <buffio.h>
-#include <stdio.h>
-#include <errno.h>
-
-
-int main(int argc, char **argv )
-{
-  const char* input = "<title>Foo</title><p>Foo!";
-  TidyBuffer output;
-  TidyBuffer errbuf;
-  int rc = -1;
-  Bool ok;
-
-  TidyDoc tdoc = tidyCreate();                     // Initialize "document"
-  tidyBufInit( &output );
-  tidyBufInit( &errbuf );
-  printf( "Tidying:\t\%s\\n", input );
-
-  ok = tidyOptSetBool( tdoc, TidyXhtmlOut, yes );  // Convert to XHTML
-  if ( ok )
-    rc = tidySetErrorBuffer( tdoc, &errbuf );      // Capture diagnostics
-  if ( rc >= 0 )
-    rc = tidyParseString( tdoc, input );           // Parse the input
-  if ( rc >= 0 )
-    rc = tidyCleanAndRepair( tdoc );               // Tidy it up!
-  if ( rc >= 0 )
-    rc = tidyRunDiagnostics( tdoc );               // Kvetch
-  if ( rc > 1 )                                    // If error, force output.
-    rc = ( tidyOptSetBool(tdoc, TidyForceOutput, yes) ? rc : -1 );
-  if ( rc >= 0 )
-    rc = tidySaveBuffer( tdoc, &output );          // Pretty Print
-
-  if ( rc >= 0 )
-  {
-    if ( rc > 0 )
-      printf( "\\nDiagnostics:\\n\\n\%s", errbuf.bp );
-    printf( "\\nAnd here is the result:\\n\\n\%s", output.bp );
-  }
-  else
-    printf( "A severe error (\%d) occurred.\\n", rc );
-
-  tidyBufFree( &output );
-  tidyBufFree( &errbuf );
-  tidyRelease( tdoc );
-  return rc;
-}
-
-** @{ -*/ - -TIDY_EXPORT TidyDoc TIDY_CALL ig_tidyCreate(void); -TIDY_EXPORT TidyDoc TIDY_CALL ig_tidyCreateWithAllocator( TidyAllocator *allocator ); -TIDY_EXPORT void TIDY_CALL ig_tidyRelease( TidyDoc tdoc ); - -/** Let application store a chunk of data w/ each Tidy instance. -** Useful for callbacks. -*/ -TIDY_EXPORT void TIDY_CALL ig_tidySetAppData( TidyDoc tdoc, void* appData ); - -/** Get application data set previously */ -TIDY_EXPORT void* TIDY_CALL ig_tidyGetAppData( TidyDoc tdoc ); - -/** Get release date (version) for current library */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyReleaseDate(void); - -/* Diagnostics and Repair -*/ - -/** Get status of current document. */ -TIDY_EXPORT int TIDY_CALL ig_tidyStatus( TidyDoc tdoc ); - -/** Detected HTML version: 0, 2, 3 or 4 */ -TIDY_EXPORT int TIDY_CALL ig_tidyDetectedHtmlVersion( TidyDoc tdoc ); - -/** Input is XHTML? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyDetectedXhtml( TidyDoc tdoc ); - -/** Input is generic XML (not HTML or XHTML)? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyDetectedGenericXml( TidyDoc tdoc ); - -/** Number of Tidy errors encountered. If > 0, output is suppressed -** unless TidyForceOutput is set. -*/ -TIDY_EXPORT uint TIDY_CALL ig_tidyErrorCount( TidyDoc tdoc ); - -/** Number of Tidy warnings encountered. */ -TIDY_EXPORT uint TIDY_CALL ig_tidyWarningCount( TidyDoc tdoc ); - -/** Number of Tidy accessibility warnings encountered. */ -TIDY_EXPORT uint TIDY_CALL ig_tidyAccessWarningCount( TidyDoc tdoc ); - -/** Number of Tidy configuration errors encountered. */ -TIDY_EXPORT uint TIDY_CALL ig_tidyConfigErrorCount( TidyDoc tdoc ); - -/* Get/Set configuration options -*/ -/** Load an ASCII Tidy configuration file */ -TIDY_EXPORT int TIDY_CALL ig_tidyLoadConfig( TidyDoc tdoc, ctmbstr configFile ); - -/** Load a Tidy configuration file with the specified character encoding */ -TIDY_EXPORT int TIDY_CALL ig_tidyLoadConfigEnc( TidyDoc tdoc, ctmbstr configFile, - ctmbstr charenc ); - -TIDY_EXPORT Bool TIDY_CALL ig_tidyFileExists( TidyDoc tdoc, ctmbstr filename ); - - -/** Set the input/output character encoding for parsing markup. -** Values include: ascii, latin1, raw, utf8, iso2022, mac, -** win1252, utf16le, utf16be, utf16, big5 and shiftjis. Case in-sensitive. -*/ -TIDY_EXPORT int TIDY_CALL ig_tidySetCharEncoding( TidyDoc tdoc, ctmbstr encnam ); - -/** Set the input encoding for parsing markup. -** As for tidySetCharEncoding but only affects the input encoding -**/ -TIDY_EXPORT int TIDY_CALL ig_tidySetInCharEncoding( TidyDoc tdoc, ctmbstr encnam ); - -/** Set the output encoding. -**/ -TIDY_EXPORT int TIDY_CALL ig_tidySetOutCharEncoding( TidyDoc tdoc, ctmbstr encnam ); - -/** @} end Basic group */ - - -/** @defgroup Configuration Configuration Options -** -** Functions for getting and setting Tidy configuration options. -** @{ -*/ - -/** Applications using TidyLib may want to augment command-line and -** configuration file options. Setting this callback allows an application -** developer to examine command-line and configuration file options after -** TidyLib has examined them and failed to recognize them. -**/ - -typedef Bool (TIDY_CALL *TidyOptCallback)( ctmbstr option, ctmbstr value ); - -TIDY_EXPORT Bool TIDY_CALL ig_tidySetOptionCallback( TidyDoc tdoc, TidyOptCallback pOptCallback ); - -/** Get option ID by name */ -TIDY_EXPORT TidyOptionId TIDY_CALL ig_tidyOptGetIdForName( ctmbstr optnam ); - -/** Get iterator for list of option */ -/** -Example: -
-TidyIterator itOpt = tidyGetOptionList( tdoc );
-while ( itOpt )
-{
-  TidyOption opt = tidyGetNextOption( tdoc, &itOpt );
-  .. get/set option values ..
-}
-
-*/ - -TIDY_EXPORT TidyIterator TIDY_CALL ig_tidyGetOptionList( TidyDoc tdoc ); -/** Get next Option */ -TIDY_EXPORT TidyOption TIDY_CALL ig_tidyGetNextOption( TidyDoc tdoc, TidyIterator* pos ); - -/** Lookup option by ID */ -TIDY_EXPORT TidyOption TIDY_CALL ig_tidyGetOption( TidyDoc tdoc, TidyOptionId optId ); -/** Lookup option by name */ -TIDY_EXPORT TidyOption TIDY_CALL ig_tidyGetOptionByName( TidyDoc tdoc, ctmbstr optnam ); - -/** Get ID of given Option */ -TIDY_EXPORT TidyOptionId TIDY_CALL ig_tidyOptGetId( TidyOption opt ); - -/** Get name of given Option */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetName( TidyOption opt ); - -/** Get datatype of given Option */ -TIDY_EXPORT TidyOptionType TIDY_CALL ig_tidyOptGetType( TidyOption opt ); - -/** Is Option read-only? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptIsReadOnly( TidyOption opt ); - -/** Get category of given Option */ -TIDY_EXPORT TidyConfigCategory TIDY_CALL ig_tidyOptGetCategory( TidyOption opt ); - -/** Get default value of given Option as a string */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetDefault( TidyOption opt ); - -/** Get default value of given Option as an unsigned integer */ -TIDY_EXPORT ulong TIDY_CALL ig_tidyOptGetDefaultInt( TidyOption opt ); - -/** Get default value of given Option as a Boolean value */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptGetDefaultBool( TidyOption opt ); - -/** Iterate over Option "pick list" */ -TIDY_EXPORT TidyIterator TIDY_CALL ig_tidyOptGetPickList( TidyOption opt ); -/** Get next string value of Option "pick list" */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetNextPick( TidyOption opt, TidyIterator* pos ); - -/** Get current Option value as a string */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetValue( TidyDoc tdoc, TidyOptionId optId ); -/** Set Option value as a string */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptSetValue( TidyDoc tdoc, TidyOptionId optId, ctmbstr val ); -/** Set named Option value as a string. Good if not sure of type. */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptParseValue( TidyDoc tdoc, ctmbstr optnam, ctmbstr val ); - -/** Get current Option value as an integer */ -TIDY_EXPORT ulong TIDY_CALL ig_tidyOptGetInt( TidyDoc tdoc, TidyOptionId optId ); -/** Set Option value as an integer */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptSetInt( TidyDoc tdoc, TidyOptionId optId, ulong val ); - -/** Get current Option value as a Boolean flag */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptGetBool( TidyDoc tdoc, TidyOptionId optId ); -/** Set Option value as a Boolean flag */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptSetBool( TidyDoc tdoc, TidyOptionId optId, Bool val ); - -/** Reset option to default value by ID */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptResetToDefault( TidyDoc tdoc, TidyOptionId opt ); -/** Reset all options to their default values */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptResetAllToDefault( TidyDoc tdoc ); - -/** Take a snapshot of current config settings */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptSnapshot( TidyDoc tdoc ); -/** Reset config settings to snapshot (after document processing) */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptResetToSnapshot( TidyDoc tdoc ); - -/** Any settings different than default? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptDiffThanDefault( TidyDoc tdoc ); -/** Any settings different than snapshot? */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptDiffThanSnapshot( TidyDoc tdoc ); - -/** Copy current configuration settings from one document to another */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyOptCopyConfig( TidyDoc tdocTo, TidyDoc tdocFrom ); - -/** Get character encoding name. Used with TidyCharEncoding, -** TidyOutCharEncoding, TidyInCharEncoding */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetEncName( TidyDoc tdoc, TidyOptionId optId ); - -/** Get current pick list value for option by ID. Useful for enum types. */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetCurrPick( TidyDoc tdoc, TidyOptionId optId); - -/** Iterate over user declared tags */ -TIDY_EXPORT TidyIterator TIDY_CALL ig_tidyOptGetDeclTagList( TidyDoc tdoc ); -/** Get next declared tag of specified type: TidyInlineTags, TidyBlockTags, -** TidyEmptyTags, TidyPreTags */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetNextDeclTag( TidyDoc tdoc, - TidyOptionId optId, - TidyIterator* iter ); -/** Get option description */ -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyOptGetDoc( TidyDoc tdoc, TidyOption opt ); - -/** Iterate over a list of related options */ -TIDY_EXPORT TidyIterator TIDY_CALL ig_tidyOptGetDocLinksList( TidyDoc tdoc, - TidyOption opt ); -/** Get next related option */ -TIDY_EXPORT TidyOption TIDY_CALL ig_tidyOptGetNextDocLinks( TidyDoc tdoc, - TidyIterator* pos ); - -/** @} end Configuration group */ - -/** @defgroup IO I/O and Messages -** -** By default, Tidy will define, create and use -** instances of input and output handlers for -** standard C buffered I/O (i.e. FILE* stdin, -** FILE* stdout and FILE* stderr for content -** input, content output and diagnostic output, -** respectively. A FILE* cfgFile input handler -** will be used for config files. Command line -** options will just be set directly. -** -** @{ -*/ - -/***************** - Input Source -*****************/ -/** Input Callback: get next byte of input */ -typedef int (TIDY_CALL *TidyGetByteFunc)( void* sourceData ); - -/** Input Callback: unget a byte of input */ -typedef void (TIDY_CALL *TidyUngetByteFunc)( void* sourceData, byte bt ); - -/** Input Callback: is end of input? */ -typedef Bool (TIDY_CALL *TidyEOFFunc)( void* sourceData ); - -/** End of input "character" */ -#define EndOfStream (~0u) - -/** TidyInputSource - Delivers raw bytes of input -*/ -TIDY_STRUCT -typedef struct _TidyInputSource -{ - /* Instance data */ - void* sourceData; /**< Input context. Passed to callbacks */ - - /* Methods */ - TidyGetByteFunc getByte; /**< Pointer to "get byte" callback */ - TidyUngetByteFunc ungetByte; /**< Pointer to "unget" callback */ - TidyEOFFunc eof; /**< Pointer to "eof" callback */ -} TidyInputSource; - -/** Facilitates user defined source by providing -** an entry point to marshal pointers-to-functions. -** Needed by .NET and possibly other language bindings. -*/ -TIDY_EXPORT Bool TIDY_CALL ig_tidyInitSource( TidyInputSource* source, - void* srcData, - TidyGetByteFunc gbFunc, - TidyUngetByteFunc ugbFunc, - TidyEOFFunc endFunc ); - -/** Helper: get next byte from input source */ -TIDY_EXPORT uint TIDY_CALL ig_tidyGetByte( TidyInputSource* source ); - -/** Helper: unget byte back to input source */ -TIDY_EXPORT void TIDY_CALL ig_tidyUngetByte( TidyInputSource* source, uint byteValue ); - -/** Helper: check if input source at end */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyIsEOF( TidyInputSource* source ); - - -/**************** - Output Sink -****************/ -/** Output callback: send a byte to output */ -typedef void (TIDY_CALL *TidyPutByteFunc)( void* sinkData, byte bt ); - - -/** TidyOutputSink - accepts raw bytes of output -*/ -TIDY_STRUCT -typedef struct _TidyOutputSink -{ - /* Instance data */ - void* sinkData; /**< Output context. Passed to callbacks */ - - /* Methods */ - TidyPutByteFunc putByte; /**< Pointer to "put byte" callback */ -} TidyOutputSink; - -/** Facilitates user defined sinks by providing -** an entry point to marshal pointers-to-functions. -** Needed by .NET and possibly other language bindings. -*/ -TIDY_EXPORT Bool TIDY_CALL ig_tidyInitSink( TidyOutputSink* sink, - void* snkData, - TidyPutByteFunc pbFunc ); - -/** Helper: send a byte to output */ -TIDY_EXPORT void TIDY_CALL ig_tidyPutByte( TidyOutputSink* sink, uint byteValue ); - - -/** Callback to filter messages by diagnostic level: -** info, warning, etc. Just set diagnostic output -** handler to redirect all diagnostics output. Return true -** to proceed with output, false to cancel. -*/ -typedef Bool (TIDY_CALL *TidyReportFilter)( TidyDoc tdoc, TidyReportLevel lvl, - uint line, uint col, ctmbstr mssg ); - -/** Give Tidy a filter callback to use */ -TIDY_EXPORT Bool TIDY_CALL ig_tidySetReportFilter( TidyDoc tdoc, - TidyReportFilter filtCallback ); - -/** Set error sink to named file */ -TIDY_EXPORT FILE* TIDY_CALL ig_tidySetErrorFile( TidyDoc tdoc, ctmbstr errfilnam ); -/** Set error sink to given buffer */ -TIDY_EXPORT int TIDY_CALL ig_tidySetErrorBuffer( TidyDoc tdoc, TidyBuffer* errbuf ); -/** Set error sink to given generic sink */ -TIDY_EXPORT int TIDY_CALL ig_tidySetErrorSink( TidyDoc tdoc, TidyOutputSink* sink ); - -/** @} end IO group */ - -/* TODO: Catalog all messages for easy translation -TIDY_EXPORT ctmbstr tidyLookupMessage( int errorNo ); -*/ - - - -/** @defgroup Parse Document Parse -** -** Parse markup from a given input source. String and filename -** functions added for convenience. HTML/XHTML version determined -** from input. -** @{ -*/ - -/** Parse markup in named file */ -TIDY_EXPORT int TIDY_CALL ig_tidyParseFile( TidyDoc tdoc, ctmbstr filename ); - -/** Parse markup from the standard input */ -TIDY_EXPORT int TIDY_CALL ig_tidyParseStdin( TidyDoc tdoc ); - -/** Parse markup in given string */ -TIDY_EXPORT int TIDY_CALL ig_tidyParseString( TidyDoc tdoc, ctmbstr content ); - -/** Parse markup in given buffer */ -TIDY_EXPORT int TIDY_CALL ig_tidyParseBuffer( TidyDoc tdoc, TidyBuffer* buf ); - -/** Parse markup in given generic input source */ -TIDY_EXPORT int TIDY_CALL ig_tidyParseSource( TidyDoc tdoc, TidyInputSource* source); - -/** @} End Parse group */ - - -/** @defgroup Clean Diagnostics and Repair -** -** @{ -*/ -/** Execute configured cleanup and repair operations on parsed markup */ -TIDY_EXPORT int TIDY_CALL ig_tidyCleanAndRepair( TidyDoc tdoc ); - -/** Run configured diagnostics on parsed and repaired markup. -** Must call tidyCleanAndRepair() first. -*/ -TIDY_EXPORT int TIDY_CALL ig_tidyRunDiagnostics( TidyDoc tdoc ); - -/** @} end Clean group */ - - -/** @defgroup Save Document Save Functions -** -** Save currently parsed document to the given output sink. File name -** and string/buffer functions provided for convenience. -** @{ -*/ - -/** Save to named file */ -TIDY_EXPORT int TIDY_CALL ig_tidySaveFile( TidyDoc tdoc, ctmbstr filename ); - -/** Save to standard output (FILE*) */ -TIDY_EXPORT int TIDY_CALL ig_tidySaveStdout( TidyDoc tdoc ); - -/** Save to given TidyBuffer object */ -TIDY_EXPORT int TIDY_CALL ig_tidySaveBuffer( TidyDoc tdoc, TidyBuffer* buf ); - -/** Save document to application buffer. If buffer is not big enough, -** ENOMEM will be returned and the necessary buffer size will be placed -** in *buflen. -*/ -TIDY_EXPORT int TIDY_CALL ig_tidySaveString( TidyDoc tdoc, - tmbstr buffer, uint* buflen ); - -/** Save to given generic output sink */ -TIDY_EXPORT int TIDY_CALL ig_tidySaveSink( TidyDoc tdoc, TidyOutputSink* sink ); - -/** @} end Save group */ - - -/** @addtogroup Basic -** @{ -*/ -/** Save current settings to named file. - Only non-default values are written. */ -TIDY_EXPORT int TIDY_CALL ig_tidyOptSaveFile( TidyDoc tdoc, ctmbstr cfgfil ); - -/** Save current settings to given output sink. - Only non-default values are written. */ -TIDY_EXPORT int TIDY_CALL ig_tidyOptSaveSink( TidyDoc tdoc, TidyOutputSink* sink ); - - -/* Error reporting functions -*/ - -/** Write more complete information about errors to current error sink. */ -TIDY_EXPORT void TIDY_CALL ig_tidyErrorSummary( TidyDoc tdoc ); - -/** Write more general information about markup to current error sink. */ -TIDY_EXPORT void TIDY_CALL ig_tidyGeneralInfo( TidyDoc tdoc ); - -/** @} end Basic group (again) */ - - -/** @defgroup Tree Document Tree -** -** A parsed and, optionally, repaired document is -** represented by Tidy as a Tree, much like a W3C DOM. -** This tree may be traversed using these functions. -** The following snippet gives a basic idea how these -** functions can be used. -** -
-void dumpNode( TidyNode tnod, int indent )
-{
-  TidyNode child;
-
-  for ( child = tidyGetChild(tnod); child; child = tidyGetNext(child) )
-  {
-    ctmbstr name;
-    switch ( tidyNodeGetType(child) )
-    {
-    case TidyNode_Root:       name = "Root";                    break;
-    case TidyNode_DocType:    name = "DOCTYPE";                 break;
-    case TidyNode_Comment:    name = "Comment";                 break;
-    case TidyNode_ProcIns:    name = "Processing Instruction";  break;
-    case TidyNode_Text:       name = "Text";                    break;
-    case TidyNode_CDATA:      name = "CDATA";                   break;
-    case TidyNode_Section:    name = "XML Section";             break;
-    case TidyNode_Asp:        name = "ASP";                     break;
-    case TidyNode_Jste:       name = "JSTE";                    break;
-    case TidyNode_Php:        name = "PHP";                     break;
-    case TidyNode_XmlDecl:    name = "XML Declaration";         break;
-
-    case TidyNode_Start:
-    case TidyNode_End:
-    case TidyNode_StartEnd:
-    default:
-      name = tidyNodeGetName( child );
-      break;
-    }
-    assert( name != NULL );
-    printf( "\%*.*sNode: \%s\\n", indent, indent, " ", name );
-    dumpNode( child, indent + 4 );
-  }
-}
-
-void dumpDoc( TidyDoc tdoc )
-{
-  dumpNode( tidyGetRoot(tdoc), 0 );
-}
-
-void dumpBody( TidyDoc tdoc )
-{
-  dumpNode( tidyGetBody(tdoc), 0 );
-}
-
- -@{ - -*/ - -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetRoot( TidyDoc tdoc ); -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetHtml( TidyDoc tdoc ); -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetHead( TidyDoc tdoc ); -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetBody( TidyDoc tdoc ); - -/* parent / child */ -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetParent( TidyNode tnod ); -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetChild( TidyNode tnod ); - -/* siblings */ -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetNext( TidyNode tnod ); -TIDY_EXPORT TidyNode TIDY_CALL ig_tidyGetPrev( TidyNode tnod ); - -/* Null for non-element nodes and all pure HTML -TIDY_EXPORT ctmbstr tidyNodeNsLocal( TidyNode tnod ); -TIDY_EXPORT ctmbstr tidyNodeNsPrefix( TidyNode tnod ); -TIDY_EXPORT ctmbstr tidyNodeNsUri( TidyNode tnod ); -*/ - -/* Iterate over attribute values */ -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrFirst( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrNext( TidyAttr tattr ); - -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyAttrName( TidyAttr tattr ); -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyAttrValue( TidyAttr tattr ); - -/* Null for pure HTML -TIDY_EXPORT ctmbstr tidyAttrNsLocal( TidyAttr tattr ); -TIDY_EXPORT ctmbstr tidyAttrNsPrefix( TidyAttr tattr ); -TIDY_EXPORT ctmbstr tidyAttrNsUri( TidyAttr tattr ); -*/ - -/** @} end Tree group */ - - -/** @defgroup NodeAsk Node Interrogation -** -** Get information about any givent node. -** @{ -*/ - -/* Node info */ -TIDY_EXPORT TidyNodeType TIDY_CALL ig_tidyNodeGetType( TidyNode tnod ); -TIDY_EXPORT ctmbstr TIDY_CALL ig_tidyNodeGetName( TidyNode tnod ); - -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsText( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsProp( TidyDoc tdoc, TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsHeader( TidyNode tnod ); /* h1, h2, ... */ - -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeHasText( TidyDoc tdoc, TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeGetText( TidyDoc tdoc, TidyNode tnod, TidyBuffer* buf ); - -/* Copy the unescaped value of this node into the given TidyBuffer as UTF-8 */ -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeGetValue( TidyDoc tdoc, TidyNode tnod, TidyBuffer* buf ); - -TIDY_EXPORT TidyTagId TIDY_CALL ig_tidyNodeGetId( TidyNode tnod ); - -TIDY_EXPORT uint TIDY_CALL ig_tidyNodeLine( TidyNode tnod ); -TIDY_EXPORT uint TIDY_CALL ig_tidyNodeColumn( TidyNode tnod ); - -/** @defgroup NodeIsElementName Deprecated node interrogation per TagId -** -** @deprecated The functions tidyNodeIs{ElementName} are deprecated and -** should be replaced by tidyNodeGetId. -** @{ -*/ -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsHTML( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsHEAD( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTITLE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBASE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsMETA( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBODY( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsFRAMESET( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsFRAME( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsIFRAME( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsNOFRAMES( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsHR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH1( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH2( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsPRE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsLISTING( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsP( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsUL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsOL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsDL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsDIR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsLI( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsDT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsDD( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTABLE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsCAPTION( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTD( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTH( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsCOL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsCOLGROUP( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsA( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsLINK( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsB( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsI( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSTRONG( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsEM( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBIG( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSMALL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsPARAM( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsOPTION( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsOPTGROUP( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsIMG( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsMAP( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsAREA( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsNOBR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsWBR( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsFONT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsLAYER( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSPACER( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsCENTER( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSTYLE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSCRIPT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsNOSCRIPT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsFORM( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsTEXTAREA( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBLOCKQUOTE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsAPPLET( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsOBJECT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsDIV( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSPAN( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsINPUT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsQ( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsLABEL( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH3( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH4( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH5( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsH6( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsADDRESS( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsXMP( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSELECT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBLINK( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsMARQUEE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsEMBED( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsBASEFONT( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsISINDEX( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsS( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsSTRIKE( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsU( TidyNode tnod ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyNodeIsMENU( TidyNode tnod ); - -/** @} End NodeIsElementName group */ - -/** @} End NodeAsk group */ - - -/** @defgroup Attribute Attribute Interrogation -** -** Get information about any given attribute. -** @{ -*/ - -TIDY_EXPORT TidyAttrId TIDY_CALL ig_tidyAttrGetId( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsEvent( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsProp( TidyAttr tattr ); - -/** @defgroup AttrIsAttributeName Deprecated attribute interrogation per AttrId -** -** @deprecated The functions tidyAttrIs{AttributeName} are deprecated and -** should be replaced by tidyAttrGetId. -** @{ -*/ -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsHREF( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsSRC( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsID( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsNAME( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsSUMMARY( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsALT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsLONGDESC( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsUSEMAP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsISMAP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsLANGUAGE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsTYPE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsVALUE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsCONTENT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsTITLE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsXMLNS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsDATAFLD( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsWIDTH( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsHEIGHT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsFOR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsSELECTED( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsCHECKED( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsLANG( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsTARGET( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsHTTP_EQUIV( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsREL( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnMOUSEMOVE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnMOUSEDOWN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnMOUSEUP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnCLICK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnMOUSEOVER( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnMOUSEOUT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnKEYDOWN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnKEYUP( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnKEYPRESS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnFOCUS( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsOnBLUR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsBGCOLOR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsLINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsALINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsVLINK( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsTEXT( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsSTYLE( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsABBR( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsCOLSPAN( TidyAttr tattr ); -TIDY_EXPORT Bool TIDY_CALL ig_tidyAttrIsROWSPAN( TidyAttr tattr ); - -/** @} End AttrIsAttributeName group */ - -/** @} end AttrAsk group */ - - -/** @defgroup AttrGet Attribute Retrieval -** -** Lookup an attribute from a given node -** @{ -*/ - -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetById( TidyNode tnod, TidyAttrId attId ); - -/** @defgroup AttrGetAttributeName Deprecated attribute retrieval per AttrId -** -** @deprecated The functions tidyAttrGet{AttributeName} are deprecated and -** should be replaced by tidyAttrGetById. -** For instance, tidyAttrGetID( TidyNode tnod ) can be replaced by -** tidyAttrGetById( TidyNode tnod, TidyAttr_ID ). This avoids a potential -** name clash with tidyAttrGetId for case-insensitive languages. -** @{ -*/ -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetHREF( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetSRC( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetID( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetNAME( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetSUMMARY( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetALT( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetLONGDESC( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetUSEMAP( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetISMAP( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetLANGUAGE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetTYPE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetVALUE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetCONTENT( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetTITLE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetXMLNS( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetDATAFLD( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetWIDTH( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetHEIGHT( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetFOR( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetSELECTED( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetCHECKED( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetLANG( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetTARGET( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetHTTP_EQUIV( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetREL( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnMOUSEMOVE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnMOUSEDOWN( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnMOUSEUP( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnCLICK( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnMOUSEOVER( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnMOUSEOUT( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnKEYDOWN( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnKEYUP( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnKEYPRESS( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnFOCUS( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetOnBLUR( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetBGCOLOR( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetLINK( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetALINK( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetVLINK( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetTEXT( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetSTYLE( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetABBR( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetCOLSPAN( TidyNode tnod ); -TIDY_EXPORT TidyAttr TIDY_CALL ig_tidyAttrGetROWSPAN( TidyNode tnod ); - -/** @} End AttrGetAttributeName group */ - -/** @} end AttrGet group */ - -#ifdef __cplusplus -} /* extern "C" */ -#endif -#endif /* __TIDY_H__ */ - -/* - * local variables: - * mode: c - * indent-tabs-mode: nil - * c-basic-offset: 4 - * eval: (c-set-offset 'substatement-open 0) - * end: - */ diff --git a/Pods/CTidy/libtidy/include/tidyenum.h b/Pods/CTidy/libtidy/include/tidyenum.h deleted file mode 100644 index aaa451257075..000000000000 --- a/Pods/CTidy/libtidy/include/tidyenum.h +++ /dev/null @@ -1,622 +0,0 @@ -#ifndef __TIDYENUM_H__ -#define __TIDYENUM_H__ - -/* @file tidyenum.h -- Split public enums into separate header - - Simplifies enum re-use in various wrappers. e.g. SWIG - generated wrappers and COM IDL files. - - Copyright (c) 1998-2008 World Wide Web Consortium - (Massachusetts Institute of Technology, European Research - Consortium for Informatics and Mathematics, Keio University). - All Rights Reserved. - - CVS Info : - - $Author: arnaud02 $ - $Date: 2008/06/18 20:18:54 $ - $Revision: 1.18 $ - - Contributing Author(s): - - Dave Raggett - - The contributing author(s) would like to thank all those who - helped with testing, bug fixes and suggestions for improvements. - This wouldn't have been possible without your help. - - COPYRIGHT NOTICE: - - This software and documentation is provided "as is," and - the copyright holders and contributing author(s) make no - representations or warranties, express or implied, including - but not limited to, warranties of merchantability or fitness - for any particular purpose or that the use of the software or - documentation will not infringe any third party patents, - copyrights, trademarks or other rights. - - The copyright holders and contributing author(s) will not be held - liable for any direct, indirect, special or consequential damages - arising out of any use of the software or documentation, even if - advised of the possibility of such damage. - - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, documentation and executables, - for any purpose, without fee, subject to the following restrictions: - - 1. The origin of this source code must not be misrepresented. - 2. Altered versions must be plainly marked as such and must - not be misrepresented as being the original source. - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. - - The copyright holders and contributing author(s) specifically - permit, without fee, and encourage the use of this source code - as a component for supporting the Hypertext Markup Language in - commercial products. If you use this source code in a product, - acknowledgment is not required but would be appreciated. - - - Created 2001-05-20 by Charles Reitzel - Updated 2002-07-01 by Charles Reitzel - 1st Implementation - -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/* Enumerate configuration options -*/ - -/** Categories of Tidy configuration options -*/ -typedef enum -{ - TidyMarkup, /**< Markup options: (X)HTML version, etc */ - TidyDiagnostics, /**< Diagnostics */ - TidyPrettyPrint, /**< Output layout */ - TidyEncoding, /**< Character encodings */ - TidyMiscellaneous /**< File handling, message format, etc. */ -} TidyConfigCategory; - - -/** Option IDs Used to get/set option values. -*/ -typedef enum -{ - TidyUnknownOption, /**< Unknown option! */ - TidyIndentSpaces, /**< Indentation n spaces */ - TidyWrapLen, /**< Wrap margin */ - TidyTabSize, /**< Expand tabs to n spaces */ - - TidyCharEncoding, /**< In/out character encoding */ - TidyInCharEncoding, /**< Input character encoding (if different) */ - TidyOutCharEncoding, /**< Output character encoding (if different) */ - TidyNewline, /**< Output line ending (default to platform) */ - - TidyDoctypeMode, /**< See doctype property */ - TidyDoctype, /**< User specified doctype */ - - TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */ - TidyAltText, /**< Default text for alt attribute */ - - /* obsolete */ - TidySlideStyle, /**< Style sheet for slides: not used for anything yet */ - - TidyErrFile, /**< File name to write errors to */ - TidyOutFile, /**< File name to write markup to */ - TidyWriteBack, /**< If true then output tidied markup */ - TidyShowMarkup, /**< If false, normal output is suppressed */ - TidyShowWarnings, /**< However errors are always shown */ - TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */ - TidyIndentContent, /**< Indent content of appropriate tags */ - /**< "auto" does text/block level content indentation */ - TidyHideEndTags, /**< Suppress optional end tags */ - TidyXmlTags, /**< Treat input as XML */ - TidyXmlOut, /**< Create output as XML */ - TidyXhtmlOut, /**< Output extensible HTML */ - TidyHtmlOut, /**< Output plain HTML, even for XHTML input. - Yes means set explicitly. */ - TidyXmlDecl, /**< Add for XML docs */ - TidyUpperCaseTags, /**< Output tags in upper not lower case */ - TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */ - TidyMakeBare, /**< Make bare HTML: remove Microsoft cruft */ - TidyMakeClean, /**< Replace presentational clutter by style rules */ - TidyLogicalEmphasis, /**< Replace i by em and b by strong */ - TidyDropPropAttrs, /**< Discard proprietary attributes */ - TidyDropFontTags, /**< Discard presentation tags */ - TidyDropEmptyParas, /**< Discard empty p elements */ - TidyFixComments, /**< Fix comments with adjacent hyphens */ - TidyBreakBeforeBR, /**< Output newline before
or not? */ - - /* obsolete */ - TidyBurstSlides, /**< Create slides on each h2 element */ - - TidyNumEntities, /**< Use numeric entities */ - TidyQuoteMarks, /**< Output " marks as " */ - TidyQuoteNbsp, /**< Output non-breaking space as entity */ - TidyQuoteAmpersand, /**< Output naked ampersand as & */ - TidyWrapAttVals, /**< Wrap within attribute values */ - TidyWrapScriptlets, /**< Wrap within JavaScript string literals */ - TidyWrapSection, /**< Wrap within section tags */ - TidyWrapAsp, /**< Wrap within ASP pseudo elements */ - TidyWrapJste, /**< Wrap within JSTE pseudo elements */ - TidyWrapPhp, /**< Wrap within PHP pseudo elements */ - TidyFixBackslash, /**< Fix URLs by replacing \ with / */ - TidyIndentAttributes,/**< Newline+indent before each attribute */ - TidyXmlPIs, /**< If set to yes PIs must end with ?> */ - TidyXmlSpace, /**< If set to yes adds xml:space attr as needed */ - TidyEncloseBodyText, /**< If yes text at body is wrapped in P's */ - TidyEncloseBlockText,/**< If yes text in blocks is wrapped in P's */ - TidyKeepFileTimes, /**< If yes last modied time is preserved */ - TidyWord2000, /**< Draconian cleaning for Word2000 */ - TidyMark, /**< Add meta element indicating tidied doc */ - TidyEmacs, /**< If true format error output for GNU Emacs */ - TidyEmacsFile, /**< Name of current Emacs file */ - TidyLiteralAttribs, /**< If true attributes may use newlines */ - TidyBodyOnly, /**< Output BODY content only */ - TidyFixUri, /**< Applies URI encoding if necessary */ - TidyLowerLiterals, /**< Folds known attribute values to lower case */ - TidyHideComments, /**< Hides all (real) comments in output */ - TidyIndentCdata, /**< Indent section */ - TidyForceOutput, /**< Output document even if errors were found */ - TidyShowErrors, /**< Number of errors to put out */ - TidyAsciiChars, /**< Convert quotes and dashes to nearest ASCII char */ - TidyJoinClasses, /**< Join multiple class attributes */ - TidyJoinStyles, /**< Join multiple style attributes */ - TidyEscapeCdata, /**< Replace sections with escaped text */ - -#if SUPPORT_ASIAN_ENCODINGS - TidyLanguage, /**< Language property: not used for anything yet */ - TidyNCR, /**< Allow numeric character references */ -#else - TidyLanguageNotUsed, - TidyNCRNotUsed, -#endif -#if SUPPORT_UTF16_ENCODINGS - TidyOutputBOM, /**< Output a Byte Order Mark (BOM) for UTF-16 encodings */ - /**< auto: if input stream has BOM, we output a BOM */ -#else - TidyOutputBOMNotUsed, -#endif - - TidyReplaceColor, /**< Replace hex color attribute values with names */ - TidyCSSPrefix, /**< CSS class naming for -clean option */ - - TidyInlineTags, /**< Declared inline tags */ - TidyBlockTags, /**< Declared block tags */ - TidyEmptyTags, /**< Declared empty tags */ - TidyPreTags, /**< Declared pre tags */ - - TidyAccessibilityCheckLevel, /**< Accessibility check level - 0 (old style), or 1, 2, 3 */ - - TidyVertSpace, /**< degree to which markup is spread out vertically */ -#if SUPPORT_ASIAN_ENCODINGS - TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */ -#else - TidyPunctWrapNotUsed, -#endif - TidyMergeDivs, /**< Merge multiple DIVs */ - TidyDecorateInferredUL, /**< Mark inferred UL elements with no indent CSS */ - TidyPreserveEntities, /**< Preserve entities */ - TidySortAttributes, /**< Sort attributes */ - TidyMergeSpans, /**< Merge multiple SPANs */ - TidyAnchorAsName, /**< Define anchors as name attributes */ - N_TIDY_OPTIONS /**< Must be last */ -} TidyOptionId; - -/** Option data types -*/ -typedef enum -{ - TidyString, /**< String */ - TidyInteger, /**< Integer or enumeration */ - TidyBoolean /**< Boolean flag */ -} TidyOptionType; - - -/** AutoBool values used by ParseBool, ParseTriState, ParseIndent, ParseBOM -*/ -typedef enum -{ - TidyNoState, /**< maps to 'no' */ - TidyYesState, /**< maps to 'yes' */ - TidyAutoState /**< Automatic */ -} TidyTriState; - -/** TidyNewline option values to control output line endings. -*/ -typedef enum -{ - TidyLF, /**< Use Unix style: LF */ - TidyCRLF, /**< Use DOS/Windows style: CR+LF */ - TidyCR /**< Use Macintosh style: CR */ -} TidyLineEnding; - - -/** Mode controlling treatment of doctype -*/ -typedef enum -{ - TidyDoctypeOmit, /**< Omit DOCTYPE altogether */ - TidyDoctypeAuto, /**< Keep DOCTYPE in input. Set version to content */ - TidyDoctypeStrict, /**< Convert document to HTML 4 strict content model */ - TidyDoctypeLoose, /**< Convert document to HTML 4 transitional - content model */ - TidyDoctypeUser /**< Set DOCTYPE FPI explicitly */ -} TidyDoctypeModes; - -/** Mode controlling treatment of duplicate Attributes -*/ -typedef enum -{ - TidyKeepFirst, - TidyKeepLast -} TidyDupAttrModes; - -/** Mode controlling treatment of sorting attributes -*/ -typedef enum -{ - TidySortAttrNone, - TidySortAttrAlpha -} TidyAttrSortStrategy; - -/* I/O and Message handling interface -** -** By default, Tidy will define, create and use -** instances of input and output handlers for -** standard C buffered I/O (i.e. FILE* stdin, -** FILE* stdout and FILE* stderr for content -** input, content output and diagnostic output, -** respectively. A FILE* cfgFile input handler -** will be used for config files. Command line -** options will just be set directly. -*/ - -/** Message severity level -*/ -typedef enum -{ - TidyInfo, /**< Information about markup usage */ - TidyWarning, /**< Warning message */ - TidyConfig, /**< Configuration error */ - TidyAccess, /**< Accessibility message */ - TidyError, /**< Error message - output suppressed */ - TidyBadDocument, /**< I/O or file system error */ - TidyFatal /**< Crash! */ -} TidyReportLevel; - - -/* Document tree traversal functions -*/ - -/** Node types -*/ -typedef enum -{ - TidyNode_Root, /**< Root */ - TidyNode_DocType, /**< DOCTYPE */ - TidyNode_Comment, /**< Comment */ - TidyNode_ProcIns, /**< Processing Instruction */ - TidyNode_Text, /**< Text */ - TidyNode_Start, /**< Start Tag */ - TidyNode_End, /**< End Tag */ - TidyNode_StartEnd, /**< Start/End (empty) Tag */ - TidyNode_CDATA, /**< Unparsed Text */ - TidyNode_Section, /**< XML Section */ - TidyNode_Asp, /**< ASP Source */ - TidyNode_Jste, /**< JSTE Source */ - TidyNode_Php, /**< PHP Source */ - TidyNode_XmlDecl /**< XML Declaration */ -} TidyNodeType; - - -/** Known HTML element types -*/ -typedef enum -{ - TidyTag_UNKNOWN, /**< Unknown tag! */ - TidyTag_A, /**< A */ - TidyTag_ABBR, /**< ABBR */ - TidyTag_ACRONYM, /**< ACRONYM */ - TidyTag_ADDRESS, /**< ADDRESS */ - TidyTag_ALIGN, /**< ALIGN */ - TidyTag_APPLET, /**< APPLET */ - TidyTag_AREA, /**< AREA */ - TidyTag_B, /**< B */ - TidyTag_BASE, /**< BASE */ - TidyTag_BASEFONT, /**< BASEFONT */ - TidyTag_BDO, /**< BDO */ - TidyTag_BGSOUND, /**< BGSOUND */ - TidyTag_BIG, /**< BIG */ - TidyTag_BLINK, /**< BLINK */ - TidyTag_BLOCKQUOTE, /**< BLOCKQUOTE */ - TidyTag_BODY, /**< BODY */ - TidyTag_BR, /**< BR */ - TidyTag_BUTTON, /**< BUTTON */ - TidyTag_CAPTION, /**< CAPTION */ - TidyTag_CENTER, /**< CENTER */ - TidyTag_CITE, /**< CITE */ - TidyTag_CODE, /**< CODE */ - TidyTag_COL, /**< COL */ - TidyTag_COLGROUP, /**< COLGROUP */ - TidyTag_COMMENT, /**< COMMENT */ - TidyTag_DD, /**< DD */ - TidyTag_DEL, /**< DEL */ - TidyTag_DFN, /**< DFN */ - TidyTag_DIR, /**< DIR */ - TidyTag_DIV, /**< DIF */ - TidyTag_DL, /**< DL */ - TidyTag_DT, /**< DT */ - TidyTag_EM, /**< EM */ - TidyTag_EMBED, /**< EMBED */ - TidyTag_FIELDSET, /**< FIELDSET */ - TidyTag_FONT, /**< FONT */ - TidyTag_FORM, /**< FORM */ - TidyTag_FRAME, /**< FRAME */ - TidyTag_FRAMESET, /**< FRAMESET */ - TidyTag_H1, /**< H1 */ - TidyTag_H2, /**< H2 */ - TidyTag_H3, /**< H3 */ - TidyTag_H4, /**< H4 */ - TidyTag_H5, /**< H5 */ - TidyTag_H6, /**< H6 */ - TidyTag_HEAD, /**< HEAD */ - TidyTag_HR, /**< HR */ - TidyTag_HTML, /**< HTML */ - TidyTag_I, /**< I */ - TidyTag_IFRAME, /**< IFRAME */ - TidyTag_ILAYER, /**< ILAYER */ - TidyTag_IMG, /**< IMG */ - TidyTag_INPUT, /**< INPUT */ - TidyTag_INS, /**< INS */ - TidyTag_ISINDEX, /**< ISINDEX */ - TidyTag_KBD, /**< KBD */ - TidyTag_KEYGEN, /**< KEYGEN */ - TidyTag_LABEL, /**< LABEL */ - TidyTag_LAYER, /**< LAYER */ - TidyTag_LEGEND, /**< LEGEND */ - TidyTag_LI, /**< LI */ - TidyTag_LINK, /**< LINK */ - TidyTag_LISTING, /**< LISTING */ - TidyTag_MAP, /**< MAP */ - TidyTag_MARQUEE, /**< MARQUEE */ - TidyTag_MENU, /**< MENU */ - TidyTag_META, /**< META */ - TidyTag_MULTICOL, /**< MULTICOL */ - TidyTag_NOBR, /**< NOBR */ - TidyTag_NOEMBED, /**< NOEMBED */ - TidyTag_NOFRAMES, /**< NOFRAMES */ - TidyTag_NOLAYER, /**< NOLAYER */ - TidyTag_NOSAVE, /**< NOSAVE */ - TidyTag_NOSCRIPT, /**< NOSCRIPT */ - TidyTag_OBJECT, /**< OBJECT */ - TidyTag_OL, /**< OL */ - TidyTag_OPTGROUP, /**< OPTGROUP */ - TidyTag_OPTION, /**< OPTION */ - TidyTag_P, /**< P */ - TidyTag_PARAM, /**< PARAM */ - TidyTag_PLAINTEXT,/**< PLAINTEXT */ - TidyTag_PRE, /**< PRE */ - TidyTag_Q, /**< Q */ - TidyTag_RB, /**< RB */ - TidyTag_RBC, /**< RBC */ - TidyTag_RP, /**< RP */ - TidyTag_RT, /**< RT */ - TidyTag_RTC, /**< RTC */ - TidyTag_RUBY, /**< RUBY */ - TidyTag_S, /**< S */ - TidyTag_SAMP, /**< SAMP */ - TidyTag_SCRIPT, /**< SCRIPT */ - TidyTag_SELECT, /**< SELECT */ - TidyTag_SERVER, /**< SERVER */ - TidyTag_SERVLET, /**< SERVLET */ - TidyTag_SMALL, /**< SMALL */ - TidyTag_SPACER, /**< SPACER */ - TidyTag_SPAN, /**< SPAN */ - TidyTag_STRIKE, /**< STRIKE */ - TidyTag_STRONG, /**< STRONG */ - TidyTag_STYLE, /**< STYLE */ - TidyTag_SUB, /**< SUB */ - TidyTag_SUP, /**< SUP */ - TidyTag_TABLE, /**< TABLE */ - TidyTag_TBODY, /**< TBODY */ - TidyTag_TD, /**< TD */ - TidyTag_TEXTAREA, /**< TEXTAREA */ - TidyTag_TFOOT, /**< TFOOT */ - TidyTag_TH, /**< TH */ - TidyTag_THEAD, /**< THEAD */ - TidyTag_TITLE, /**< TITLE */ - TidyTag_TR, /**< TR */ - TidyTag_TT, /**< TT */ - TidyTag_U, /**< U */ - TidyTag_UL, /**< UL */ - TidyTag_VAR, /**< VAR */ - TidyTag_WBR, /**< WBR */ - TidyTag_XMP, /**< XMP */ - TidyTag_NEXTID, /**< NEXTID */ - - N_TIDY_TAGS /**< Must be last */ -} TidyTagId; - -/* Attribute interrogation -*/ - -/** Known HTML attributes -*/ -typedef enum -{ - TidyAttr_UNKNOWN, /**< UNKNOWN= */ - TidyAttr_ABBR, /**< ABBR= */ - TidyAttr_ACCEPT, /**< ACCEPT= */ - TidyAttr_ACCEPT_CHARSET, /**< ACCEPT_CHARSET= */ - TidyAttr_ACCESSKEY, /**< ACCESSKEY= */ - TidyAttr_ACTION, /**< ACTION= */ - TidyAttr_ADD_DATE, /**< ADD_DATE= */ - TidyAttr_ALIGN, /**< ALIGN= */ - TidyAttr_ALINK, /**< ALINK= */ - TidyAttr_ALT, /**< ALT= */ - TidyAttr_ARCHIVE, /**< ARCHIVE= */ - TidyAttr_AXIS, /**< AXIS= */ - TidyAttr_BACKGROUND, /**< BACKGROUND= */ - TidyAttr_BGCOLOR, /**< BGCOLOR= */ - TidyAttr_BGPROPERTIES, /**< BGPROPERTIES= */ - TidyAttr_BORDER, /**< BORDER= */ - TidyAttr_BORDERCOLOR, /**< BORDERCOLOR= */ - TidyAttr_BOTTOMMARGIN, /**< BOTTOMMARGIN= */ - TidyAttr_CELLPADDING, /**< CELLPADDING= */ - TidyAttr_CELLSPACING, /**< CELLSPACING= */ - TidyAttr_CHAR, /**< CHAR= */ - TidyAttr_CHAROFF, /**< CHAROFF= */ - TidyAttr_CHARSET, /**< CHARSET= */ - TidyAttr_CHECKED, /**< CHECKED= */ - TidyAttr_CITE, /**< CITE= */ - TidyAttr_CLASS, /**< CLASS= */ - TidyAttr_CLASSID, /**< CLASSID= */ - TidyAttr_CLEAR, /**< CLEAR= */ - TidyAttr_CODE, /**< CODE= */ - TidyAttr_CODEBASE, /**< CODEBASE= */ - TidyAttr_CODETYPE, /**< CODETYPE= */ - TidyAttr_COLOR, /**< COLOR= */ - TidyAttr_COLS, /**< COLS= */ - TidyAttr_COLSPAN, /**< COLSPAN= */ - TidyAttr_COMPACT, /**< COMPACT= */ - TidyAttr_CONTENT, /**< CONTENT= */ - TidyAttr_COORDS, /**< COORDS= */ - TidyAttr_DATA, /**< DATA= */ - TidyAttr_DATAFLD, /**< DATAFLD= */ - TidyAttr_DATAFORMATAS, /**< DATAFORMATAS= */ - TidyAttr_DATAPAGESIZE, /**< DATAPAGESIZE= */ - TidyAttr_DATASRC, /**< DATASRC= */ - TidyAttr_DATETIME, /**< DATETIME= */ - TidyAttr_DECLARE, /**< DECLARE= */ - TidyAttr_DEFER, /**< DEFER= */ - TidyAttr_DIR, /**< DIR= */ - TidyAttr_DISABLED, /**< DISABLED= */ - TidyAttr_ENCODING, /**< ENCODING= */ - TidyAttr_ENCTYPE, /**< ENCTYPE= */ - TidyAttr_FACE, /**< FACE= */ - TidyAttr_FOR, /**< FOR= */ - TidyAttr_FRAME, /**< FRAME= */ - TidyAttr_FRAMEBORDER, /**< FRAMEBORDER= */ - TidyAttr_FRAMESPACING, /**< FRAMESPACING= */ - TidyAttr_GRIDX, /**< GRIDX= */ - TidyAttr_GRIDY, /**< GRIDY= */ - TidyAttr_HEADERS, /**< HEADERS= */ - TidyAttr_HEIGHT, /**< HEIGHT= */ - TidyAttr_HREF, /**< HREF= */ - TidyAttr_HREFLANG, /**< HREFLANG= */ - TidyAttr_HSPACE, /**< HSPACE= */ - TidyAttr_HTTP_EQUIV, /**< HTTP_EQUIV= */ - TidyAttr_ID, /**< ID= */ - TidyAttr_ISMAP, /**< ISMAP= */ - TidyAttr_LABEL, /**< LABEL= */ - TidyAttr_LANG, /**< LANG= */ - TidyAttr_LANGUAGE, /**< LANGUAGE= */ - TidyAttr_LAST_MODIFIED, /**< LAST_MODIFIED= */ - TidyAttr_LAST_VISIT, /**< LAST_VISIT= */ - TidyAttr_LEFTMARGIN, /**< LEFTMARGIN= */ - TidyAttr_LINK, /**< LINK= */ - TidyAttr_LONGDESC, /**< LONGDESC= */ - TidyAttr_LOWSRC, /**< LOWSRC= */ - TidyAttr_MARGINHEIGHT, /**< MARGINHEIGHT= */ - TidyAttr_MARGINWIDTH, /**< MARGINWIDTH= */ - TidyAttr_MAXLENGTH, /**< MAXLENGTH= */ - TidyAttr_MEDIA, /**< MEDIA= */ - TidyAttr_METHOD, /**< METHOD= */ - TidyAttr_MULTIPLE, /**< MULTIPLE= */ - TidyAttr_NAME, /**< NAME= */ - TidyAttr_NOHREF, /**< NOHREF= */ - TidyAttr_NORESIZE, /**< NORESIZE= */ - TidyAttr_NOSHADE, /**< NOSHADE= */ - TidyAttr_NOWRAP, /**< NOWRAP= */ - TidyAttr_OBJECT, /**< OBJECT= */ - TidyAttr_OnAFTERUPDATE, /**< OnAFTERUPDATE= */ - TidyAttr_OnBEFOREUNLOAD, /**< OnBEFOREUNLOAD= */ - TidyAttr_OnBEFOREUPDATE, /**< OnBEFOREUPDATE= */ - TidyAttr_OnBLUR, /**< OnBLUR= */ - TidyAttr_OnCHANGE, /**< OnCHANGE= */ - TidyAttr_OnCLICK, /**< OnCLICK= */ - TidyAttr_OnDATAAVAILABLE, /**< OnDATAAVAILABLE= */ - TidyAttr_OnDATASETCHANGED, /**< OnDATASETCHANGED= */ - TidyAttr_OnDATASETCOMPLETE, /**< OnDATASETCOMPLETE= */ - TidyAttr_OnDBLCLICK, /**< OnDBLCLICK= */ - TidyAttr_OnERRORUPDATE, /**< OnERRORUPDATE= */ - TidyAttr_OnFOCUS, /**< OnFOCUS= */ - TidyAttr_OnKEYDOWN, /**< OnKEYDOWN= */ - TidyAttr_OnKEYPRESS, /**< OnKEYPRESS= */ - TidyAttr_OnKEYUP, /**< OnKEYUP= */ - TidyAttr_OnLOAD, /**< OnLOAD= */ - TidyAttr_OnMOUSEDOWN, /**< OnMOUSEDOWN= */ - TidyAttr_OnMOUSEMOVE, /**< OnMOUSEMOVE= */ - TidyAttr_OnMOUSEOUT, /**< OnMOUSEOUT= */ - TidyAttr_OnMOUSEOVER, /**< OnMOUSEOVER= */ - TidyAttr_OnMOUSEUP, /**< OnMOUSEUP= */ - TidyAttr_OnRESET, /**< OnRESET= */ - TidyAttr_OnROWENTER, /**< OnROWENTER= */ - TidyAttr_OnROWEXIT, /**< OnROWEXIT= */ - TidyAttr_OnSELECT, /**< OnSELECT= */ - TidyAttr_OnSUBMIT, /**< OnSUBMIT= */ - TidyAttr_OnUNLOAD, /**< OnUNLOAD= */ - TidyAttr_PROFILE, /**< PROFILE= */ - TidyAttr_PROMPT, /**< PROMPT= */ - TidyAttr_RBSPAN, /**< RBSPAN= */ - TidyAttr_READONLY, /**< READONLY= */ - TidyAttr_REL, /**< REL= */ - TidyAttr_REV, /**< REV= */ - TidyAttr_RIGHTMARGIN, /**< RIGHTMARGIN= */ - TidyAttr_ROWS, /**< ROWS= */ - TidyAttr_ROWSPAN, /**< ROWSPAN= */ - TidyAttr_RULES, /**< RULES= */ - TidyAttr_SCHEME, /**< SCHEME= */ - TidyAttr_SCOPE, /**< SCOPE= */ - TidyAttr_SCROLLING, /**< SCROLLING= */ - TidyAttr_SELECTED, /**< SELECTED= */ - TidyAttr_SHAPE, /**< SHAPE= */ - TidyAttr_SHOWGRID, /**< SHOWGRID= */ - TidyAttr_SHOWGRIDX, /**< SHOWGRIDX= */ - TidyAttr_SHOWGRIDY, /**< SHOWGRIDY= */ - TidyAttr_SIZE, /**< SIZE= */ - TidyAttr_SPAN, /**< SPAN= */ - TidyAttr_SRC, /**< SRC= */ - TidyAttr_STANDBY, /**< STANDBY= */ - TidyAttr_START, /**< START= */ - TidyAttr_STYLE, /**< STYLE= */ - TidyAttr_SUMMARY, /**< SUMMARY= */ - TidyAttr_TABINDEX, /**< TABINDEX= */ - TidyAttr_TARGET, /**< TARGET= */ - TidyAttr_TEXT, /**< TEXT= */ - TidyAttr_TITLE, /**< TITLE= */ - TidyAttr_TOPMARGIN, /**< TOPMARGIN= */ - TidyAttr_TYPE, /**< TYPE= */ - TidyAttr_USEMAP, /**< USEMAP= */ - TidyAttr_VALIGN, /**< VALIGN= */ - TidyAttr_VALUE, /**< VALUE= */ - TidyAttr_VALUETYPE, /**< VALUETYPE= */ - TidyAttr_VERSION, /**< VERSION= */ - TidyAttr_VLINK, /**< VLINK= */ - TidyAttr_VSPACE, /**< VSPACE= */ - TidyAttr_WIDTH, /**< WIDTH= */ - TidyAttr_WRAP, /**< WRAP= */ - TidyAttr_XML_LANG, /**< XML_LANG= */ - TidyAttr_XML_SPACE, /**< XML_SPACE= */ - TidyAttr_XMLNS, /**< XMLNS= */ - - TidyAttr_EVENT, /**< EVENT= */ - TidyAttr_METHODS, /**< METHODS= */ - TidyAttr_N, /**< N= */ - TidyAttr_SDAFORM, /**< SDAFORM= */ - TidyAttr_SDAPREF, /**< SDAPREF= */ - TidyAttr_SDASUFF, /**< SDASUFF= */ - TidyAttr_URN, /**< URN= */ - - N_TIDY_ATTRIBS /**< Must be last */ -} TidyAttrId; - -#ifdef __cplusplus -} /* extern "C" */ -#endif -#endif /* __TIDYENUM_H__ */ diff --git a/Pods/CTidy/libtidy/src/access.c b/Pods/CTidy/libtidy/src/access.c deleted file mode 100644 index 8d0da96e5bb5..000000000000 --- a/Pods/CTidy/libtidy/src/access.c +++ /dev/null @@ -1,3310 +0,0 @@ -/* access.c -- carry out accessibility checks - - Copyright University of Toronto - Portions (c) 1998-2009 (W3C) MIT, ERCIM, Keio University - See tidy.h for the copyright notice. - - CVS Info : - - $Author: arnaud02 $ - $Date: 2009/03/25 22:04:35 $ - $Revision: 1.42 $ - -*/ - -/********************************************************************* -* AccessibilityChecks -* -* Carries out processes for all accessibility checks. Traverses -* through all the content within the tree and evaluates the tags for -* accessibility. -* -* To perform the following checks, 'AccessibilityChecks' must be -* called AFTER the tree structure has been formed. -* -* If, in the command prompt, there is no specification of which -* accessibility priorities to check, no accessibility checks will be -* performed. (ie. '1' for priority 1, '2' for priorities 1 and 2, -* and '3') for priorities 1, 2 and 3.) -* -* Copyright University of Toronto -* Programmed by: Mike Lam and Chris Ridpath -* Modifications by : Terry Teague (TRT) -* -* Reference document: http://www.w3.org/TR/WAI-WEBCONTENT/ -*********************************************************************/ - - -#include "tidy-int.h" - -#if SUPPORT_ACCESSIBILITY_CHECKS - -#include "access.h" -#include "message.h" -#include "tags.h" -#include "attrs.h" -#include "tmbstr.h" - - -/* - The accessibility checks to perform depending on user's desire. - - 1. priority 1 - 2. priority 1 & 2 - 3. priority 1, 2, & 3 -*/ - -/* List of possible image types */ -static const ctmbstr imageExtensions[] = -{".jpg", ".gif", ".tif", ".pct", ".pic", ".iff", ".dib", - ".tga", ".pcx", ".png", ".jpeg", ".tiff", ".bmp"}; - -#define N_IMAGE_EXTS (sizeof(imageExtensions)/sizeof(ctmbstr)) - -/* List of possible sound file types */ -static const ctmbstr soundExtensions[] = -{".wav", ".au", ".aiff", ".snd", ".ra", ".rm"}; - -static const int soundExtErrCodes[] = -{ - AUDIO_MISSING_TEXT_WAV, - AUDIO_MISSING_TEXT_AU, - AUDIO_MISSING_TEXT_AIFF, - AUDIO_MISSING_TEXT_SND, - AUDIO_MISSING_TEXT_RA, - AUDIO_MISSING_TEXT_RM -}; - -#define N_AUDIO_EXTS (sizeof(soundExtensions)/sizeof(ctmbstr)) - -/* List of possible media extensions */ -static const ctmbstr mediaExtensions[] = -{".mpg", ".mov", ".asx", ".avi", ".ivf", ".m1v", ".mmm", ".mp2v", - ".mpa", ".mpe", ".mpeg", ".ram", ".smi", ".smil", ".swf", - ".wm", ".wma", ".wmv"}; - -#define N_MEDIA_EXTS (sizeof(mediaExtensions)/sizeof(ctmbstr)) - -/* List of possible frame sources */ -static const ctmbstr frameExtensions[] = -{".htm", ".html", ".shtm", ".shtml", ".cfm", ".cfml", -".asp", ".cgi", ".pl", ".smil"}; - -#define N_FRAME_EXTS (sizeof(frameExtensions)/sizeof(ctmbstr)) - -/* List of possible colour values */ -static const int colorValues[][3] = -{ - { 0, 0, 0}, - {128,128,128}, - {192,192,192}, - {255,255,255}, - {192, 0, 0}, - {255, 0, 0}, - {128, 0,128}, - {255, 0,255}, - { 0,128, 0}, - { 0,255, 0}, - {128,128, 0}, - {255,255, 0}, - { 0, 0,128}, - { 0, 0,255}, - { 0,128,128}, - { 0,255,255} -}; - -#define N_COLOR_VALS (sizeof(colorValues)/(sizeof(int[3])) - -/* These arrays are used to convert color names to their RGB values */ -static const ctmbstr colorNames[] = -{ - "black", - "silver", - "grey", - "white", - "maroon", - "red", - "purple", - "fuchsia", - "green", - "lime", - "olive", - "yellow", - "navy", - "blue", - "teal", - "aqua" -}; - -#define N_COLOR_NAMES (sizeof(colorNames)/sizeof(ctmbstr)) -#define N_COLORS N_COLOR_NAMES - - -/* function prototypes */ -static void InitAccessibilityChecks( TidyDocImpl* doc, int level123 ); -static void FreeAccessibilityChecks( TidyDocImpl* doc ); - -static Bool GetRgb( ctmbstr color, int rgb[3] ); -static Bool CompareColors( const int rgbBG[3], const int rgbFG[3] ); -static int ctox( tmbchar ch ); - -/* -static void CheckMapAccess( TidyDocImpl* doc, Node* node, Node* front); -static void GetMapLinks( TidyDocImpl* doc, Node* node, Node* front); -static void CompareAnchorLinks( TidyDocImpl* doc, Node* front, int counter); -static void FindMissingLinks( TidyDocImpl* doc, Node* node, int counter); -*/ -static void CheckFormControls( TidyDocImpl* doc, Node* node ); -static void MetaDataPresent( TidyDocImpl* doc, Node* node ); -static void CheckEmbed( TidyDocImpl* doc, Node* node ); -static void CheckListUsage( TidyDocImpl* doc, Node* node ); - -/* - GetFileExtension takes a path and returns the extension - portion of the path (if any). -*/ - -static void GetFileExtension( ctmbstr path, tmbchar *ext, uint maxExt ) -{ - int i = TY_(tmbstrlen)(path) - 1; - - ext[0] = '\0'; - - do { - if ( path[i] == '/' || path[i] == '\\' ) - break; - else if ( path[i] == '.' ) - { - TY_(tmbstrncpy)( ext, path+i, maxExt ); - break; - } - } while ( --i > 0 ); -} - -/************************************************************************ -* IsImage -* -* Checks if the given filename is an image file. -* Returns 'yes' if it is, 'no' if it's not. -************************************************************************/ - -static Bool IsImage( ctmbstr iType ) -{ - uint i; - - /* Get the file extension */ - tmbchar ext[20]; - GetFileExtension( iType, ext, sizeof(ext) ); - - /* Compare it to the array of known image file extensions */ - for (i = 0; i < N_IMAGE_EXTS; i++) - { - if ( TY_(tmbstrcasecmp)(ext, imageExtensions[i]) == 0 ) - return yes; - } - - return no; -} - - -/*********************************************************************** -* IsSoundFile -* -* Checks if the given filename is a sound file. -* Returns 'yes' if it is, 'no' if it's not. -***********************************************************************/ - -static int IsSoundFile( ctmbstr sType ) -{ - uint i; - tmbchar ext[ 20 ]; - GetFileExtension( sType, ext, sizeof(ext) ); - - for (i = 0; i < N_AUDIO_EXTS; i++) - { - if ( TY_(tmbstrcasecmp)(ext, soundExtensions[i]) == 0 ) - return soundExtErrCodes[i]; - } - return 0; -} - - -/*********************************************************************** -* IsValidSrcExtension -* -* Checks if the 'SRC' value within the FRAME element is valid -* The 'SRC' extension must end in ".htm", ".html", ".shtm", ".shtml", -* ".cfm", ".cfml", ".asp", ".cgi", ".pl", or ".smil" -* -* Returns yes if it is, returns no otherwise. -***********************************************************************/ - -static Bool IsValidSrcExtension( ctmbstr sType ) -{ - uint i; - tmbchar ext[20]; - GetFileExtension( sType, ext, sizeof(ext) ); - - for (i = 0; i < N_FRAME_EXTS; i++) - { - if ( TY_(tmbstrcasecmp)(ext, frameExtensions[i]) == 0 ) - return yes; - } - return no; -} - - -/********************************************************************* -* IsValidMediaExtension -* -* Checks to warn the user that syncronized text equivalents are -* required if multimedia is used. -*********************************************************************/ - -static Bool IsValidMediaExtension( ctmbstr sType ) -{ - uint i; - tmbchar ext[20]; - GetFileExtension( sType, ext, sizeof(ext) ); - - for (i = 0; i < N_MEDIA_EXTS; i++) - { - if ( TY_(tmbstrcasecmp)(ext, mediaExtensions[i]) == 0 ) - return yes; - } - return no; -} - - -/************************************************************************ -* IsWhitespace -* -* Checks if the given string is all whitespace. -* Returns 'yes' if it is, 'no' if it's not. -************************************************************************/ - -static Bool IsWhitespace( ctmbstr pString ) -{ - Bool isWht = yes; - ctmbstr cp; - - for ( cp = pString; isWht && cp && *cp; ++cp ) - { - isWht = TY_(IsWhite)( *cp ); - } - return isWht; -} - -static Bool hasValue( AttVal* av ) -{ - return ( av && ! IsWhitespace(av->value) ); -} - -/*********************************************************************** -* IsPlaceholderAlt -* -* Checks to see if there is an image and photo place holder contained -* in the ALT text. -* -* Returns 'yes' if there is, 'no' if not. -***********************************************************************/ - -static Bool IsPlaceholderAlt( ctmbstr txt ) -{ - return ( strstr(txt, "image") != NULL || - strstr(txt, "photo") != NULL ); -} - - -/*********************************************************************** -* IsPlaceholderTitle -* -* Checks to see if there is an TITLE place holder contained -* in the 'ALT' text. -* -* Returns 'yes' if there is, 'no' if not. - -static Bool IsPlaceHolderTitle( ctmbstr txt ) -{ - return ( strstr(txt, "title") != NULL ); -} -***********************************************************************/ - - -/*********************************************************************** -* IsPlaceHolderObject -* -* Checks to see if there is an OBJECT place holder contained -* in the 'ALT' text. -* -* Returns 'yes' if there is, 'no' if not. -***********************************************************************/ - -static Bool IsPlaceHolderObject( ctmbstr txt ) -{ - return ( strstr(txt, "object") != NULL ); -} - - -/********************************************************** -* EndsWithBytes -* -* Checks to see if the ALT text ends with 'bytes' -* Returns 'yes', if true, 'no' otherwise. -**********************************************************/ - -static Bool EndsWithBytes( ctmbstr txt ) -{ - uint len = TY_(tmbstrlen)( txt ); - return ( len >= 5 && TY_(tmbstrcmp)(txt+len-5, "bytes") == 0 ); -} - - -/******************************************************* -* textFromOneNode -* -* Returns a list of characters contained within one -* text node. -*******************************************************/ - -static ctmbstr textFromOneNode( TidyDocImpl* doc, Node* node ) -{ - uint i; - uint x = 0; - tmbstr txt = doc->access.text; - - if ( node ) - { - /* Copy contents of a text node */ - for (i = node->start; i < node->end; ++i, ++x ) - { - txt[x] = doc->lexer->lexbuf[i]; - - /* Check buffer overflow */ - if ( x >= sizeof(doc->access.text)-1 ) - break; - } - } - - txt[x] = '\0'; - return txt; -} - - -/********************************************************* -* getTextNode -* -* Locates text nodes within a container element. -* Retrieves text that are found contained within -* text nodes, and concatenates the text. -*********************************************************/ - -static void getTextNode( TidyDocImpl* doc, Node* node ) -{ - tmbstr txtnod = doc->access.textNode; - - /* - Continues to traverse through container element until it no - longer contains any more contents - */ - - /* If the tag of the node is NULL, then grab the text within the node */ - if ( TY_(nodeIsText)(node) ) - { - uint i; - - /* Retrieves each character found within the text node */ - for (i = node->start; i < node->end; i++) - { - /* The text must not exceed buffer */ - if ( doc->access.counter >= TEXTBUF_SIZE-1 ) - return; - - txtnod[ doc->access.counter++ ] = doc->lexer->lexbuf[i]; - } - - /* Traverses through the contents within a container element */ - for ( node = node->content; node != NULL; node = node->next ) - getTextNode( doc, node ); - } -} - - -/********************************************************** -* getTextNodeClear -* -* Clears the current 'textNode' and reloads it with new -* text. The textNode must be cleared before use. -**********************************************************/ - -static tmbstr getTextNodeClear( TidyDocImpl* doc, Node* node ) -{ - /* Clears list */ - TidyClearMemory( doc->access.textNode, TEXTBUF_SIZE ); - doc->access.counter = 0; - - getTextNode( doc, node->content ); - return doc->access.textNode; -} - -/********************************************************** -* LevelX_Enabled -* -* Tell whether access "X" is enabled. -**********************************************************/ - -static Bool Level1_Enabled( TidyDocImpl* doc ) -{ - return doc->access.PRIORITYCHK == 1 || - doc->access.PRIORITYCHK == 2 || - doc->access.PRIORITYCHK == 3; -} -static Bool Level2_Enabled( TidyDocImpl* doc ) -{ - return doc->access.PRIORITYCHK == 2 || - doc->access.PRIORITYCHK == 3; -} -static Bool Level3_Enabled( TidyDocImpl* doc ) -{ - return doc->access.PRIORITYCHK == 3; -} - -/******************************************************** -* CheckColorAvailable -* -* Verify that information conveyed with color is -* available without color. -********************************************************/ - -static void CheckColorAvailable( TidyDocImpl* doc, Node* node ) -{ - if (Level1_Enabled( doc )) - { - if ( nodeIsIMG(node) ) - TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_IMAGE ); - - else if ( nodeIsAPPLET(node) ) - TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_APPLET ); - - else if ( nodeIsOBJECT(node) ) - TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_OBJECT ); - - else if ( nodeIsSCRIPT(node) ) - TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_SCRIPT ); - - else if ( nodeIsINPUT(node) ) - TY_(ReportAccessWarning)( doc, node, INFORMATION_NOT_CONVEYED_INPUT ); - } -} - -/********************************************************************* -* CheckColorContrast -* -* Checks elements for color contrast. Must have valid contrast for -* valid visibility. -* -* This logic is extremely fragile as it does not recognize -* the fact that color is inherited by many components and -* that BG and FG colors are often set separately. E.g. the -* background color may be set by for the body or a table -* or a cell. The foreground color may be set by any text -* element (p, h1, h2, input, textarea), either explicitly -* or by style. Ergo, this test will not handle most real -* world cases. It's a start, however. -*********************************************************************/ - -static void CheckColorContrast( TidyDocImpl* doc, Node* node ) -{ - int rgbBG[3] = {255,255,255}; /* Black text on white BG */ - - if (Level3_Enabled( doc )) - { - Bool gotBG = yes; - AttVal* av; - - /* Check for 'BGCOLOR' first to compare with other color attributes */ - for ( av = node->attributes; av; av = av->next ) - { - if ( attrIsBGCOLOR(av) ) - { - if ( hasValue(av) ) - gotBG = GetRgb( av->value, rgbBG ); - } - } - - /* - Search for COLOR attributes to compare with background color - Must have valid colour contrast - */ - for ( av = node->attributes; gotBG && av != NULL; av = av->next ) - { - uint errcode = 0; - if ( attrIsTEXT(av) ) - errcode = COLOR_CONTRAST_TEXT; - else if ( attrIsLINK(av) ) - errcode = COLOR_CONTRAST_LINK; - else if ( attrIsALINK(av) ) - errcode = COLOR_CONTRAST_ACTIVE_LINK; - else if ( attrIsVLINK(av) ) - errcode = COLOR_CONTRAST_VISITED_LINK; - - if ( errcode && hasValue(av) ) - { - int rgbFG[3] = {0, 0, 0}; /* Black text */ - - if ( GetRgb(av->value, rgbFG) && - !CompareColors(rgbBG, rgbFG) ) - { - TY_(ReportAccessWarning)( doc, node, errcode ); - } - } - } - } -} - - -/************************************************************** -* CompareColors -* -* Compares two RGB colors for good contrast. -**************************************************************/ -static int minmax( int i1, int i2 ) -{ - return MAX(i1, i2) - MIN(i1,i2); -} -static int brightness( const int rgb[3] ) -{ - return ((rgb[0]*299) + (rgb[1]*587) + (rgb[2]*114)) / 1000; -} - -static Bool CompareColors( const int rgbBG[3], const int rgbFG[3] ) -{ - int brightBG = brightness( rgbBG ); - int brightFG = brightness( rgbFG ); - - int diffBright = minmax( brightBG, brightFG ); - - int diffColor = minmax( rgbBG[0], rgbFG[0] ) - + minmax( rgbBG[1], rgbFG[1] ) - + minmax( rgbBG[2], rgbFG[2] ); - - return ( diffBright > 180 && - diffColor > 500 ); -} - - -/********************************************************************* -* GetRgb -* -* Gets the red, green and blue values for this attribute for the -* background. -* -* Example: If attribute is BGCOLOR="#121005" then red = 18, green = 16, -* blue = 5. -*********************************************************************/ - -static Bool GetRgb( ctmbstr color, int rgb[] ) -{ - uint x; - - /* Check if we have a color name */ - for (x = 0; x < N_COLORS; x++) - { - if ( strstr(colorNames[x], color) != NULL ) - { - rgb[0] = colorValues[x][0]; - rgb[1] = colorValues[x][1]; - rgb[2] = colorValues[x][2]; - return yes; - } - } - - /* - No color name so must be hex values - Is this a number in hexadecimal format? - */ - - /* Must be 7 characters in the RGB value (including '#') */ - if ( TY_(tmbstrlen)(color) == 7 && color[0] == '#' ) - { - rgb[0] = (ctox(color[1]) * 16) + ctox(color[2]); - rgb[1] = (ctox(color[3]) * 16) + ctox(color[4]); - rgb[2] = (ctox(color[5]) * 16) + ctox(color[6]); - return yes; - } - return no; -} - - - -/******************************************************************* -* ctox -* -* Converts a character to a number. -* Example: if given character is 'A' then returns 10. -* -* Returns the number that the character represents. Returns -1 if not a -* valid number. -*******************************************************************/ - -static int ctox( tmbchar ch ) -{ - if ( ch >= '0' && ch <= '9' ) - { - return ch - '0'; - } - else if ( ch >= 'a' && ch <= 'f' ) - { - return ch - 'a' + 10; - } - else if ( ch >= 'A' && ch <= 'F' ) - { - return ch - 'A' + 10; - } - return -1; -} - - -/*********************************************************** -* CheckImage -* -* Checks all image attributes for specific elements to -* check for validity of the values contained within -* the attributes. An appropriate warning message is displayed -* to indicate the error. -***********************************************************/ - -static void CheckImage( TidyDocImpl* doc, Node* node ) -{ - Bool HasAlt = no; - Bool HasIsMap = no; - Bool HasLongDesc = no; - Bool HasDLINK = no; - Bool HasValidHeight = no; - Bool HasValidWidthBullet = no; - Bool HasValidWidthHR = no; - Bool HasTriggeredMissingLongDesc = no; - - AttVal* av; - - if (Level1_Enabled( doc )) - { - /* Checks all image attributes for invalid values within attributes */ - for (av = node->attributes; av != NULL; av = av->next) - { - /* - Checks for valid ALT attribute. - The length of the alt text must be less than 150 characters - long. - */ - if ( attrIsALT(av) ) - { - if (av->value != NULL) - { - if ((TY_(tmbstrlen)(av->value) < 150) && - (IsPlaceholderAlt (av->value) == no) && - (IsPlaceHolderObject (av->value) == no) && - (EndsWithBytes (av->value) == no) && - (IsImage (av->value) == no)) - { - HasAlt = yes; - } - - else if (TY_(tmbstrlen)(av->value) > 150) - { - HasAlt = yes; - TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_TOO_LONG ); - } - - else if (IsImage (av->value) == yes) - { - HasAlt = yes; - TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_FILENAME); - } - - else if (IsPlaceholderAlt (av->value) == yes) - { - HasAlt = yes; - TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_PLACEHOLDER); - } - - else if (EndsWithBytes (av->value) == yes) - { - HasAlt = yes; - TY_(ReportAccessWarning)( doc, node, IMG_ALT_SUSPICIOUS_FILE_SIZE); - } - } - } - - /* - Checks for width values of 'bullets' and 'horizontal - rules' for validity. - - Valid pixel width for 'bullets' must be < 30, and > 150 for - horizontal rules. - */ - else if ( attrIsWIDTH(av) ) - { - /* Longdesc attribute needed if width attribute is not present. */ - if ( hasValue(av) ) - { - int width = atoi( av->value ); - if ( width < 30 ) - HasValidWidthBullet = yes; - - if ( width > 150 ) - HasValidWidthHR = yes; - } - } - - /* - Checks for height values of 'bullets' and horizontal - rules for validity. - - Valid pixel height for 'bullets' and horizontal rules - mustt be < 30. - */ - else if ( attrIsHEIGHT(av) ) - { - /* Longdesc attribute needed if height attribute not present. */ - if ( hasValue(av) && atoi(av->value) < 30 ) - HasValidHeight = yes; - } - - /* - Checks for longdesc and determines validity. - The length of the 'longdesc' must be > 1 - */ - else if ( attrIsLONGDESC(av) ) - { - if ( hasValue(av) && TY_(tmbstrlen)(av->value) > 1 ) - HasLongDesc = yes; - } - - /* - Checks for 'USEMAP' attribute. Ensures that - text links are provided for client-side image maps - */ - else if ( attrIsUSEMAP(av) ) - { - if ( hasValue(av) ) - doc->access.HasUseMap = yes; - } - - else if ( attrIsISMAP(av) ) - { - HasIsMap = yes; - } - } - - - /* - Check to see if a dLINK is present. The ANCHOR element must - be present following the IMG element. The text found between - the ANCHOR tags must be < 6 characters long, and must contain - the letter 'd'. - */ - if ( nodeIsA(node->next) ) - { - node = node->next; - - /* - Node following the anchor must be a text node - for dLINK to exist - */ - - if (node->content != NULL && (node->content)->tag == NULL) - { - /* Number of characters found within the text node */ - ctmbstr word = textFromOneNode( doc, node->content); - - if ((TY_(tmbstrcmp)(word,"d") == 0)|| - (TY_(tmbstrcmp)(word,"D") == 0)) - { - HasDLINK = yes; - } - } - } - - /* - Special case check for dLINK. This will occur if there is - whitespace between the and elements. Ignores - whitespace and continues check for dLINK. - */ - - if ( node->next && !node->next->tag ) - { - node = node->next; - - if ( nodeIsA(node->next) ) - { - node = node->next; - - /* - Node following the ANCHOR must be a text node - for dLINK to exist - */ - if (node->content != NULL && node->content->tag == NULL) - { - /* Number of characters found within the text node */ - ctmbstr word = textFromOneNode( doc, node->content ); - - if ((TY_(tmbstrcmp)(word, "d") == 0)|| - (TY_(tmbstrcmp)(word, "D") == 0)) - { - HasDLINK = yes; - } - } - } - } - - if ((HasAlt == no)&& - (HasValidWidthBullet == yes)&& - (HasValidHeight == yes)) - { - } - - if ((HasAlt == no)&& - (HasValidWidthHR == yes)&& - (HasValidHeight == yes)) - { - } - - if (HasAlt == no) - { - TY_(ReportAccessError)( doc, node, IMG_MISSING_ALT); - } - - if ((HasLongDesc == no)&& - (HasValidHeight ==yes)&& - ((HasValidWidthHR == yes)|| - (HasValidWidthBullet == yes))) - { - HasTriggeredMissingLongDesc = yes; - } - - if (HasTriggeredMissingLongDesc == no) - { - if ((HasDLINK == yes)&& - (HasLongDesc == no)) - { - TY_(ReportAccessWarning)( doc, node, IMG_MISSING_LONGDESC); - } - - if ((HasLongDesc == yes)&& - (HasDLINK == no)) - { - TY_(ReportAccessWarning)( doc, node, IMG_MISSING_DLINK); - } - - if ((HasLongDesc == no)&& - (HasDLINK == no)) - { - TY_(ReportAccessWarning)( doc, node, IMG_MISSING_LONGDESC_DLINK); - } - } - - if (HasIsMap == yes) - { - TY_(ReportAccessError)( doc, node, IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION); - - TY_(ReportAccessWarning)( doc, node, IMG_MAP_SERVER_REQUIRES_TEXT_LINKS); - } - } -} - - -/*********************************************************** -* CheckApplet -* -* Checks APPLET element to check for validity pertaining -* the 'ALT' attribute. An appropriate warning message is -* displayed to indicate the error. An appropriate warning -* message is displayed to indicate the error. If no 'ALT' -* text is present, then there must be alternate content -* within the APPLET element. -***********************************************************/ - -static void CheckApplet( TidyDocImpl* doc, Node* node ) -{ - Bool HasAlt = no; - Bool HasDescription = no; - - AttVal* av; - - if (Level1_Enabled( doc )) - { - /* Checks for attributes within the APPLET element */ - for (av = node->attributes; av != NULL; av = av->next) - { - /* - Checks for valid ALT attribute. - The length of the alt text must be > 4 characters in length - but must be < 150 characters long. - */ - - if ( attrIsALT(av) ) - { - if (av->value != NULL) - { - HasAlt = yes; - } - } - } - - if (HasAlt == no) - { - /* Must have alternate text representation for that element */ - if (node->content != NULL) - { - ctmbstr word = NULL; - - if ( node->content->tag == NULL ) - word = textFromOneNode( doc, node->content); - - if ( node->content->content != NULL && - node->content->content->tag == NULL ) - { - word = textFromOneNode( doc, node->content->content); - } - - if ( word != NULL && !IsWhitespace(word) ) - HasDescription = yes; - } - } - - if ( !HasDescription && !HasAlt ) - { - TY_(ReportAccessError)( doc, node, APPLET_MISSING_ALT ); - } - } -} - - -/******************************************************************* -* CheckObject -* -* Checks to verify whether the OBJECT element contains -* 'ALT' text, and to see that the sound file selected is -* of a valid sound file type. OBJECT must have an alternate text -* representation. -*******************************************************************/ - -static void CheckObject( TidyDocImpl* doc, Node* node ) -{ - Bool HasAlt = no; - Bool HasDescription = no; - - if (Level1_Enabled( doc )) - { - if ( node->content != NULL) - { - if ( node->content->type != TextNode ) - { - Node* tnode = node->content; - AttVal* av; - - for ( av=tnode->attributes; av; av = av->next ) - { - if ( attrIsALT(av) ) - { - HasAlt = yes; - break; - } - } - } - - /* Must have alternate text representation for that element */ - if ( !HasAlt ) - { - ctmbstr word = NULL; - - if ( TY_(nodeIsText)(node->content) ) - word = textFromOneNode( doc, node->content ); - - if ( word == NULL && - TY_(nodeIsText)(node->content->content) ) - { - word = textFromOneNode( doc, node->content->content ); - } - - if ( word != NULL && !IsWhitespace(word) ) - HasDescription = yes; - } - } - - if ( !HasAlt && !HasDescription ) - { - TY_(ReportAccessError)( doc, node, OBJECT_MISSING_ALT ); - } - } -} - - -/*************************************************************** -* CheckMissingStyleSheets -* -* Ensures that stylesheets are used to control the presentation. -***************************************************************/ - -static Bool CheckMissingStyleSheets( TidyDocImpl* doc, Node* node ) -{ - AttVal* av; - Node* content; - Bool sspresent = no; - - for ( content = node->content; - !sspresent && content != NULL; - content = content->next ) - { - sspresent = ( nodeIsLINK(content) || - nodeIsSTYLE(content) || - nodeIsFONT(content) || - nodeIsBASEFONT(content) ); - - for ( av = content->attributes; - !sspresent && av != NULL; - av = av->next ) - { - sspresent = ( attrIsSTYLE(av) || attrIsTEXT(av) || - attrIsVLINK(av) || attrIsALINK(av) || - attrIsLINK(av) ); - - if ( !sspresent && attrIsREL(av) ) - { - sspresent = AttrValueIs(av, "stylesheet"); - } - } - - if ( ! sspresent ) - sspresent = CheckMissingStyleSheets( doc, content ); - } - return sspresent; -} - - -/******************************************************************* -* CheckFrame -* -* Checks if the URL is valid and to check if a 'LONGDESC' is needed -* within the FRAME element. If a 'LONGDESC' is needed, the value must -* be valid. The URL must end with the file extension, htm, or html. -* Also, checks to ensure that the 'SRC' and 'TITLE' values are valid. -*******************************************************************/ - -static void CheckFrame( TidyDocImpl* doc, Node* node ) -{ - Bool HasTitle = no; - AttVal* av; - - doc->access.numFrames++; - - if (Level1_Enabled( doc )) - { - /* Checks for attributes within the FRAME element */ - for (av = node->attributes; av != NULL; av = av->next) - { - /* Checks if 'LONGDESC' value is valid only if present */ - if ( attrIsLONGDESC(av) ) - { - if ( hasValue(av) && TY_(tmbstrlen)(av->value) > 1 ) - { - doc->access.HasCheckedLongDesc++; - } - } - - /* Checks for valid 'SRC' value within the frame element */ - else if ( attrIsSRC(av) ) - { - if ( hasValue(av) && !IsValidSrcExtension(av->value) ) - { - TY_(ReportAccessError)( doc, node, FRAME_SRC_INVALID ); - } - } - - /* Checks for valid 'TITLE' value within frame element */ - else if ( attrIsTITLE(av) ) - { - if ( hasValue(av) ) - HasTitle = yes; - - if ( !HasTitle ) - { - if ( av->value == NULL || TY_(tmbstrlen)(av->value) == 0 ) - { - HasTitle = yes; - TY_(ReportAccessError)( doc, node, FRAME_TITLE_INVALID_NULL); - } - else - { - if ( IsWhitespace(av->value) && TY_(tmbstrlen)(av->value) > 0 ) - { - HasTitle = yes; - TY_(ReportAccessError)( doc, node, FRAME_TITLE_INVALID_SPACES ); - } - } - } - } - } - - if ( !HasTitle ) - { - TY_(ReportAccessError)( doc, node, FRAME_MISSING_TITLE); - } - - if ( doc->access.numFrames==3 && doc->access.HasCheckedLongDesc<3 ) - { - doc->access.numFrames = 0; - TY_(ReportAccessWarning)( doc, node, FRAME_MISSING_LONGDESC ); - } - } -} - - -/**************************************************************** -* CheckIFrame -* -* Checks if 'SRC' value is valid. Must end in appropriate -* file extension. -****************************************************************/ - -static void CheckIFrame( TidyDocImpl* doc, Node* node ) -{ - if (Level1_Enabled( doc )) - { - /* Checks for valid 'SRC' value within the IFRAME element */ - AttVal* av = attrGetSRC( node ); - if ( hasValue(av) ) - { - if ( !IsValidSrcExtension(av->value) ) - TY_(ReportAccessError)( doc, node, FRAME_SRC_INVALID ); - } - } -} - - -/********************************************************************** -* CheckAnchorAccess -* -* Checks that the sound file is valid, and to ensure that -* text transcript is present describing the 'HREF' within the -* ANCHOR element. Also checks to see ensure that the 'TARGET' attribute -* (if it exists) is not NULL and does not contain '_new' or '_blank'. -**********************************************************************/ - -static void CheckAnchorAccess( TidyDocImpl* doc, Node* node ) -{ - AttVal* av; - Bool HasDescription = no; - Bool HasTriggeredLink = no; - - /* Checks for attributes within the ANCHOR element */ - for ( av = node->attributes; av != NULL; av = av->next ) - { - if (Level1_Enabled( doc )) - { - /* Must be of valid sound file type */ - if ( attrIsHREF(av) ) - { - if ( hasValue(av) ) - { - tmbchar ext[ 20 ]; - GetFileExtension (av->value, ext, sizeof(ext) ); - - /* Checks to see if multimedia is used */ - if ( IsValidMediaExtension(av->value) ) - { - TY_(ReportAccessError)( doc, node, MULTIMEDIA_REQUIRES_TEXT ); - } - - /* - Checks for validity of sound file, and checks to see if - the file is described within the document, or by a link - that is present which gives the description. - */ - if ( TY_(tmbstrlen)(ext) < 6 && TY_(tmbstrlen)(ext) > 0 ) - { - int errcode = IsSoundFile( av->value ); - if ( errcode ) - { - if (node->next != NULL) - { - if (node->next->tag == NULL) - { - ctmbstr word = textFromOneNode( doc, node->next); - - /* Must contain at least one letter in the text */ - if (IsWhitespace (word) == no) - { - HasDescription = yes; - } - } - } - - /* Must contain text description of sound file */ - if ( !HasDescription ) - { - TY_(ReportAccessError)( doc, node, errcode ); - } - } - } - } - } - } - - if (Level2_Enabled( doc )) - { - /* Checks 'TARGET' attribute for validity if it exists */ - if ( attrIsTARGET(av) ) - { - if (AttrValueIs(av, "_new")) - { - TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW); - } - else if (AttrValueIs(av, "_blank")) - { - TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK); - } - } - } - } - - if (Level2_Enabled( doc )) - { - if ((node->content != NULL)&& - (node->content->tag == NULL)) - { - ctmbstr word = textFromOneNode( doc, node->content); - - if ((word != NULL)&& - (IsWhitespace (word) == no)) - { - if (TY_(tmbstrcmp) (word, "more") == 0) - { - HasTriggeredLink = yes; - } - - if (TY_(tmbstrcmp) (word, "click here") == 0) - { - TY_(ReportAccessWarning)( doc, node, LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE); - } - - if (HasTriggeredLink == no) - { - if (TY_(tmbstrlen)(word) < 6) - { - TY_(ReportAccessWarning)( doc, node, LINK_TEXT_NOT_MEANINGFUL); - } - } - - if (TY_(tmbstrlen)(word) > 60) - { - TY_(ReportAccessWarning)( doc, node, LINK_TEXT_TOO_LONG); - } - - } - } - - if (node->content == NULL) - { - TY_(ReportAccessWarning)( doc, node, LINK_TEXT_MISSING); - } - } -} - - -/************************************************************ -* CheckArea -* -* Checks attributes within the AREA element to -* determine if the 'ALT' text and 'HREF' values are valid. -* Also checks to see ensure that the 'TARGET' attribute -* (if it exists) is not NULL and does not contain '_new' -* or '_blank'. -************************************************************/ - -static void CheckArea( TidyDocImpl* doc, Node* node ) -{ - Bool HasAlt = no; - AttVal* av; - - /* Checks all attributes within the AREA element */ - for (av = node->attributes; av != NULL; av = av->next) - { - if (Level1_Enabled( doc )) - { - /* - Checks for valid ALT attribute. - The length of the alt text must be > 4 characters long - but must be less than 150 characters long. - */ - - if ( attrIsALT(av) ) - { - /* The check for validity */ - if (av->value != NULL) - { - HasAlt = yes; - } - } - } - - if (Level2_Enabled( doc )) - { - if ( attrIsTARGET(av) ) - { - if (AttrValueIs(av, "_new")) - { - TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_NEW); - } - else if (AttrValueIs(av, "_blank")) - { - TY_(ReportAccessWarning)( doc, node, NEW_WINDOWS_REQUIRE_WARNING_BLANK); - } - } - } - } - - if (Level1_Enabled( doc )) - { - /* AREA must contain alt text */ - if (HasAlt == no) - { - TY_(ReportAccessError)( doc, node, AREA_MISSING_ALT); - } - } -} - - -/*************************************************** -* CheckScript -* -* Checks the SCRIPT element to ensure that a -* NOSCRIPT section follows the SCRIPT. -***************************************************/ - -static void CheckScriptAcc( TidyDocImpl* doc, Node* node ) -{ - if (Level1_Enabled( doc )) - { - /* NOSCRIPT element must appear immediately following SCRIPT element */ - if ( node->next == NULL || !nodeIsNOSCRIPT(node->next) ) - { - TY_(ReportAccessError)( doc, node, SCRIPT_MISSING_NOSCRIPT); - } - } -} - - -/********************************************************** -* CheckRows -* -* Check to see that each table has a row of headers if -* a column of columns doesn't exist. -**********************************************************/ - -static void CheckRows( TidyDocImpl* doc, Node* node ) -{ - int numTR = 0; - int numValidTH = 0; - - doc->access.CheckedHeaders++; - - for (; node != NULL; node = node->next ) - { - numTR++; - if ( nodeIsTH(node->content) ) - { - doc->access.HasTH = yes; - if ( TY_(nodeIsText)(node->content->content) ) - { - ctmbstr word = textFromOneNode( doc, node->content->content); - if ( !IsWhitespace(word) ) - numValidTH++; - } - } - } - - if (numTR == numValidTH) - doc->access.HasValidRowHeaders = yes; - - if ( numTR >= 2 && - numTR > numValidTH && - numValidTH >= 2 && - doc->access.HasTH == yes ) - doc->access.HasInvalidRowHeader = yes; -} - - -/********************************************************** -* CheckColumns -* -* Check to see that each table has a column of headers if -* a row of columns doesn't exist. -**********************************************************/ - -static void CheckColumns( TidyDocImpl* doc, Node* node ) -{ - Node* tnode; - int numTH = 0; - Bool isMissingHeader = no; - - doc->access.CheckedHeaders++; - - /* Table must have row of headers if headers for columns don't exist */ - if ( nodeIsTH(node->content) ) - { - doc->access.HasTH = yes; - - for ( tnode = node->content; tnode; tnode = tnode->next ) - { - if ( nodeIsTH(tnode) ) - { - if ( TY_(nodeIsText)(tnode->content) ) - { - ctmbstr word = textFromOneNode( doc, tnode->content); - if ( !IsWhitespace(word) ) - numTH++; - } - } - else - { - isMissingHeader = yes; - } - } - } - - if ( !isMissingHeader && numTH > 0 ) - doc->access.HasValidColumnHeaders = yes; - - if ( isMissingHeader && numTH >= 2 ) - doc->access.HasInvalidColumnHeader = yes; -} - - -/***************************************************** -* CheckTH -* -* Checks to see if the header provided for a table -* requires an abbreviation. (only required if the -* length of the header is greater than 15 characters) -*****************************************************/ - -static void CheckTH( TidyDocImpl* doc, Node* node ) -{ - Bool HasAbbr = no; - ctmbstr word = NULL; - AttVal* av; - - if (Level3_Enabled( doc )) - { - /* Checks TH element for 'ABBR' attribute */ - for (av = node->attributes; av != NULL; av = av->next) - { - if ( attrIsABBR(av) ) - { - /* Value must not be NULL and must be less than 15 characters */ - if ((av->value != NULL)&& - (IsWhitespace (av->value) == no)) - { - HasAbbr = yes; - } - - if ((av->value == NULL)|| - (TY_(tmbstrlen)(av->value) == 0)) - { - HasAbbr = yes; - TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_NULL); - } - - if ((IsWhitespace (av->value) == yes)&& - (TY_(tmbstrlen)(av->value) > 0)) - { - HasAbbr = yes; - TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES); - } - } - } - - /* If the header is greater than 15 characters, an abbreviation is needed */ - word = textFromOneNode( doc, node->content); - - if ((word != NULL)&& - (IsWhitespace (word) == no)) - { - /* Must have 'ABBR' attribute if header is > 15 characters */ - if ((TY_(tmbstrlen)(word) > 15)&& - (HasAbbr == no)) - { - TY_(ReportAccessWarning)( doc, node, TABLE_MAY_REQUIRE_HEADER_ABBR); - } - } - } -} - - -/***************************************************************** -* CheckMultiHeaders -* -* Layout tables should make sense when linearized. -* TABLE must contain at least one TH element. -* This technique applies only to tables used for layout purposes, -* not to data tables. Checks for column of multiple headers. -*****************************************************************/ - -static void CheckMultiHeaders( TidyDocImpl* doc, Node* node ) -{ - Node* TNode; - Node* temp; - - Bool validColSpanRows = yes; - Bool validColSpanColumns = yes; - - int flag = 0; - - if (Level1_Enabled( doc )) - { - if (node->content != NULL) - { - TNode = node->content; - - /* - Checks for column of multiple headers found - within a data table. - */ - while (TNode != NULL) - { - if ( nodeIsTR(TNode) ) - { - if (TNode->content != NULL) - { - temp = TNode->content; - - /* The number of TH elements found within TR element */ - if (flag == 0) - { - while (temp != NULL) - { - /* - Must contain at least one TH element - within in the TR element - */ - if ( nodeIsTH(temp) ) - { - AttVal* av; - for (av = temp->attributes; av != NULL; av = av->next) - { - if ( attrIsCOLSPAN(av) - && (atoi(av->value) > 1) ) - validColSpanColumns = no; - - if ( attrIsROWSPAN(av) - && (atoi(av->value) > 1) ) - validColSpanRows = no; - } - } - - temp = temp->next; - } - - flag = 1; - } - } - } - - TNode = TNode->next; - } - - /* Displays HTML 4 Table Algorithm when multiple column of headers used */ - if (validColSpanRows == no) - { - TY_(ReportAccessWarning)( doc, node, DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS ); - TY_(DisplayHTMLTableAlgorithm)( doc ); - } - - if (validColSpanColumns == no) - { - TY_(ReportAccessWarning)( doc, node, DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS ); - TY_(DisplayHTMLTableAlgorithm)( doc ); - } - } - } -} - - -/**************************************************** -* CheckTable -* -* Checks the TABLE element to ensure that the -* table is not missing any headers. Must have either -* a row or column of headers. -****************************************************/ - -static void CheckTable( TidyDocImpl* doc, Node* node ) -{ - Node* TNode; - Node* temp; - - tmbstr word = NULL; - - int numTR = 0; - - Bool HasSummary = no; - Bool HasCaption = no; - - if (Level3_Enabled( doc )) - { - AttVal* av; - /* Table must have a 'SUMMARY' describing the purpose of the table */ - for (av = node->attributes; av != NULL; av = av->next) - { - if ( attrIsSUMMARY(av) ) - { - if ( hasValue(av) ) - { - HasSummary = yes; - - if (AttrContains(av, "summary") && - AttrContains(av, "table")) - { - TY_(ReportAccessError)( doc, node, TABLE_SUMMARY_INVALID_PLACEHOLDER ); - } - } - - if ( av->value == NULL || TY_(tmbstrlen)(av->value) == 0 ) - { - HasSummary = yes; - TY_(ReportAccessError)( doc, node, TABLE_SUMMARY_INVALID_NULL ); - } - else if ( IsWhitespace(av->value) && TY_(tmbstrlen)(av->value) > 0 ) - { - HasSummary = yes; - TY_(ReportAccessError)( doc, node, TABLE_SUMMARY_INVALID_SPACES ); - } - } - } - - /* TABLE must have content. */ - if (node->content == NULL) - { - TY_(ReportAccessError)( doc, node, DATA_TABLE_MISSING_HEADERS); - - return; - } - } - - if (Level1_Enabled( doc )) - { - /* Checks for multiple headers */ - CheckMultiHeaders( doc, node ); - } - - if (Level2_Enabled( doc )) - { - /* Table must have a CAPTION describing the purpose of the table */ - if ( nodeIsCAPTION(node->content) ) - { - TNode = node->content; - - if (TNode->content && TNode->content->tag == NULL) - { - word = getTextNodeClear( doc, TNode); - } - - if ( !IsWhitespace(word) ) - { - HasCaption = yes; - } - } - - if (HasCaption == no) - { - TY_(ReportAccessError)( doc, node, TABLE_MISSING_CAPTION); - } - } - - - if (node->content != NULL) - { - if ( nodeIsCAPTION(node->content) && nodeIsTR(node->content->next) ) - { - CheckColumns( doc, node->content->next ); - } - else if ( nodeIsTR(node->content) ) - { - CheckColumns( doc, node->content ); - } - } - - if ( ! doc->access.HasValidColumnHeaders ) - { - if (node->content != NULL) - { - if ( nodeIsCAPTION(node->content) && nodeIsTR(node->content->next) ) - { - CheckRows( doc, node->content->next); - } - else if ( nodeIsTR(node->content) ) - { - CheckRows( doc, node->content); - } - } - } - - - if (Level3_Enabled( doc )) - { - /* Suppress warning for missing 'SUMMARY for HTML 2.0 and HTML 3.2 */ - if (HasSummary == no) - { - TY_(ReportAccessError)( doc, node, TABLE_MISSING_SUMMARY); - } - } - - if (Level2_Enabled( doc )) - { - if (node->content != NULL) - { - temp = node->content; - - while (temp != NULL) - { - if ( nodeIsTR(temp) ) - { - numTR++; - } - - temp = temp->next; - } - - if (numTR == 1) - { - TY_(ReportAccessWarning)( doc, node, LAYOUT_TABLES_LINEARIZE_PROPERLY); - } - } - - if ( doc->access.HasTH ) - { - TY_(ReportAccessWarning)( doc, node, LAYOUT_TABLE_INVALID_MARKUP); - } - } - - if (Level1_Enabled( doc )) - { - if ( doc->access.CheckedHeaders == 2 ) - { - if ( !doc->access.HasValidRowHeaders && - !doc->access.HasValidColumnHeaders && - !doc->access.HasInvalidRowHeader && - !doc->access.HasInvalidColumnHeader ) - { - TY_(ReportAccessError)( doc, node, DATA_TABLE_MISSING_HEADERS); - } - - if ( !doc->access.HasValidRowHeaders && - doc->access.HasInvalidRowHeader ) - { - TY_(ReportAccessError)( doc, node, DATA_TABLE_MISSING_HEADERS_ROW); - } - - if ( !doc->access.HasValidColumnHeaders && - doc->access.HasInvalidColumnHeader ) - { - TY_(ReportAccessError)( doc, node, DATA_TABLE_MISSING_HEADERS_COLUMN); - } - } - } -} - - -/*************************************************** -* CheckASCII -* -* Checks for valid text equivalents for XMP and PRE -* elements for ASCII art. Ensures that there is -* a skip over link to skip multi-lined ASCII art. -***************************************************/ - -static void CheckASCII( TidyDocImpl* doc, Node* node ) -{ - Node* temp1; - Node* temp2; - - tmbstr skipOver = NULL; - Bool IsAscii = no; - int HasSkipOverLink = 0; - - uint i, x; - int newLines = -1; - tmbchar compareLetter; - int matchingCount = 0; - AttVal* av; - - if (Level1_Enabled( doc ) && node->content) - { - /* - Checks the text within the PRE and XMP tags to see if ascii - art is present - */ - for (i = node->content->start + 1; i < node->content->end; i++) - { - matchingCount = 0; - - /* Counts the number of lines of text */ - if (doc->lexer->lexbuf[i] == '\n') - { - newLines++; - } - - compareLetter = doc->lexer->lexbuf[i]; - - /* Counts consecutive character matches */ - for (x = i; x < i + 5; x++) - { - if (doc->lexer->lexbuf[x] == compareLetter) - { - matchingCount++; - } - - else - { - break; - } - } - - /* Must have at least 5 consecutive character matches */ - if (matchingCount >= 5) - { - break; - } - } - - /* - Must have more than 6 lines of text OR 5 or more consecutive - letters that are the same for there to be ascii art - */ - if (newLines >= 6 || matchingCount >= 5) - { - IsAscii = yes; - } - - /* Checks for skip over link if ASCII art is present */ - if (IsAscii == yes) - { - if (node->prev != NULL && node->prev->prev != NULL) - { - temp1 = node->prev->prev; - - /* Checks for 'HREF' attribute */ - for (av = temp1->attributes; av != NULL; av = av->next) - { - if ( attrIsHREF(av) && hasValue(av) ) - { - skipOver = av->value; - HasSkipOverLink++; - } - } - } - } - } - - if (Level2_Enabled( doc )) - { - /* - Checks for A element following PRE to ensure proper skipover link - only if there is an A element preceding PRE. - */ - if (HasSkipOverLink == 1) - { - if ( nodeIsA(node->next) ) - { - temp2 = node->next; - - /* Checks for 'NAME' attribute */ - for (av = temp2->attributes; av != NULL; av = av->next) - { - if ( attrIsNAME(av) && hasValue(av) ) - { - /* - Value within the 'HREF' attribute must be the same - as the value within the 'NAME' attribute for valid - skipover. - */ - if ( strstr(skipOver, av->value) != NULL ) - { - HasSkipOverLink++; - } - } - } - } - } - - if (IsAscii == yes) - { - TY_(ReportAccessError)( doc, node, ASCII_REQUIRES_DESCRIPTION); - if (Level3_Enabled( doc ) && (HasSkipOverLink < 2)) - TY_(ReportAccessError)( doc, node, SKIPOVER_ASCII_ART); - } - - } -} - - -/*********************************************************** -* CheckFormControls -* -*
must have valid 'FOR' attribute, and