Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SparrowEmojiPlugin 0.1.0

  • Loading branch information...
commit 0ccf15fe93808d782e002ef1b9a77f3a2bf84d53 1 parent 9523cd9
SKAhack authored
View
40 SparrowEmojiPlugin.xcodeproj/project.pbxproj
@@ -9,6 +9,9 @@
/* Begin PBXBuildFile section */
85EAFE071328975300D105A0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85EAFE061328975300D105A0 /* Cocoa.framework */; };
85EAFE111328975300D105A0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85EAFE0F1328975300D105A0 /* InfoPlist.strings */; };
+ 85EAFE1A1328982700D105A0 /* SparrowEmojiPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 85EAFE191328982700D105A0 /* SparrowEmojiPlugin.m */; };
+ 85EAFE1F13289BED00D105A0 /* JRSwizzle.m in Sources */ = {isa = PBXBuildFile; fileRef = 85EAFE1E13289BED00D105A0 /* JRSwizzle.m */; };
+ 85EAFE2C132A68EE00D105A0 /* SparrowEmojiPlugin+Docomo.m in Sources */ = {isa = PBXBuildFile; fileRef = 85EAFE2B132A68ED00D105A0 /* SparrowEmojiPlugin+Docomo.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -17,9 +20,15 @@
85EAFE091328975300D105A0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
85EAFE0A1328975300D105A0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
85EAFE0B1328975300D105A0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
- 85EAFE0E1328975300D105A0 /* SparrowEmojiPlugin-Info.plist */ = {isa = PBXFileReference; path = "SparrowEmojiPlugin-Info.plist"; sourceTree = "<group>"; };
+ 85EAFE0E1328975300D105A0 /* SparrowEmojiPlugin-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SparrowEmojiPlugin-Info.plist"; sourceTree = "<group>"; };
85EAFE101328975300D105A0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
- 85EAFE121328975300D105A0 /* SparrowEmojiPlugin-Prefix.pch */ = {isa = PBXFileReference; path = "SparrowEmojiPlugin-Prefix.pch"; sourceTree = "<group>"; };
+ 85EAFE121328975300D105A0 /* SparrowEmojiPlugin-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SparrowEmojiPlugin-Prefix.pch"; sourceTree = "<group>"; };
+ 85EAFE181328982700D105A0 /* SparrowEmojiPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparrowEmojiPlugin.h; path = SparrowEmojiPlugin/Classes/SparrowEmojiPlugin.h; sourceTree = "<group>"; };
+ 85EAFE191328982700D105A0 /* SparrowEmojiPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SparrowEmojiPlugin.m; path = SparrowEmojiPlugin/Classes/SparrowEmojiPlugin.m; sourceTree = "<group>"; };
+ 85EAFE1D13289BED00D105A0 /* JRSwizzle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JRSwizzle.h; path = JRSwizzle/JRSwizzle.h; sourceTree = "<group>"; };
+ 85EAFE1E13289BED00D105A0 /* JRSwizzle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JRSwizzle.m; path = JRSwizzle/JRSwizzle.m; sourceTree = "<group>"; };
+ 85EAFE2A132A68EC00D105A0 /* SparrowEmojiPlugin+Docomo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "SparrowEmojiPlugin+Docomo.h"; path = "SparrowEmojiPlugin/Classes/SparrowEmojiPlugin+Docomo.h"; sourceTree = "<group>"; };
+ 85EAFE2B132A68ED00D105A0 /* SparrowEmojiPlugin+Docomo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "SparrowEmojiPlugin+Docomo.m"; path = "SparrowEmojiPlugin/Classes/SparrowEmojiPlugin+Docomo.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -38,6 +47,7 @@
isa = PBXGroup;
children = (
85EAFE0C1328975300D105A0 /* SparrowEmojiPlugin */,
+ 85EAFE1C13289BBB00D105A0 /* JRSwizzle */,
85EAFE051328975300D105A0 /* Frameworks */,
85EAFE041328975300D105A0 /* Products */,
);
@@ -73,6 +83,7 @@
85EAFE0C1328975300D105A0 /* SparrowEmojiPlugin */ = {
isa = PBXGroup;
children = (
+ 85EAFE1B132898E200D105A0 /* Classes */,
85EAFE0D1328975300D105A0 /* Supporting Files */,
);
path = SparrowEmojiPlugin;
@@ -88,6 +99,27 @@
name = "Supporting Files";
sourceTree = "<group>";
};
+ 85EAFE1B132898E200D105A0 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 85EAFE181328982700D105A0 /* SparrowEmojiPlugin.h */,
+ 85EAFE191328982700D105A0 /* SparrowEmojiPlugin.m */,
+ 85EAFE2A132A68EC00D105A0 /* SparrowEmojiPlugin+Docomo.h */,
+ 85EAFE2B132A68ED00D105A0 /* SparrowEmojiPlugin+Docomo.m */,
+ );
+ name = Classes;
+ path = ..;
+ sourceTree = "<group>";
+ };
+ 85EAFE1C13289BBB00D105A0 /* JRSwizzle */ = {
+ isa = PBXGroup;
+ children = (
+ 85EAFE1D13289BED00D105A0 /* JRSwizzle.h */,
+ 85EAFE1E13289BED00D105A0 /* JRSwizzle.m */,
+ );
+ name = JRSwizzle;
+ sourceTree = "<group>";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -146,6 +178,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 85EAFE1A1328982700D105A0 /* SparrowEmojiPlugin.m in Sources */,
+ 85EAFE1F13289BED00D105A0 /* JRSwizzle.m in Sources */,
+ 85EAFE2C132A68EE00D105A0 /* SparrowEmojiPlugin+Docomo.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -246,6 +281,7 @@
85EAFE171328975300D105A0 /* Release */,
);
defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
View
16 SparrowEmojiPlugin/Classes/SparrowEmojiPlugin+Docomo.h
@@ -0,0 +1,16 @@
+//
+// Docomo.h
+// SparrowEmojiPlugin
+//
+// Created by SKAhack on 11/03/11.
+// Copyright 2011 All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import "SparrowEmojiPlugin.h"
+
+@interface SparrowEmojiPlugin (Docomo)
+
+- (NSString *)replaceDocomoEmoji:(NSString *)message;
+@end
+
View
262 SparrowEmojiPlugin/Classes/SparrowEmojiPlugin+Docomo.m
@@ -0,0 +1,262 @@
+//
+// Docomo.m
+// SparrowEmojiPlugin
+//
+// Created by SKAhack on 11/03/11.
+// Copyright 2011 All rights reserved.
+//
+
+#import "SparrowEmojiPlugin+Docomo.h"
+
+
+@implementation SparrowEmojiPlugin (Docomo)
+
+- (NSString *)replaceDocomoEmoji:(NSString *)message {
+ NSString *str = [NSString stringWithString:message];
+
+ NSString *f1 = @"<img src=\"http://mail.google.com/mail/e/docomo_ne_jp/";
+ NSString *f2 = @"\" style=\"margin-top: 0px; margin-right: 0.2ex; margin-bottom: 0px; margin-left: 0.2ex; vertical-align: middle; \">";
+
+ str = [str stringByReplacingOccurrencesOfString:@"\uE63E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"000", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE63F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"001", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE640" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"002", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE641" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"003", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE642" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"004", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE643" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"005", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE644" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"006", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE645" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"007", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE646" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE647" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE648" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE649" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"030", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"031", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"032", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"033", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE64F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"034", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE650" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"035", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE651" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"036", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE653" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D1", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE654" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE655" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D3", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE656" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D4", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE657" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D5", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE658" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE659" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D7", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"522", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7DF", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E1", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E4", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE65F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E5", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE660" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE661" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E8", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE662" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7E9", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE663" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B0", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE664" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE665" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B3", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE666" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B4", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE667" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B5", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE668" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE669" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B7", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4B9", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7F5", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7F6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7F7", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"506", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE66F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"980", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE670" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"981", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE671" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"982", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE672" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"983", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE673" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"960", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE674" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4D6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE675" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"53E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE676" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"800", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE678" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF0", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE679" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7FC", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE67F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE680" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE681" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4EF", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE682" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4F0", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE683" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"546", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE684" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"50F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE685" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"510", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE686" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"511", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE687" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"523", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE688" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"525", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE689" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"527", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"81C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"80A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"81D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE68F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE690" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B1D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE691" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"190", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE692" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"191", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE693" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B93", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE694" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B94", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE695" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B95", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE696" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF1", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE697" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE698" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"553", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE699" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4CD", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4CE", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B20", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"011", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"014", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"013", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE69F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"012", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A0" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"015", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A1" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1B7", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A2" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1B8", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A3" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7EA", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A4" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"512", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6A5" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF3", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6CE" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"526", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6CF" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"52B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D0" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"528", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D3" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"529", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D6" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4E2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D7" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B21", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D8" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B81", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6D9" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B82", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6DA" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B83", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6DB" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B84", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6DC" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B85", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6DD" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B36", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6DE" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B22", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E0" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"82C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E2" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"82E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E3" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"82F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E4" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"830", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E5" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"831", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E6" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"832", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E7" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"833", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E8" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"834", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6E9" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"835", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6EA" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"836", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6EB" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"837", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE70B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B27", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6EC" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B0C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6ED" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B0D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6EE" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B0E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6EF" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B0F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F0" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"330", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F1" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"320", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F2" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"323", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F3" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"33F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F4" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"324", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F5" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF4", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F6" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"813", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F7" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7FA", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F8" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B55", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6F9" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"823", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6FA" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B60", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6FB" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B56", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6FC" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B57", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6FD" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B96", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6FF" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"814", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE700" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF5", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE701" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B59", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE702" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B04", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE703" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B05", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE704" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B06", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE705" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B5A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE706" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B5B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE707" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B5C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE708" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B5D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE709" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B07", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE70A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B08", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6AC" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"808", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6AD" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4F1", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6AE" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"536", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B1" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"19A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B2" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"537", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B3" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"008", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B7" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"018", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B8" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"019", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6B9" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"01A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE6BA" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"02A", f2]];
+
+
+ str = [str stringByReplacingOccurrencesOfString:@"\uE70E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4CF", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE70F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4DC", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE710" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"195", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE711" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4D0", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE712" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D8", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE713" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4F2", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE714" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4F3", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE715" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4DD", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE716" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"538", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE717" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"824", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE718" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4C9", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE719" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"539", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4D1", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"825", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"01B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7EB", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"984", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE71F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"01D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE720" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"340", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE721" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"33E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE722" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"331", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE723" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"344", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE724" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"33D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE725" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"326", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE726" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"327", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE727" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B97", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE728" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"329", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE729" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"347", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"332", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"33C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"343", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"33A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"339", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE72F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B28", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE730" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"53A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE731" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B29", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE732" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2A", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE733" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"7D9", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE734" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE735" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE736" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE737" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B23", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE738" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE739" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B2F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B30", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"B31", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF6", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"AF7", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4BA", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE73F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"038", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE740" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"4C3", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE741" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"03C", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE742" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"04F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE743" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"03D", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE744" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"050", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE745" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"051", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE746" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"03E", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE747" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"03F", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE748" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"040", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE749" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"961", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74A" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"962", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74B" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"985", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74C" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"963", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74D" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"964", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74E" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1B9", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE74F" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1BA", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE750" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1BC", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE751" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1BD", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE752" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"32B", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE753" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"333", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE754" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1BE", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE755" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"1BF", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE756" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"986", f2]];
+ str = [str stringByReplacingOccurrencesOfString:@"\uE757" withString:[NSString stringWithFormat:@"%@%@%@", f1, @"341", f2]];
+
+ return str;
+}
+
+@end
View
25 SparrowEmojiPlugin/Classes/SparrowEmojiPlugin.h
@@ -0,0 +1,25 @@
+//
+// SparrowEmojiPlugin.h
+// SparrowEmojiPlugin
+//
+// Created by SKAhack on 11/03/10.
+// Copyright 2011 All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+
+@interface SparrowEmojiPlugin : NSObject {
+@private
+}
+
++ (SparrowEmojiPlugin *)sharedInstance;
+- (id)init;
+- (void)dealloc;
+
++(void)load;
+- (BOOL)isEmojiAddress:(NSString *)address;
+- (BOOL)isDoCoMoAddress:(NSString *)address;
+- (NSString *)replaceEmojiString:(NSString *)message sender:(NSString *)address;
+
+@end
View
90 SparrowEmojiPlugin/Classes/SparrowEmojiPlugin.m
@@ -0,0 +1,90 @@
+//
+// SparrowEmojiPlugin.m
+// SparrowEmojiPlugin
+//
+// Created by SKAhack on 11/03/10.
+// Copyright 2011 All rights reserved.
+//
+
+#import "SparrowEmojiPlugin.h"
+#import "JRSwizzle.h"
+#import <objc/runtime.h>
+
+#import "SparrowEmojiPlugin+Docomo.h"
+
+@implementation SparrowEmojiPlugin
+
++ (void)load {
+ Class class = objc_getClass("LEPAbstractMessage");
+
+ [class jr_swizzleMethod:@selector(mmBodyHTMLRenderingWithAccount:withWebView:hideQuoted:enableActivity:)
+ withMethod:@selector(my_mmBodyHTMLRenderingWithAccount:withWebView:hideQuoted:enableActivity:) error:NULL];
+
+}
+
+#pragma mark -
+#pragma mark Instantiations
+
++ (SparrowEmojiPlugin *)sharedInstance {
+ static id sharedInstance = nil;
+ if (!sharedInstance) {
+ sharedInstance = [[self alloc] init];
+ }
+ return sharedInstance;
+}
+
+- (id)init {
+ self = [super init];
+
+ return self;
+}
+
+- (void)dealloc {
+ [super dealloc];
+}
+
+#pragma mark -
+
+- (BOOL)isEmojiAddress:(NSString *)address {
+ if ([self isDoCoMoAddress:address]) {
+ return YES;
+ }
+ return NO;
+}
+
+- (BOOL)isDoCoMoAddress:(NSString *)address {
+ if ([address hasSuffix:@"docomo.ne.jp"]) {
+ return YES;
+ }
+ return NO;
+}
+
+- (NSString *)replaceEmojiString:(NSString *)message sender:(NSString *)address {
+ NSString *str;
+ if ([self isDoCoMoAddress:address]) {
+ str = [self replaceDocomoEmoji:message];
+ }
+
+ return str;
+}
+
+@end
+
+@implementation NSObject(SparrowEmojiPlugin)
+
+- (NSString *)my_mmBodyHTMLRenderingWithAccount:(id)arg1 withWebView:(id)arg2 hideQuoted:(BOOL)arg3 enableActivity:(BOOL)arg4 {
+
+ NSString *str = [self my_mmBodyHTMLRenderingWithAccount:arg1 withWebView:arg2 hideQuoted:arg3 enableActivity:arg4];
+
+ NSString *address = [[[self performSelector:@selector(header)] performSelector:@selector(from)] performSelector:@selector(mailbox)];
+
+ SparrowEmojiPlugin *sep = [SparrowEmojiPlugin sharedInstance];
+ if ([sep isEmojiAddress:address]) {
+ return [sep replaceEmojiString:str sender:address];
+ }
+
+ return str;
+}
+
+
+@end
View
7 SparrowEmojiPlugin/SparrowEmojiPlugin-Info.plist
@@ -26,5 +26,12 @@
<string>Copyright © 2011 __MyCompanyName__. All rights reserved.</string>
<key>NSPrincipalClass</key>
<string></string>
+ <key>SIMBLTargetApplications</key>
+ <array>
+ <dict>
+ <key>BundleIdentifier</key>
+ <string>com.sparrowmailapp.sparrow</string>
+ </dict>
+ </array>
</dict>
</plist>
Please sign in to comment.
Something went wrong with that request. Please try again.