Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 94 lines (76 sloc) 2.793 kB
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
1 //
2 // LFWebService.h
2283d20 renamed Last.fm.framework to Scribbler
Matt Patenaude authored
3 // Scribbler
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
4 //
5 // Created by Matt Patenaude on 11/5/09.
383b0a5 updated copyright statements to be more correct
Matt Patenaude authored
6 // Copyright (C) 2009 {13bold}.
0503644 added MIT license to all source files and fixed copyrights
Matt Patenaude authored
7 //
8 // Permission is hereby granted, free of charge, to any person obtaining a copy
9 // of this software and associated documentation files (the "Software"), to deal
10 // in the Software without restriction, including without limitation the rights
11 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 // copies of the Software, and to permit persons to whom the Software is
13 // furnished to do so, subject to the following conditions:
14 //
15 // The above copyright notice and this permission notice shall be included in
16 // all copies or substantial portions of the Software.
17 //
18 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 // THE SOFTWARE.
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
25 //
26
1d8e97f switched Cocoa imports to Foundation for use on iPhone OS
Matt Patenaude authored
27 #import <Foundation/Foundation.h>
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
28
29
f9e0d48 added property for connected state and moved a few properties into th…
Matt Patenaude authored
30 // Connection states
31 typedef enum _LFConnectionState {
32 LFNotConnected = 0,
33 LFConnected = 1,
34 LFConnecting = 2
35 } LFConnectionState;
36
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
37 // Forward declarations
38 @class LFTrack;
9c1c632 created request handling hierarchy
Matt Patenaude authored
39 @class LFRequest;
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
40
41 @interface LFWebService : NSObject {
42 id delegate;
43 NSString *APIKey;
44 NSString *sharedSecret;
45 NSString *clientID;
2e3302e completed scrobbler handshake mechanism
Matt Patenaude authored
46 NSString *clientVersion;
d8323df more or less finished LFTrack, made minor modifications to LFPlaySession
Matt Patenaude authored
47
4b4b301 got very basics of authorization working properly
Matt Patenaude authored
48 NSString *pendingToken;
a76902d relatively finished with the LFWebService interface
Matt Patenaude authored
49 NSString *sessionKey;
4b4b301 got very basics of authorization working properly
Matt Patenaude authored
50 NSString *sessionUser;
a76902d relatively finished with the LFWebService interface
Matt Patenaude authored
51
d8323df more or less finished LFTrack, made minor modifications to LFPlaySession
Matt Patenaude authored
52 LFTrack *currentTrack;
53 NSMutableArray *requestQueue;
9c1c632 created request handling hierarchy
Matt Patenaude authored
54
55 BOOL runningRequest;
529d836 finished demo app UI, added support for all operations, added control…
Matt Patenaude authored
56 BOOL autoScrobble;
313fa40 added timer to empty the request queue every 2:30, just in case
Matt Patenaude authored
57
58 NSTimer *queueTimer;
f9e0d48 added property for connected state and moved a few properties into th…
Matt Patenaude authored
59
60 LFConnectionState state;
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
61 }
62
63 // Initializers
64 + (id)sharedWebService;
65
66 // Properties
67 @property(assign) id delegate;
f9e0d48 added property for connected state and moved a few properties into th…
Matt Patenaude authored
68 @property(assign,readonly) LFConnectionState state;
8775001 completed LFPlaySession, configured target header visibility, designe…
Matt Patenaude authored
69 @property(copy) NSString *APIKey;
70 @property(copy) NSString *sharedSecret;
71 @property(copy) NSString *clientID;
2e3302e completed scrobbler handshake mechanism
Matt Patenaude authored
72 @property(copy) NSString *clientVersion;
a76902d relatively finished with the LFWebService interface
Matt Patenaude authored
73 @property(copy) NSString *sessionKey;
4b4b301 got very basics of authorization working properly
Matt Patenaude authored
74 @property(copy) NSString *sessionUser;
529d836 finished demo app UI, added support for all operations, added control…
Matt Patenaude authored
75 @property(assign) BOOL autoScrobble;
a76902d relatively finished with the LFWebService interface
Matt Patenaude authored
76 @property(retain,readonly) LFTrack *currentTrack;
77
535498b more or less completed full session validation code, with rough examp…
Matt Patenaude authored
78 // Session methods (new sessions)
5f7674c added framework-wide request tracking (UUIDs, delegate methods)
Matt Patenaude authored
79 - (NSString *)establishNewSession;
9c50778 Scribbler can now be combined with TouchXML for use on iPhone OS
Matt Patenaude authored
80 - (NSString *)establishNewMobileSessionWithUsername:(NSString *)theUser password:(NSString *)thePassword;
5f7674c added framework-wide request tracking (UUIDs, delegate methods)
Matt Patenaude authored
81 - (NSString *)finishSessionAuthorization;
d8323df more or less finished LFTrack, made minor modifications to LFPlaySession
Matt Patenaude authored
82
535498b more or less completed full session validation code, with rough examp…
Matt Patenaude authored
83 // Session methods (existing sessions)
84 - (NSString *)validateSessionCredentials;
85
d8323df more or less finished LFTrack, made minor modifications to LFPlaySession
Matt Patenaude authored
86 // Track methods
5f7674c added framework-wide request tracking (UUIDs, delegate methods)
Matt Patenaude authored
87 - (NSString *)startPlayingTrack:(LFTrack *)theTrack;
88 - (NSString *)scrobbleTrackIfNecessary:(LFTrack *)theTrack;
89 - (NSString *)loveTrack:(LFTrack *)theTrack;
90 - (NSString *)banTrack:(LFTrack *)theTrack;
d8323df more or less finished LFTrack, made minor modifications to LFPlaySession
Matt Patenaude authored
91
92 @end
93
Something went wrong with that request. Please try again.