This repository has been archived by the owner on Aug 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
ORSSession.h
54 lines (46 loc) · 1.71 KB
/
ORSSession.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
//
// ORSSession.h
// Twitter Engine
//
// Created by Nicholas Toumpelis on 12/04/2009.
// Copyright 2009 Ocean Road Software. All rights reserved.
//
// Version 0.7
#import <Cocoa/Cocoa.h>
@interface ORSSession : NSObject <NSCopying> {
@private
NSString *userID;
NSString *password;
NSMutableData *dataReceived;
NSURLConnection *mainConnection;
}
- (id) initWithUserID:(NSString *)newUserID
andPassword:(NSString *)newPassword;
- (id) copyWithZone:(NSZone *)zone;
- (NSData *) executeRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (NSData *) executeUnencodedRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (void) simpleExecuteRequestOfType:(NSString *)type
atPath:(NSString *)path
synchronously:(BOOL)synchr;
- (NSXMLDocument *) getXMLDocumentFromData:(NSData *)data;
- (NSXMLNode *) getNodeFromData:(NSData *)userData;
- (NSArray *) getAllStatusesFromData:(NSData *)statuses;
- (NSArray *) getAllUsersFromData:(NSData *)users;
- (NSArray *) getAllDMsFromData:(NSData *)directMessages;
// NSURLConnection delegates for asynchronous connections
- (void) connection:(NSURLConnection *)connection
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
- (void) connection:(NSURLConnection *)connection
didReceiveResponse:(NSURLResponse *)response;
- (void) connection:(NSURLConnection *)connection
didReceiveData:(NSData *)dataReceived;
- (void) connection:(NSURLConnection *)connection
didFailWithError:(NSError *)connectionError;
- (void) connectionDidFinishLoading:(NSURLConnection *)connection;
@property(copy) NSString *userID;
@property(copy) NSString *password;
@end