OpenTV Player SDK For iOS  version 2.30.0
Download.h
Go to the documentation of this file.
1
13#import <Foundation/Foundation.h>
14#import "Asset.h"
15
31typedef NS_ENUM(NSInteger, NMPDownloadState){
34
37
40
43
46
49
51 STATE_FAILED = 200
52};
53
57typedef NS_ENUM(NSInteger, NMPDownloadError){
60
63
66
70
73
76
79
82
85
88};
89
90
115@interface NMPDownload : NSObject
116
121@property (readonly,copy) NSString* UUID;
122
127@property (readonly) NMPDownloadState state;
128
133@property (readonly) NMPDownloadError error;
134
139@property (readonly) NSString* URI;
140
145@property (readonly) NSString* localURI;
146
151@property (readonly) unsigned int startTime;
152
156@property (readonly) unsigned int timeElapsed;
157
162@property (readonly) unsigned int timeRemaining;
163
168@property (readonly) unsigned int bitrateEstimate;
169
176@property (readonly) NMPAsset* asset;
177
178- (NMPDownload*)initWithDownload:(NMPDownload*)other;
179
180@end
181
Created on 12/08/2014.
NMPDownloadState
The download state of a NMPDownload object.
Definition: Download.h:31
@ STATE_REFRESHING
Download is refreshing.
Definition: Download.h:45
@ STATE_SUCCESSFUL
Download is successful.
Definition: Download.h:48
@ STATE_PAUSED
Download is paused.
Definition: Download.h:42
@ STATE_FAILED
Download is failed.
Definition: Download.h:51
@ STATE_PREPARING
Download is preparing.
Definition: Download.h:33
@ STATE_PREPARED
Download is prepared.
Definition: Download.h:36
@ STATE_RUNNING
Download is running.
Definition: Download.h:39
NMPDownloadError
The download error of a NMPDownload object.
Definition: Download.h:57
@ ERROR_HTTP_403
HTTP code 403 received and couldn't be handled by the downloader.
Definition: Download.h:87
@ ERROR_MISFORMATTED_MAINFEST
The manifest is misformatted and doesn't comply to specification.
Definition: Download.h:65
@ ERROR_UNKNOWN
An unknown or unexpected error occured.
Definition: Download.h:59
@ ERROR_UNSUPPORTED_MAINFEST
Unsupported manifest version or features of a given protocol.
Definition: Download.h:69
@ ERROR_MISFORMATTED_URI
The remote URI is misformatted and can't be used.
Definition: Download.h:62
@ ERROR_HTTP_TOO_MANY_REDIRECTS
The download requests hopped over too many redirect.
Definition: Download.h:78
@ ERROR_LIVE_CONTENT_NOT_SUPPORTED
Live content downloading is not supported.
Definition: Download.h:84
@ ERROR_HTTP_UNHANDLED_CODE
Some unexpected HTTP code were received and couldn't be handled by the downloader.
Definition: Download.h:72
@ ERROR_HTTP_DATA_ERROR
Some unexpected HTTP data error was observed, such as missing or incomplete payload,...
Definition: Download.h:75
@ ERROR_INSUFFICIENT_SPACE
The storage path points to a device lacking space.
Definition: Download.h:81
NMPAsset aggregates all the information pertaining to an adaptive streaming media asset.
Definition: Asset.h:25
This class aggregates all the information pertaining to the download of a media asset.
Definition: Download.h:116
unsigned int timeRemaining
Returns an estimate of the time remaining to complete the download, in milliseconds.
Definition: Download.h:162
NMPAsset * asset
Returns the Asset object of the download.
Definition: Download.h:176
NMPDownloadState state
Returns the state of the download.
Definition: Download.h:127
NSString * URI
Returns the URI of the content.
Definition: Download.h:139
unsigned int bitrateEstimate
Get an estimate of the download bitrate, This value will fluctuate depending on the network condition...
Definition: Download.h:168
unsigned int timeElapsed
Returns the time elapsed downloading, in milliseconds.
Definition: Download.h:156
NSString * localURI
Returns the local URI of the content.
Definition: Download.h:145
NMPDownloadError error
Returns the failure reason of the download.
Definition: Download.h:133
NSString * UUID
Returns the Universal Unique ID attributed to this download.
Definition: Download.h:121
unsigned int startTime
Returns the start time of the download, in seconds since 1970.
Definition: Download.h:151