SDMRequesting protocol

Deprecated. Defines the connectivity APIs Protocol to be adapted by Connectivity classes

Syntax

@protocol SDMRequesting

Derived classes

Members

All members of SDMRequesting, including inherited members.

Methods
Method Description
- (void) addBasicAuthenticationHeaderWithUsername: (NSString *) theUsername andPassword: (NSString *) thePassword Constructs a basic authentication header from the username and password supplied, and adds it to the request headers Used when shouldPresentCredentialsBeforeChallenge is YES.
- (void) addRequestHeader: (NSString *) header value: (NSString *) value Adds a custom header to the request.
- (void) appendPostData: (NSData *) data Adds data to the post body.
- (void) appendPostDataFromFile: (NSString *) file Adds data to the post body from a file.
- (void) applyAuthorizationHeader  
- (void) applyCookieHeader Called during buildRequestHeaders and after a redirect to create a cookie header from request cookies and the global store.
+ (unsigned long) averageBandwidthUsedPerSecond Returns a rough average (for the last 5 seconds) of how much bandwidth is being used, in bytes.
+ (NSString *) base64forData: (NSData *) theData Base64 encodes the provided NSData*.
- (void) buildPostBody Creates the post body.
- (void) buildRequestHeaders Populates the request headers dictionary.
- (void) cancelAuthentication Should be called by delegates when they wish to cancel authentication and stop.
+ (void) clearSession  
+ (const NSDataWritingOptions) dataWritingOptions Returns a mask which determines whether the data should be stored in encrypted form.
+ (NSDate *) dateFromRFC1123String: (NSString *) string Returns a date from a string in RFC1123 format.
+ (NSString *) decodeBase64: (NSString *) string_in Decodes a base64 encoded string.
+ (id< SDMCacheDelegate >) defaultCache Returns the default download cache or nil if none set at class level.
- (void) enableTracing: (BOOL) value_in Switches traceability status, the default is NO If tracing is enabled, "SAP-PASSPORT" and "X-CorrelationID" headers are set and filled with values to enable SAP Passport functionality data is gathered to compose the Business Transaction XML, which can be uploaded via SUPE2ETraceController sendXML API.
+ (void) enableXCSRF: (BOOL) enable Enable XSRF support for the session of the application.
- (void) failWithError: (NSError *) theError Called when a request fails, and lets the delegate know via didFailSelector.
+ (NSDictionary *) fileProtectionAttributes Returns a attributes dictionary used for encrypted file storage or nil is file protection has been explicitely disabled.
+ (NSInteger) getMaxConcurrentHTTPRequestCount Returns the maximum number of SDMHTTPRequest threads which can be executed in parallel.
- (void) handleNetworkEvent: (CFStreamEventType) type Handles network events as they occur.
- (id< SDMRequesting >) HEADRequest Used by NetworkQueue to create a HEAD request appropriate for this request with the same headers (though you can use it yourself)
+ (void) hideNetworkActivityIndicator Hides the network activity spinner.
+ (void) incrementBandwidthUsedInLastSecond: (unsigned long) bytes Used internally to record bandwidth use, and by InputStreams when uploading. It's probably best if you don't mess with this.
- (void) incrementDownloadSizeBy: (long long) length Called when we get a content-length header and shouldResetDownloadProgress is true.
- (void) incrementUploadSizeBy: (long long) length Called when a request starts and shouldResetUploadProgress is true Also called (with a negative length) to remove the size of the underlying buffer used for uploading.
- (id) initWithURL: (NSURL *) newURL Should be an HTTP or HTTPS url, may include username and password if appropriate.
+ (BOOL) isBandwidthThrottled Returns YES is bandwidth throttling is currently in use.
+ (BOOL) isNetworkInUse Indicates whether there are running requests.
+ (BOOL) isNetworkReachableViaWWAN Returns YES when an iPhone OS device is connected via WWAN, false when connected via WIFI or not connected.
- (BOOL) isResponseCompressed Returns true if the response was gzip compressed Usage id<SDMRequesting> m_Request = [SDMRequestBuilder requestWithURL:url]; ...
- (BOOL) isTracingEnabled Returns tracing status (default is NO)
+ (unsigned long) maxBandwidthPerSecond The maximum number of bytes ALL requests can send / receive in a second This is a rough figure.
+ (unsigned long) maxUploadReadLength Returns the maximum amount of data we can read as part of the current measurement period, and sleeps this thread if our allowance is used up.
+ (NSString *) mimeTypeForFileAtPath: (NSString *) path  
+ (void) performSelector: (SEL) selector onTarget: (id *) target withObject: (id) object amount: (void *) amount Helper method used for performing invocations on the main thread (used for progress)
- (void) performThrottling Perform bandwidth throttling.
+ (void) removeCredentialsForHost: (NSString *) host port: (int) port protocol: (NSString *) protocol realm: (NSString *) realm Deletes host credentials from the keychain.
+ (void) removeCredentialsForProxy: (NSString *) host port: (int) port realm: (NSString *) realm Deletes proxy credentials from the keychain.
- (void) removeUploadProgressSoFar Called when authorization is needed, as we only find out we don't have permission to something when the upload is complete.
+ (id) requestWithURL: (NSURL *) newURL Convenience constructor with url.
+ (id) requestWithURL: (NSURL *) newURL usingCache: (id< SDMCacheDelegate >) cache Convenience constructor with url and cache.
+ (id) requestWithURL: (NSURL *) newURL usingCache: (id< SDMCacheDelegate >) cache andCachePolicy: (CachePolicy) policy Convenience constructor with url, cache and cache policy.
- (NSData *) responseData Response data, automatically uncompressed where appropriate.
- (NSString *) responseString Returns the contents of the result as an NSString (not appropriate for binary data - used responseData instead)
- (void) retryUsingSuppliedCredentials Wakes up (unlocks) the request thread so it can resume the request.
+ (void) saveCredentials: (NSURLCredential *) credentials forHost: (NSString *) host port: (int) port protocol: (NSString *) protocol realm: (NSString *) realm Saves host credentials to the keychain.
+ (void) saveCredentials: (NSURLCredential *) credentials forProxy: (NSString *) host port: (int) port realm: (NSString *) realm Saves proxy credentials to the keychain.
- (void) saveCredentialsToKeychain: (NSDictionary *) newCredentials Saves credentials for this request to the keychain.
+ (NSURLCredential *) savedCredentialsForHost: (NSString *) host port: (int) port protocol: (NSString *) protocol realm: (NSString *) realm Returns host credentials from the keychain.
+ (NSURLCredential *) savedCredentialsForProxy: (NSString *) host port: (int) port protocol: (NSString *) protocol realm: (NSString *) realm Returns proxy credentials from the keychain.
- (void) sendE2ETraceXML: (NSURL *) toBaseURL Posts the SAP E2E Trace XML to the given url.
- (void) setClientCertificateIdentity: (SecIdentityRef) anIdentity Sets the identity reference (X.509 certificate + private key) for this request; used for secure connections.
+ (void) setDefaultCache: (id< SDMCacheDelegate >) cache Configures a default download cache which applies for all requests.
- (void) setEtag: (NSString *) etag withMatchType: (EtagMatchType) matchType Add If-Match or If-None-Match or If-Range header*.
+ (void) setMaxBandwidthPerSecond: (unsigned long) bytes Sets the maximum number of bytes ALL requests can send / receive in a second.
+ (void) setMaxConcurrentHTTPRequestCount: (const unsigned char) cnt Sets the maximum number of SDMHTTPRequest threads which can run at once.
+ (void) setProtectionEnabled: (BOOL) flag_in Controls whether the download cache should store files using protection.
+ (void) setShouldThrottleBandwidthForWWAN: (BOOL) throttle SDMHTTPRequest can automatically turn throttling on and off as the connection type changes between WWAN and WiFi Set to YES to automatically turn on throttling when WWAN is connected, and automatically turn it off when it isn't.
+ (void) setShouldUpdateNetworkActivityIndicator: (BOOL) shouldUpdate Controls whether the request should take over updating the network activity indicator.
+ (NSOperationQueue *) sharedQueue Returns the shared queue.
+ (void) showNetworkActivityIndicator Shows the network activity spinner.
- (void) startAsynchronous Runs request in the background The client should register callback selector in order to get notified about various events (failure, completion, etc.) Usage id<SDMRequesting> m_Request = [SDMRequestBuilder requestWithURL:url]; [m_Request setDelegate:self]; [m_Request setDidFinishSelector:(serviceDocFetchComplete:)]; [m_Request setDidFailSelector:(serviceDocFetchFailed:)]; [m_Request startAsynchronous];
- (void) startSynchronous Runs a request synchronously, and returns control when the request completes or fails Usage id<SDMRequesting> m_Request = [SDMRequestBuilder requestWithURL:url]; ...
+ (void) throttleBandwidthForWWANUsingLimit: (unsigned long) limit Turns on throttling automatically when WWAN is connected using a custom limit, and turns it off automatically when it isn't.
- (void) updateDownloadProgress Updates download progress (notifies the queue and/or downloadProgressDelegate of this request)
+ (void) updateProgressIndicator: (id *) indicator withProgress: (unsigned long long) progress ofTotal: (unsigned long long) total Helper method for interacting with progress indicators to abstract the details of different APIS (NSProgressIndicator and UIProgressView)
- (void) updateProgressIndicators Updates the progress delegates.
- (void) updateUploadProgress Updates upload progress (notifies the queue and/or uploadProgressDelegate of this request)