ipodimport.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * ipodimport.h
  3. * libipodimport
  4. *
  5. * iPod library import support library
  6. * Created by Arpad Goretity on 24/09/2012.
  7. *
  8. * Licensed under the 3-clause BSD License
  9. * (See LICENSE for furhter information)
  10. */
  11. #ifndef __IPODIMPORT_H__
  12. #define __IPODIMPORT_H__
  13. @interface SSDownloadStatus : NSObject {
  14. int padding[64]; // 44 = 0x2c
  15. // SSDownloadPhase *_activePhase; // 4 = 0x4
  16. BOOL _contentRestricted; // 8 = 0x8
  17. NSError *_error; // 12 = 0xc
  18. BOOL _failed; // 16 = 0x10
  19. BOOL _paused; // 17 = 0x11
  20. }
  21. @property(retain, nonatomic) NSError *error;
  22. @property(assign, nonatomic, getter=isFailed) BOOL failed;
  23. @property(readonly, assign, nonatomic) float percentComplete;
  24. @end
  25. @interface SSDownload : NSObject {
  26. int padding[128]; // 44 = 0x2c
  27. }
  28. @property(retain, nonatomic) SSDownloadStatus *status;
  29. - (void)setDownloadHandler:(id)handler completionBlock:(id)block;
  30. - (id)initWithDownloadMetadata:(id)downloadMetadata;
  31. @end
  32. #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
  33. #define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
  34. #define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
  35. #define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
  36. #define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
  37. @interface SSDownloadMetadata : NSObject
  38. {
  39. int padding[128]; // 44 = 0x2c
  40. }
  41. @property (copy) NSString* bundleIdentifier;
  42. @property(retain) NSString *genre;
  43. @property(retain) NSString *title;
  44. @property(retain) NSDate *releaseDate;
  45. @property(retain) NSURL *primaryAssetURL;
  46. @property(copy) NSString *artistName;
  47. @property(retain) id purchaseDate;
  48. @property(retain) id collectionName;
  49. @property(retain) NSString *copyright;
  50. @property(retain) NSString *kind;
  51. @property(retain) id viewStoreItemURL;
  52. - (id)initWithDictionary:(id)dictionary;
  53. @end
  54. @interface IPodLibraryItem : NSObject
  55. @property (copy) SSDownloadMetadata* itemMetadata;
  56. @property (copy) NSString* itemDownloadIdentifier;
  57. @end
  58. @interface SSDownloadManager : NSObject {
  59. int padding[128]; // 44 = 0x2c
  60. }
  61. @property(readonly, assign) NSArray *activeDownloads; // G=0x2babb5e5;
  62. @property(readonly, assign) NSArray *downloads; // G=0x2babbb19;
  63. @end
  64. @interface SSDownloadQueue : NSObject
  65. {
  66. int padding[128]; // 44 = 0x2c
  67. }
  68. @property(readonly, assign) SSDownloadManager *downloadManager;
  69. + (id)mediaDownloadKinds;
  70. - (id)initWithDownloadKinds:(id)downloadKinds;
  71. - (BOOL)addDownload:(id)download;
  72. @end
  73. #endif /* __IPODIMPORT_H__ */