Plugins/Purple Service/CBPurpleServicePlugin.m
author Thijs Alkemade <me@thijsalkema.de>
Tue, 21 Mar 2017 21:13:27 +0100
branchadium-1.5.10.3
changeset 5957 81732180bddf
parent 3938 035ebbd633af
child 5963 a1d5ba1db0a6
permissions -rw-r--r--
Nuked MSN and Yahoo, which are known to not be working anymore. Good riddance.
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     1
/* 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     2
 * Adium is the legal property of its developers, whose names are listed in the copyright file included
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     3
 * with this source distribution.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     4
 * 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     6
 * General Public License as published by the Free Software Foundation; either version 2 of the License,
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     7
 * or (at your option) any later version.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     8
 * 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    10
 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    11
 * Public License for more details.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    12
 * 
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    13
 * You should have received a copy of the GNU General Public License along with this program; if not,
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    14
 * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    15
 */
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    16
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    17
#import "CBPurpleServicePlugin.h"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    18
#import "PurpleServices.h"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    19
#import "SLPurpleCocoaAdapter.h"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    20
#import <Adium/AIAccount.h>
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    21
#import <AIUtilities/AIDictionaryAdditions.h>
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    22
#import <AdiumLibpurple/SLPurpleCocoaAdapter.h>
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    23
#import "AMPurpleTuneTooltip.h"
1373
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    24
#import "AIIRCServicesPasswordPlugin.h"
2429
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    25
#import "AIAnnoyingIRCMessagesHiderPlugin.h"
3938
035ebbd633af First pass at Facebook XMPP. Definitely **NOT** ready for actual use, but it does connect.
Colin Barrett <colin@springsandstruts.com>
parents: 3926
diff changeset
    26
#import "AIFacebookXMPPService.h"
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    27
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    28
@implementation CBPurpleServicePlugin
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    29
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    30
#pragma mark Plugin Installation
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    31
//  Plugin Installation ------------------------------------------------------------------------------------------------
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    32
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    33
#define PURPLE_DEFAULTS   @"PurpleServiceDefaults"
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    34
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    35
- (void)installPlugin
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    36
{
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    37
	//Register our defaults
95
47acbc0cc17a Propertyize AIListObject and convert some more controller accesses to dot syntax
David Smith
parents: 0
diff changeset
    38
    [adium.preferenceController registerDefaults:[NSDictionary dictionaryNamed:PURPLE_DEFAULTS
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    39
																		forClass:[self class]]
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    40
										  forGroup:GROUP_ACCOUNT_STATUS];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    41
	
2720
49e3d337bc35 Backed out changeset a70a33c83ba5, this had already been done.
Stephen Holt <sholt@adium.im>
parents: 2719
diff changeset
    42
    //Install the services
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    43
	[ESAIMService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    44
	[ESDotMacService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    45
	[AIMobileMeService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    46
	[ESICQService registerService];
660
b913d00c0879 Removed the Facebook Service plugin. Added a libpurple-based Facebook service which uses pidgin-facebook (which is now compiled into our libpurple.framework).
Evan Schoenberg
parents: 227
diff changeset
    47
	[PurpleFacebookService registerService];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    48
	[ESGaduGaduService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    49
	[AIGTalkService registerService];
227
31972a2419e3 Made IRC part of the default Purple Service rather than an external plugin. Fixes #231. Please make separate tickets for specific issues which should be addressed before releasing with IRC support, such as topic display. :)
Evan Schoenberg
parents: 100
diff changeset
    50
	[ESIRCService registerService];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    51
	[AILiveJournalService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    52
	[PurpleMySpaceService registerService];
3926
ff50ddfe7fb2 Nuke QQ everywhere in Adium too.
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 2720
diff changeset
    53
	/* TODO for release of 1.5: At the very least, present to users who had a QQ account
ff50ddfe7fb2 Nuke QQ everywhere in Adium too.
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 2720
diff changeset
    54
	 * a message that it's no longer supported.
ff50ddfe7fb2 Nuke QQ everywhere in Adium too.
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 2720
diff changeset
    55
	 */
ff50ddfe7fb2 Nuke QQ everywhere in Adium too.
Thijs Alkemade <thijsalkemade@gmail.com>
parents: 2720
diff changeset
    56
	//[ESQQService registerService];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    57
	[ESSimpleService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    58
	[ESNovellService registerService];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    59
	[ESJabberService registerService];
2410
1e7772b50f13 Disable Zephyr, since it just crashes.
Zachary West <zacw@adium.im>
parents: 1946
diff changeset
    60
	//[ESZephyrService registerService];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    61
	[ESMeanwhileService registerService];
3938
035ebbd633af First pass at Facebook XMPP. Definitely **NOT** ready for actual use, but it does connect.
Colin Barrett <colin@springsandstruts.com>
parents: 3926
diff changeset
    62
    [AIFacebookXMPPService registerService];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    63
	
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    64
	[SLPurpleCocoaAdapter pluginDidLoad];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    65
	
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    66
	//tooltip for tunes
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    67
	tunetooltip = [[AMPurpleTuneTooltip alloc] init];
100
68210ab2807a sed is evil. All [adium *Controller]s are now adium.*Controller.
David Smith
parents: 95
diff changeset
    68
	[adium.interfaceController registerContactListTooltipEntry:tunetooltip secondaryEntry:YES];
1373
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    69
	
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    70
	ircPasswordPlugin = [[AIIRCServicesPasswordPlugin alloc] init];
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    71
	[ircPasswordPlugin installPlugin];
2429
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    72
	
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    73
	messageHiderPlugin = [[AIAnnoyingIRCMessagesHiderPlugin alloc] init];
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    74
	[messageHiderPlugin installPlugin];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    75
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    76
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    77
- (void)uninstallPlugin
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    78
{
100
68210ab2807a sed is evil. All [adium *Controller]s are now adium.*Controller.
David Smith
parents: 95
diff changeset
    79
	[adium.interfaceController unregisterContactListTooltipEntry:tunetooltip secondaryEntry:YES];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    80
	[tunetooltip release];
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    81
	tunetooltip = nil;	
1373
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    82
	
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    83
	[ircPasswordPlugin uninstallPlugin];
f13700915250 Add a new type of saved password?"special" passwords. Can be used for pretty much anything, but the only use of it now is the following.
Zachary West <zacw@adiumx.com>
parents: 660
diff changeset
    84
	[ircPasswordPlugin release];
2429
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    85
	
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    86
	[messageHiderPlugin uninstallPlugin];
4211a3be19a2 Create a new plugin - AIAnnoyingIRCMessagesHiderPlugin - which hides, well, annoying messages.
Zachary West <zacw@adium.im>
parents: 2410
diff changeset
    87
	[messageHiderPlugin release];
0
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    88
}
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    89
e22ad6bc8b46 svn 1.5 merge tracking is terrible. This is a manual merge of the Sparkle 1.5 branch into trunk
David Smith
parents:
diff changeset
    90
@end