adium-1.4 2953:2e6c79991712: Forgot to actually remove the pic.i...

commits at adium.im commits at adium.im
Thu May 13 15:10:55 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/2e6c79991712
revision:	2953:2e6c79991712
author:		Alan Humpherys
date:		Thu May 13 09:10:40 2010 -0600

Forgot to actually remove the pic.im files.  Took care of that...

diffs (159 lines):

diff -r 24c901f53614 -r 2e6c79991712 Plugins/Image Uploading Plugin/AIImageUploaderPlugin.m
--- a/Plugins/Image Uploading Plugin/AIImageUploaderPlugin.m	Thu May 13 08:24:22 2010 -0600
+++ b/Plugins/Image Uploading Plugin/AIImageUploaderPlugin.m	Thu May 13 09:10:40 2010 -0600
@@ -7,7 +7,6 @@
 //
 
 #import "AIImageUploaderPlugin.h"
-#import "AIPicImImageUploader.h"
 #import "AIImageShackImageUploader.h"
 #import "AIImageUploaderWindowController.h"
 
diff -r 24c901f53614 -r 2e6c79991712 Plugins/Image Uploading Plugin/AIPicImImageUploader.h
--- a/Plugins/Image Uploading Plugin/AIPicImImageUploader.h	Thu May 13 08:24:22 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-//
-//  AIPicImImageUploader.h
-//  Adium
-//
-//  Created by Zachary West on 2009-05-26.
-//  Copyright 2009 Adium. All rights reserved.
-//
-
-#import "AIGenericMultipartImageUploader.h"
-
- at interface AIPicImImageUploader : AIGenericMultipartImageUploader {
-	NSData						*resultData;
-	NSXMLParser					*responseParser;
-	
-	// Parsing
-	NSMutableDictionary			*lastElement;
-	NSString					*currentElementName;
-	NSMutableDictionary			*currentElement;
-	NSMutableDictionary			*response;
-}
-
- at end
diff -r 24c901f53614 -r 2e6c79991712 Plugins/Image Uploading Plugin/AIPicImImageUploader.m
--- a/Plugins/Image Uploading Plugin/AIPicImImageUploader.m	Thu May 13 08:24:22 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-//
-//  AIPicImImageUploader.m
-//  Adium
-//
-//  Created by Zachary West on 2009-05-26.
-//  Copyright 2009 Adium. All rights reserved.
-//
-
-#import "AIPicImImageUploader.h"
-#import <AIUtilities/AIStringAdditions.h>
-
- at implementation AIPicImImageUploader
-+ (NSString *)serviceName
-{
-	return @"pic.im";
-}
-
-- (NSString *)uploadURL
-{
-	return @"http://api.tr.im/api/picim_url.xml?api_key=zghQN6sv5y0FkLPNlQAopm7qDQz6ItO33ENU21OBsy3dL1Kl";
-}
-
-- (NSString *)fieldName
-{
-	return @"media";
-}
-
-- (NSUInteger)maximumSize
-{
-	return 2500000;
-}
-
-- (void)dealloc
-{
-	[resultData release]; resultData = nil;
-	[response release]; response = nil;
-	[responseParser release]; responseParser = nil;
-	
-	[super dealloc];
-}
-
-#pragma mark Response parsing
-- (void)parseResponse:(NSData *)data
-{
-	response = [[NSMutableDictionary alloc] init];
-	resultData = [data copy];
-	
-	AILogWithSignature(@"%@", [NSString stringWithData:data encoding:NSUTF8StringEncoding]);
-	
-	responseParser = [[NSXMLParser alloc] initWithData:resultData];
-	[responseParser setDelegate:self];
-	[responseParser parse];
-}
-
-- (void)parserDidStartDocument:(NSXMLParser *)parser
-{
-	currentElement = response;
-}
-
-- (void)parser:(NSXMLParser *)parser 
-parseErrorOccurred:(NSError *)error
-{
-	AILogWithSignature(@"%@", [error localizedDescription]);
-	
-	[uploader errorWithMessage:[error localizedDescription] forChat:chat];
-}
-
-- (void)parser:(NSXMLParser *)parser
-didStartElement:(NSString *)elementName 
-  namespaceURI:(NSString *)namespaceURI 
- qualifiedName:(NSString *)qualifiedName
-	attributes:(NSDictionary *)attributes
-{	
-	if (elementName) {
-		NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-		
-		[currentElement setValue:dict forKey:elementName];
-		
-		lastElement = currentElement;
-		currentElement = dict;
-	}
-	
-	[currentElement addEntriesFromDictionary:attributes];
-}
-
-- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
-{
-	// We don't see anything more than 2-deep. We don't need to check more.
-	currentElement = lastElement;
-}
-
-- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string
-{
-	if (![currentElement objectForKey:@"value"]) {
-		[currentElement setValue:[NSMutableString string] forKey:@"value"];
-	}
-	
-	[[currentElement objectForKey:@"value"] appendString:string];
-}
-
-- (void)parserDidEndDocument:(NSXMLParser *)parser
-{
-	NSDictionary *trim = [response objectForKey:@"trim"];
-	NSDictionary *status = [trim objectForKey:@"status"];
-	
-	if ([[status objectForKey:@"result"] isCaseInsensitivelyEqualToString:@"error"]) {
-		[uploader errorWithMessage:[status objectForKey:@"message"] forChat:chat];
-	} else if ([[status objectForKey:@"result"] isCaseInsensitivelyEqualToString:@"ok"]) {
-		[uploader uploadedURL:[[trim objectForKey:@"url"] objectForKey:@"value"] forChat:chat];
-		
-		[[NSNotificationCenter defaultCenter] postNotificationName:@"AIPicImImageAdded"
-															object:trim];
-	} else {
-		[uploader errorWithMessage:AILocalizedString(@"Unable to upload", nil) forChat:chat];
-	}
-}
-
- at end




More information about the commits mailing list