Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: e40658fb83
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (48 sloc) 2.661 kB
//
// MGTwitterEngineDelegate.h
// MGTwitterEngine
//
// Created by Matt Gemmell on 16/02/2008.
// Copyright 2008 Instinctive Code.
//
#import "MGTwitterEngineGlobalHeader.h"
@class OAToken;
typedef enum _MGTwitterEngineDeliveryOptions {
// all results will be delivered as an array via statusesReceived: and similar delegate methods
MGTwitterEngineDeliveryAllResultsOption = 1 << 0,
// individual results will be delivered as a dictionary via the receivedObject: delegate method
MGTwitterEngineDeliveryIndividualResultsOption = 1 << 1,
// these options can be combined with the | operator
} MGTwitterEngineDeliveryOptions;
@protocol MGTwitterEngineDelegate
// These delegate methods are called after a connection has been established
- (void)requestSucceeded:(NSString *)connectionIdentifier;
- (void)requestFailed:(NSString *)connectionIdentifier withError:(NSError *)error;
@optional
#if YAJL_AVAILABLE || TOUCHJSON_AVAILABLE
// This delegate method is called each time a new result is parsed from the connection and
// the deliveryOption is configured for MGTwitterEngineDeliveryIndividualResults.
- (void)receivedObject:(NSDictionary *)dictionary forRequest:(NSString *)connectionIdentifier;
#endif
// These delegate methods are called after all results are parsed from the connection. If
// the deliveryOption is configured for MGTwitterEngineDeliveryAllResults (the default), a
// collection of all results is also returned.
- (void)statusesReceived:(NSArray *)statuses forRequest:(NSString *)connectionIdentifier;
- (void)directMessagesReceived:(NSArray *)messages forRequest:(NSString *)connectionIdentifier;
- (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier;
- (void)userListsReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier;
- (void)miscInfoReceived:(NSArray *)miscInfo forRequest:(NSString *)connectionIdentifier;
#if YAJL_AVAILABLE || TOUCHJSON_AVAILABLE
- (void)searchResultsReceived:(NSArray *)searchResults forRequest:(NSString *)connectionIdentifier;
#endif
- (void)socialGraphInfoReceived:(NSArray *)socialGraphInfo forRequest:(NSString *)connectionIdentifier;
- (void)accessTokenReceived:(OAToken *)token forRequest:(NSString *)connectionIdentifier;
#if TARGET_OS_IPHONE
- (void)imageReceived:(UIImage *)image forRequest:(NSString *)connectionIdentifier;
#else
- (void)imageReceived:(NSImage *)image forRequest:(NSString *)connectionIdentifier;
#endif
// This delegate method is called whenever a connection has finished.
- (void)connectionStarted:(NSString *)connectionIdentifier;
- (void)connectionFinished:(NSString *)connectionIdentifier;
@end
Jump to Line
Something went wrong with that request. Please try again.