This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
/
GetITVListings.h
106 lines (85 loc) · 3.01 KB
/
GetITVListings.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
//
// GetITVListings.h
// ITVLoader
//
// Created by LFS on 6/25/16.
//
#ifndef GetITVListings_h
#define GetITVListings_h
#import "AppController.h"
@interface ProgrammeData : NSObject <NSCoding>
{
int afield;
int seriesNumber;
int episodeNumber;
int isNew;
}
@property NSString *programmeName;
@property NSString *productionId;
@property NSString *programmeURL;
@property int numberEpisodes;
@property int forceCacheUpdate;
@property NSTimeInterval timeIntDateLastAired;
@property int timeAddedInt;
- (id)initWithName:(NSString *)name andPID:(NSString *)pid andURL:(NSString *)url andNUMBEREPISODES:(int)numberEpisodes andDATELASTAIRED:(NSTimeInterval)timeIntDateLastAired;
- (id)addProgrammeSeriesInfo:(int)seriesNumber :(int)episodeNumber;
- (id)makeNew;
- (id)forceCacheUpdateOn;
-(void)fixProgrammeName;
@end
@interface ProgrammeHistoryObject : NSObject <NSCoding>
{
// long sortKey;
}
@property long sortKey;
@property NSString *programmeName;
@property NSString *dateFound;
@property NSString *tvChannel;
@property NSString *networkName;
- (id)initWithName:(NSString *)name andTVChannel:(NSString *)aTVChannel andDateFound:(NSString *)dateFound andSortKey:(NSUInteger)sortKey andNetworkName:(NSString *)networkName;
@end
@interface NewProgrammeHistory : NSObject
{
NSString *historyFilePath;
NSMutableArray *programmeHistoryArray;
BOOL itemsAdded;
NSUInteger timeIntervalSince1970UTC;
NSString *dateFound;
}
+(NewProgrammeHistory*)sharedInstance;
-(id)init;
-(void)addToNewProgrammeHistory:(NSString *)name andTVChannel:(NSString *)tvChannel andNetworkName:(NSString *)networkName;
-(void)flushHistoryToDisk;
-(NSMutableArray *)getHistoryArray;
@end
@interface GetITVShows : NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate>
{
NSUInteger myQueueSize;
NSUInteger myQueueLeft;
NSURLSession *mySession;
NSString *htmlData;
NSMutableArray *boughtForwardProgrammeArray;
NSMutableArray *todayProgrammeArray;
NSMutableArray *carriedForwardProgrammeArray;
NSString *filesPath;
NSString *programmesFilePath;
BOOL getITVShowRunning;
BOOL forceUpdateAllProgrammes;
NSTimeInterval timeIntervalSince1970UTC;
int intTimeThisRun;
LogController *logger;
NSNotificationCenter *nc;
}
@property NSOperationQueue *myOpQueue;
-(id)init;
-(void)itvUpdateWithLogger:(LogController *)theLogger;;
-(void)forceITVUpdateWithLogger:(LogController *)theLogger;
-(id)requestTodayListing;
-(BOOL)createTodayProgrammeArray;
-(void)requestProgrammeEpisodes:(ProgrammeData *)myProgramme;
-(void)processProgrammeEpisodesData:(ProgrammeData *)myProgramm :(NSString *)myHtmlData;
-(void)processCarriedForwardProgrammes;
-(int)searchForProductionId:(NSString *)productionId inProgrammeArray:(NSMutableArray *)programmeArray;
-(void)endOfRun;
@end
#endif /* GetITVListings_h */