diff --git a/net.c b/net.c index 296199f..89dfc50 100644 --- a/net.c +++ b/net.c @@ -314,11 +314,10 @@ int try_write (struct connection *c) { // Log all written packages if (r > 0 && log_net_f) { - fprintf (log_net_f, "%.02lf %d OUT %s:%d", get_utime (CLOCK_REALTIME), r, c->ip, c->port); + // fprintf (log_net_f, "%.02lf %d OUT %s:%d", get_utime (CLOCK_REALTIME), r, c->ip, c->port); int i; for (i = 0; i < r; i++) { - - fprintf (log_net_f, " %02x", *(unsigned char *)(c->out_head->rptr + i)); + // fprintf (log_net_f, " %02x", *(unsigned char *)(c->out_head->rptr + i)); } fprintf (log_net_f, "\n"); fflush (log_net_f); diff --git a/telegram-adium/AdiumTelegramAccount.h b/telegram-adium/AdiumTelegramAccount.h new file mode 100644 index 0000000..540743d --- /dev/null +++ b/telegram-adium/AdiumTelegramAccount.h @@ -0,0 +1,14 @@ +// +// AdiumTelegramAccount.h +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import +#import + +@interface AdiumTelegramAccount : CBPurpleAccount + +@end diff --git a/telegram-adium/AdiumTelegramAccount.m b/telegram-adium/AdiumTelegramAccount.m new file mode 100644 index 0000000..608d03a --- /dev/null +++ b/telegram-adium/AdiumTelegramAccount.m @@ -0,0 +1,61 @@ +// +// AdiumTelegramAccount.m +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import "AdiumTelegramAccount.h" + +@implementation AdiumTelegramAccount + +- (const char*)protocolPlugin +{ + return "prpl-telegram"; +} + +- (BOOL)connectivityBasedOnNetworkReachability +{ + return YES; +} + +- (NSString *)host +{ + return @"173.240.5.1"; +} + +- (int)port +{ + return 443; +} + +/* +- (NSString *)encodedAttributedString:(NSAttributedString *)inAttributedString forListObject:(AIListObject *)inListObject +{ + NSString *temp = [AIHTMLDecoder encodeHTML:inAttributedString + headers:YES + fontTags:NO + includingColorTags:NO + closeFontTags:NO + styleTags:NO + closeStyleTagsOnFontChange:NO + encodeNonASCII:NO + encodeSpaces:NO + imagesPath:nil + attachmentsAsText:YES + onlyIncludeOutgoingImages:NO + simpleTagsOnly:YES + bodyBackground:NO + allowJavascriptURLs:NO]; + return temp; +} +*/ + +- (BOOL)canSendOfflineMessageToContact:(AIListContact *)inContact +{ + return YES; +} + + +@end diff --git a/telegram-adium/TelegramPlugin.h b/telegram-adium/TelegramPlugin.h new file mode 100644 index 0000000..bb0e985 --- /dev/null +++ b/telegram-adium/TelegramPlugin.h @@ -0,0 +1,16 @@ +// +// TelegramPlugin.h +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import +#import + +@interface TelegramPlugin : NSObject { + id service; +} + +@end diff --git a/telegram-adium/TelegramPlugin.m b/telegram-adium/TelegramPlugin.m new file mode 100644 index 0000000..96bc7b9 --- /dev/null +++ b/telegram-adium/TelegramPlugin.m @@ -0,0 +1,26 @@ +// +// TelegramPlugin.m +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import "telegram-purple.h" +#import "TelegramPlugin.h" +#import "TelegramService.h" + +@implementation TelegramPlugin + +- (void) installPlugin +{ + purple_init_telegram(); + service = [[TelegramService alloc] init]; +} + +- (void) uninstallPlugin +{ + service = nil; +} + +@end diff --git a/telegram-adium/TelegramService.h b/telegram-adium/TelegramService.h new file mode 100644 index 0000000..48b8ed6 --- /dev/null +++ b/telegram-adium/TelegramService.h @@ -0,0 +1,14 @@ +// +// TelegramService.h +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import +#import + +@interface TelegramService : PurpleService + +@end diff --git a/telegram-adium/TelegramService.m b/telegram-adium/TelegramService.m new file mode 100644 index 0000000..21ee175 --- /dev/null +++ b/telegram-adium/TelegramService.m @@ -0,0 +1,98 @@ +// +// TelegramService.m +// telegram-adium +// +// Created by Matthias Jentsch on 06.09.14. +// Copyright (c) 2014 Matthias Jentsch. All rights reserved. +// + +#import "TelegramService.h" +#import "AdiumTelegramAccount.h" + +@implementation TelegramService + +- (Class)accountClass{ + return [AdiumOkCupidAccount class]; +} + +/* +- (AIAccountViewController *)accountViewController { + return [OkCupidAccountViewController accountViewController]; +} + */ + +- (BOOL)supportsProxySettings{ + return YES; +} + +- (BOOL)supportsPassword +{ + return NO; +} + +- (BOOL)requiresPassword +{ + return NO; +} + +- (NSString *)UIDPlaceholder +{ + return @"Telegram"; +} + +//Service Description +- (NSString *)serviceCodeUniqueID{ + return @"prpl-telegram"; +} +- (NSString *)serviceID{ + return @"Telegram"; +} +- (NSString *)serviceClass{ + return @"Telegram"; +} +- (NSString *)shortDescription{ + return @"Telegram"; +} +- (NSString *)longDescription{ + return @"Support for the protocol of the Telegram messenger."; +} + +- (BOOL)isSocialNetworkingService +{ + return NO; +} + + +- (NSCharacterSet *)allowedCharacters{ + return [[NSCharacterSet illegalCharacterSet] invertedSet]; +} +- (NSCharacterSet *)ignoredCharacters{ + return [NSCharacterSet characterSetWithCharactersInString:@""]; +} +- (BOOL)caseSensitive{ + return NO; +} +- (AIServiceImportance)serviceImportance{ + return AIServiceSecondary; +} +- (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType +{ + NSImage *image; + NSString *imagename; + NSSize imagesize; + + if (iconType == AIServiceIconLarge) + { + imagename = @"telegram"; + imagesize = NSMakeSize(48,48); + } else { + imagename = @"telegram16"; + imagesize = NSMakeSize(16,16); + } + + image = [NSImage imageNamed:(imagename)]; // TODO: forClass:[self class] loadLazily:YES] + [image setSize:imagesize]; + return image; +} + +@end diff --git a/telegram-adium/telegram-adium.xcodeproj/project.pbxproj b/telegram-adium/telegram-adium.xcodeproj/project.pbxproj new file mode 100644 index 0000000..5800016 --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/project.pbxproj @@ -0,0 +1,454 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + C410948A19BB2D7D0083BF3F /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C410948919BB2D7D0083BF3F /* CoreFoundation.framework */; }; + C410949019BB2D7D0083BF3F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C410948E19BB2D7D0083BF3F /* InfoPlist.strings */; }; + C410949B19BB337A0083BF3F /* TelegramPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = C410949A19BB337A0083BF3F /* TelegramPlugin.m */; }; + C410949D19BB34BE0083BF3F /* Adium.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C410949C19BB34BE0083BF3F /* Adium.framework */; }; + C410949F19BB36A70083BF3F /* AdiumLibpurple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C410949E19BB36A70083BF3F /* AdiumLibpurple.framework */; }; + C4877C1819BB37EA006FA91F /* TelegramService.m in Sources */ = {isa = PBXBuildFile; fileRef = C4877C1719BB37EA006FA91F /* TelegramService.m */; }; + C4877C1A19BB3D91006FA91F /* telegram-purple.c in Sources */ = {isa = PBXBuildFile; fileRef = C4877C1919BB3D91006FA91F /* telegram-purple.c */; }; + C4877C1E19BB676B006FA91F /* AdiumTelegramAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = C4877C1D19BB676B006FA91F /* AdiumTelegramAccount.m */; }; + C4877C2419BB6D11006FA91F /* telegram.svg in Resources */ = {isa = PBXBuildFile; fileRef = C4877C1F19BB6D11006FA91F /* telegram.svg */; }; + C4877C2519BB6D11006FA91F /* telegram.png in Resources */ = {isa = PBXBuildFile; fileRef = C4877C2019BB6D11006FA91F /* telegram.png */; }; + C4877C2619BB6D11006FA91F /* telegram16.png in Resources */ = {isa = PBXBuildFile; fileRef = C4877C2119BB6D11006FA91F /* telegram16.png */; }; + C4877C2719BB6D11006FA91F /* telegram22.png in Resources */ = {isa = PBXBuildFile; fileRef = C4877C2219BB6D11006FA91F /* telegram22.png */; }; + C4877C2819BB6D11006FA91F /* telegram48.png in Resources */ = {isa = PBXBuildFile; fileRef = C4877C2319BB6D11006FA91F /* telegram48.png */; }; + C4BF98FF19BB75260038D507 /* libglib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4BF98FE19BB75250038D507 /* libglib.framework */; }; + C4BF990119BB87C00038D507 /* libpurple.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C4BF990019BB87C00038D507 /* libpurple.framework */; }; + C4BF991C19BB8B4D0038D507 /* binlog.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990419BB8B4D0038D507 /* binlog.c */; }; + C4BF991D19BB8B4D0038D507 /* loop.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990519BB8B4D0038D507 /* loop.c */; }; + C4BF991E19BB8B4D0038D507 /* msglog.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990619BB8B4D0038D507 /* msglog.c */; }; + C4BF991F19BB8B4D0038D507 /* mtproto-client.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990719BB8B4D0038D507 /* mtproto-client.c */; }; + C4BF992019BB8B4D0038D507 /* mtproto-common.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990819BB8B4D0038D507 /* mtproto-common.c */; }; + C4BF992119BB8B4D0038D507 /* net.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990919BB8B4D0038D507 /* net.c */; }; + C4BF992219BB8B4D0038D507 /* queries.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990A19BB8B4D0038D507 /* queries.c */; }; + C4BF992319BB8B4D0038D507 /* structures.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990B19BB8B4D0038D507 /* structures.c */; }; + C4BF992419BB8B4D0038D507 /* telegram.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990C19BB8B4D0038D507 /* telegram.c */; }; + C4BF992519BB8B4D0038D507 /* tools.c in Sources */ = {isa = PBXBuildFile; fileRef = C4BF990D19BB8B4D0038D507 /* tools.c */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + C410948619BB2D7D0083BF3F /* telegram-adium.AdiumPlugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "telegram-adium.AdiumPlugin"; sourceTree = BUILT_PRODUCTS_DIR; }; + C410948919BB2D7D0083BF3F /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; + C410948D19BB2D7D0083BF3F /* telegram-adium-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "telegram-adium-Info.plist"; sourceTree = ""; }; + C410948F19BB2D7D0083BF3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + C410949119BB2D7D0083BF3F /* telegram-adium-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "telegram-adium-Prefix.pch"; sourceTree = ""; }; + C410949919BB337A0083BF3F /* TelegramPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TelegramPlugin.h; sourceTree = ""; }; + C410949A19BB337A0083BF3F /* TelegramPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TelegramPlugin.m; sourceTree = ""; }; + C410949C19BB34BE0083BF3F /* Adium.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Adium.framework; sourceTree = ""; }; + C410949E19BB36A70083BF3F /* AdiumLibpurple.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AdiumLibpurple.framework; sourceTree = ""; }; + C4877C1619BB37EA006FA91F /* TelegramService.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TelegramService.h; sourceTree = ""; }; + C4877C1719BB37EA006FA91F /* TelegramService.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TelegramService.m; sourceTree = ""; }; + C4877C1919BB3D91006FA91F /* telegram-purple.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "telegram-purple.c"; path = "../purple-plugin/telegram-purple.c"; sourceTree = ""; }; + C4877C1B19BB3DA9006FA91F /* telegram-purple.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "telegram-purple.h"; path = "../purple-plugin/telegram-purple.h"; sourceTree = ""; }; + C4877C1C19BB676B006FA91F /* AdiumTelegramAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdiumTelegramAccount.h; sourceTree = ""; }; + C4877C1D19BB676B006FA91F /* AdiumTelegramAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdiumTelegramAccount.m; sourceTree = ""; }; + C4877C1F19BB6D11006FA91F /* telegram.svg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = telegram.svg; path = "../purple-plugin/telegram.svg"; sourceTree = ""; }; + C4877C2019BB6D11006FA91F /* telegram.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = telegram.png; path = "../purple-plugin/telegram.png"; sourceTree = ""; }; + C4877C2119BB6D11006FA91F /* telegram16.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = telegram16.png; path = "../purple-plugin/telegram16.png"; sourceTree = ""; }; + C4877C2219BB6D11006FA91F /* telegram22.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = telegram22.png; path = "../purple-plugin/telegram22.png"; sourceTree = ""; }; + C4877C2319BB6D11006FA91F /* telegram48.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = telegram48.png; path = "../purple-plugin/telegram48.png"; sourceTree = ""; }; + C4BF98FE19BB75250038D507 /* libglib.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = libglib.framework; sourceTree = ""; }; + C4BF990019BB87C00038D507 /* libpurple.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = libpurple.framework; sourceTree = ""; }; + C4BF990419BB8B4D0038D507 /* binlog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = binlog.c; path = ../binlog.c; sourceTree = ""; }; + C4BF990519BB8B4D0038D507 /* loop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = loop.c; path = ../loop.c; sourceTree = ""; }; + C4BF990619BB8B4D0038D507 /* msglog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = msglog.c; path = ../msglog.c; sourceTree = ""; }; + C4BF990719BB8B4D0038D507 /* mtproto-client.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mtproto-client.c"; path = "../mtproto-client.c"; sourceTree = ""; }; + C4BF990819BB8B4D0038D507 /* mtproto-common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "mtproto-common.c"; path = "../mtproto-common.c"; sourceTree = ""; }; + C4BF990919BB8B4D0038D507 /* net.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = net.c; path = ../net.c; sourceTree = ""; }; + C4BF990A19BB8B4D0038D507 /* queries.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = queries.c; path = ../queries.c; sourceTree = ""; }; + C4BF990B19BB8B4D0038D507 /* structures.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = structures.c; path = ../structures.c; sourceTree = ""; }; + C4BF990C19BB8B4D0038D507 /* telegram.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = telegram.c; path = ../telegram.c; sourceTree = ""; }; + C4BF990D19BB8B4D0038D507 /* tools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tools.c; path = ../tools.c; sourceTree = ""; }; + C4BF990E19BB8B4D0038D507 /* binlog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = binlog.h; path = ../binlog.h; sourceTree = ""; }; + C4BF990F19BB8B4D0038D507 /* constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = constants.h; path = ../constants.h; sourceTree = ""; }; + C4BF991019BB8B4D0038D507 /* include.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = include.h; path = ../include.h; sourceTree = ""; }; + C4BF991119BB8B4D0038D507 /* LICENSE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LICENSE.h; path = ../LICENSE.h; sourceTree = ""; }; + C4BF991219BB8B4D0038D507 /* loop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = loop.h; path = ../loop.h; sourceTree = ""; }; + C4BF991319BB8B4D0038D507 /* msglog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = msglog.h; path = ../msglog.h; sourceTree = ""; }; + C4BF991419BB8B4D0038D507 /* mtproto-client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "mtproto-client.h"; path = "../mtproto-client.h"; sourceTree = ""; }; + C4BF991519BB8B4D0038D507 /* net.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = net.h; path = ../net.h; sourceTree = ""; }; + C4BF991619BB8B4D0038D507 /* no-preview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "no-preview.h"; path = "../no-preview.h"; sourceTree = ""; }; + C4BF991719BB8B4D0038D507 /* queries.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = queries.h; path = ../queries.h; sourceTree = ""; }; + C4BF991819BB8B4D0038D507 /* structures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = structures.h; path = ../structures.h; sourceTree = ""; }; + C4BF991919BB8B4D0038D507 /* telegram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = telegram.h; path = ../telegram.h; sourceTree = ""; }; + C4BF991A19BB8B4D0038D507 /* tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tools.h; path = ../tools.h; sourceTree = ""; }; + C4BF991B19BB8B4D0038D507 /* tree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tree.h; path = ../tree.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C410948319BB2D7D0083BF3F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + C410949F19BB36A70083BF3F /* AdiumLibpurple.framework in Frameworks */, + C4BF990119BB87C00038D507 /* libpurple.framework in Frameworks */, + C410948A19BB2D7D0083BF3F /* CoreFoundation.framework in Frameworks */, + C4BF98FF19BB75260038D507 /* libglib.framework in Frameworks */, + C410949D19BB34BE0083BF3F /* Adium.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C410947D19BB2D7D0083BF3F = { + isa = PBXGroup; + children = ( + C4BF992619BB8B530038D507 /* telegram */, + C4BF990319BB8B200038D507 /* telegram-purple */, + C410948B19BB2D7D0083BF3F /* telegram-adium */, + C410948819BB2D7D0083BF3F /* Frameworks */, + C410948719BB2D7D0083BF3F /* Products */, + C4877C2919BB6D22006FA91F /* Resources */, + C410949919BB337A0083BF3F /* TelegramPlugin.h */, + C4877C1619BB37EA006FA91F /* TelegramService.h */, + C4877C1719BB37EA006FA91F /* TelegramService.m */, + C4877C1C19BB676B006FA91F /* AdiumTelegramAccount.h */, + C4877C1D19BB676B006FA91F /* AdiumTelegramAccount.m */, + C410949A19BB337A0083BF3F /* TelegramPlugin.m */, + ); + sourceTree = ""; + }; + C410948719BB2D7D0083BF3F /* Products */ = { + isa = PBXGroup; + children = ( + C410948619BB2D7D0083BF3F /* telegram-adium.AdiumPlugin */, + ); + name = Products; + sourceTree = ""; + }; + C410948819BB2D7D0083BF3F /* Frameworks */ = { + isa = PBXGroup; + children = ( + C4BF990019BB87C00038D507 /* libpurple.framework */, + C4BF98FE19BB75250038D507 /* libglib.framework */, + C410949E19BB36A70083BF3F /* AdiumLibpurple.framework */, + C410949C19BB34BE0083BF3F /* Adium.framework */, + C410948919BB2D7D0083BF3F /* CoreFoundation.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + C410948B19BB2D7D0083BF3F /* telegram-adium */ = { + isa = PBXGroup; + children = ( + C410948C19BB2D7D0083BF3F /* Supporting Files */, + ); + path = "telegram-adium"; + sourceTree = ""; + }; + C410948C19BB2D7D0083BF3F /* Supporting Files */ = { + isa = PBXGroup; + children = ( + C410948D19BB2D7D0083BF3F /* telegram-adium-Info.plist */, + C410948E19BB2D7D0083BF3F /* InfoPlist.strings */, + C410949119BB2D7D0083BF3F /* telegram-adium-Prefix.pch */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + C4877C2919BB6D22006FA91F /* Resources */ = { + isa = PBXGroup; + children = ( + C4877C1F19BB6D11006FA91F /* telegram.svg */, + C4877C2019BB6D11006FA91F /* telegram.png */, + C4877C2119BB6D11006FA91F /* telegram16.png */, + C4877C2219BB6D11006FA91F /* telegram22.png */, + C4877C2319BB6D11006FA91F /* telegram48.png */, + ); + name = Resources; + sourceTree = ""; + }; + C4BF990319BB8B200038D507 /* telegram-purple */ = { + isa = PBXGroup; + children = ( + C4877C1B19BB3DA9006FA91F /* telegram-purple.h */, + C4877C1919BB3D91006FA91F /* telegram-purple.c */, + ); + name = "telegram-purple"; + sourceTree = ""; + }; + C4BF992619BB8B530038D507 /* telegram */ = { + isa = PBXGroup; + children = ( + C4BF990419BB8B4D0038D507 /* binlog.c */, + C4BF990519BB8B4D0038D507 /* loop.c */, + C4BF990619BB8B4D0038D507 /* msglog.c */, + C4BF990719BB8B4D0038D507 /* mtproto-client.c */, + C4BF990819BB8B4D0038D507 /* mtproto-common.c */, + C4BF990919BB8B4D0038D507 /* net.c */, + C4BF990A19BB8B4D0038D507 /* queries.c */, + C4BF990B19BB8B4D0038D507 /* structures.c */, + C4BF990C19BB8B4D0038D507 /* telegram.c */, + C4BF990D19BB8B4D0038D507 /* tools.c */, + C4BF990E19BB8B4D0038D507 /* binlog.h */, + C4BF990F19BB8B4D0038D507 /* constants.h */, + C4BF991019BB8B4D0038D507 /* include.h */, + C4BF991119BB8B4D0038D507 /* LICENSE.h */, + C4BF991219BB8B4D0038D507 /* loop.h */, + C4BF991319BB8B4D0038D507 /* msglog.h */, + C4BF991419BB8B4D0038D507 /* mtproto-client.h */, + C4BF991519BB8B4D0038D507 /* net.h */, + C4BF991619BB8B4D0038D507 /* no-preview.h */, + C4BF991719BB8B4D0038D507 /* queries.h */, + C4BF991819BB8B4D0038D507 /* structures.h */, + C4BF991919BB8B4D0038D507 /* telegram.h */, + C4BF991A19BB8B4D0038D507 /* tools.h */, + C4BF991B19BB8B4D0038D507 /* tree.h */, + ); + name = telegram; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C410948519BB2D7D0083BF3F /* telegram-adium */ = { + isa = PBXNativeTarget; + buildConfigurationList = C410949419BB2D7D0083BF3F /* Build configuration list for PBXNativeTarget "telegram-adium" */; + buildPhases = ( + C410948219BB2D7D0083BF3F /* Sources */, + C410948319BB2D7D0083BF3F /* Frameworks */, + C410948419BB2D7D0083BF3F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "telegram-adium"; + productName = "telegram-adium"; + productReference = C410948619BB2D7D0083BF3F /* telegram-adium.AdiumPlugin */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C410947E19BB2D7D0083BF3F /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0510; + ORGANIZATIONNAME = "Matthias Jentsch"; + }; + buildConfigurationList = C410948119BB2D7D0083BF3F /* Build configuration list for PBXProject "telegram-adium" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = C410947D19BB2D7D0083BF3F; + productRefGroup = C410948719BB2D7D0083BF3F /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C410948519BB2D7D0083BF3F /* telegram-adium */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C410948419BB2D7D0083BF3F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C410949019BB2D7D0083BF3F /* InfoPlist.strings in Resources */, + C4877C2619BB6D11006FA91F /* telegram16.png in Resources */, + C4877C2519BB6D11006FA91F /* telegram.png in Resources */, + C4877C2419BB6D11006FA91F /* telegram.svg in Resources */, + C4877C2819BB6D11006FA91F /* telegram48.png in Resources */, + C4877C2719BB6D11006FA91F /* telegram22.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C410948219BB2D7D0083BF3F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C4BF992219BB8B4D0038D507 /* queries.c in Sources */, + C4BF991C19BB8B4D0038D507 /* binlog.c in Sources */, + C4877C1819BB37EA006FA91F /* TelegramService.m in Sources */, + C4BF992519BB8B4D0038D507 /* tools.c in Sources */, + C4BF991F19BB8B4D0038D507 /* mtproto-client.c in Sources */, + C4877C1A19BB3D91006FA91F /* telegram-purple.c in Sources */, + C4BF992319BB8B4D0038D507 /* structures.c in Sources */, + C4BF992019BB8B4D0038D507 /* mtproto-common.c in Sources */, + C4BF992419BB8B4D0038D507 /* telegram.c in Sources */, + C4BF991D19BB8B4D0038D507 /* loop.c in Sources */, + C410949B19BB337A0083BF3F /* TelegramPlugin.m in Sources */, + C4877C1E19BB676B006FA91F /* AdiumTelegramAccount.m in Sources */, + C4BF991E19BB8B4D0038D507 /* msglog.c in Sources */, + C4BF992119BB8B4D0038D507 /* net.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + C410948E19BB2D7D0083BF3F /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + C410948F19BB2D7D0083BF3F /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C410949219BB2D7D0083BF3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + C410949319BB2D7D0083BF3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.9; + SDKROOT = macosx; + }; + name = Release; + }; + C410949519BB2D7D0083BF3F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "telegram-adium/telegram-adium-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(PROJECT_DIR)/libglib.framework/Headers/", + "$(PROJECT_DIR)/libpurple.framework/Headers/", + "$(PROJECT_DIR)/..", + ); + INFOPLIST_FILE = "telegram-adium/telegram-adium-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Application Support/Adium 2.0/PlugIns/"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = AdiumPlugin; + }; + name = Debug; + }; + C410949619BB2D7D0083BF3F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + "FRAMEWORK_SEARCH_PATHS[arch=*]" = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "telegram-adium/telegram-adium-Prefix.pch"; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(PROJECT_DIR)/Frameworks/libglib.framework/Headers/", + "$(PROJECT_DIR)/libpurple.framework/Headers/", + "$(PROJECT_DIR)/..", + ); + INFOPLIST_FILE = "telegram-adium/telegram-adium-Info.plist"; + INSTALL_PATH = "$(HOME)/Library/Application Support/Adium 2.0/PlugIns/"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = AdiumPlugin; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C410948119BB2D7D0083BF3F /* Build configuration list for PBXProject "telegram-adium" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C410949219BB2D7D0083BF3F /* Debug */, + C410949319BB2D7D0083BF3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C410949419BB2D7D0083BF3F /* Build configuration list for PBXNativeTarget "telegram-adium" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C410949519BB2D7D0083BF3F /* Debug */, + C410949619BB2D7D0083BF3F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C410947E19BB2D7D0083BF3F /* Project object */; +} diff --git a/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..595620b --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcshareddata/telegram-adium.xccheckout b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcshareddata/telegram-adium.xccheckout new file mode 100644 index 0000000..790fe0a --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcshareddata/telegram-adium.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 1C5A3335-4726-410A-8E70-801C8879E269 + IDESourceControlProjectName + telegram-adium + IDESourceControlProjectOriginsDictionary + + 075EDEE1-AF43-4A9A-8B99-96488680535F + ssh://bitbucket.org/telegrampurple/telegram-purple.git + + IDESourceControlProjectPath + telegram-adium/telegram-adium.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + 075EDEE1-AF43-4A9A-8B99-96488680535F + ../../.. + + IDESourceControlProjectURL + ssh://bitbucket.org/telegrampurple/telegram-purple.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + 075EDEE1-AF43-4A9A-8B99-96488680535F + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 075EDEE1-AF43-4A9A-8B99-96488680535F + IDESourceControlWCCName + telegram-purple + + + + diff --git a/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcuserdata/matj.xcuserdatad/UserInterfaceState.xcuserstate b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcuserdata/matj.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..a04539b Binary files /dev/null and b/telegram-adium/telegram-adium.xcodeproj/project.xcworkspace/xcuserdata/matj.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 0000000..833b1a9 --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,37 @@ + + + + + + + + + + + + + diff --git a/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/telegram-adium.xcscheme b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/telegram-adium.xcscheme new file mode 100644 index 0000000..8b109a8 --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/telegram-adium.xcscheme @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/xcschememanagement.plist b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..6742db5 --- /dev/null +++ b/telegram-adium/telegram-adium.xcodeproj/xcuserdata/matj.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + telegram-adium.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + C410948519BB2D7D0083BF3F + + primary + + + + + diff --git a/telegram-adium/telegram-adium/en.lproj/InfoPlist.strings b/telegram-adium/telegram-adium/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/telegram-adium/telegram-adium/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/telegram-adium/telegram-adium/telegram-adium-Info.plist b/telegram-adium/telegram-adium/telegram-adium-Info.plist new file mode 100644 index 0000000..5f9b01b --- /dev/null +++ b/telegram-adium/telegram-adium/telegram-adium-Info.plist @@ -0,0 +1,48 @@ + + + + + AIMinimumAdiumVersionRequirement + 1.4 + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + org.telegram-purple.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + AdIM + CFBundleVersion + 1 + CFPlugInDynamicRegisterFunction + + CFPlugInDynamicRegistration + NO + CFPlugInFactories + + 00000000-0000-0000-0000-000000000000 + MyFactoryFunction + + CFPlugInTypes + + 00000000-0000-0000-0000-000000000000 + + 00000000-0000-0000-0000-000000000000 + + + CFPlugInUnloadFunction + + NSHumanReadableCopyright + Copyright © 2014 Matthias Jentsch. All rights reserved. + + diff --git a/telegram-adium/telegram-adium/telegram-adium-Prefix.pch b/telegram-adium/telegram-adium/telegram-adium-Prefix.pch new file mode 100644 index 0000000..6f065c1 --- /dev/null +++ b/telegram-adium/telegram-adium/telegram-adium-Prefix.pch @@ -0,0 +1,14 @@ +// +// Prefix header +// +// The contents of this file are implicitly included at the beginning of every source file. +// + +#ifdef __OBJC__ + #import + #import +#endif + +#ifndef __ADIUM_ + #define __ADIUM_ +#endif \ No newline at end of file