5 // Created by Matt Meissner on 10/30/09.
6 // Copyright 2009 Matt Meissner. All rights reserved.
9 #import <AppKit/AppKit.h>
11 #import <AIUtilities/AICharacterSetAdditions.h>
12 #import <AIUtilities/AIImageAdditions.h>
13 #import <Adium/AIStatusControllerProtocol.h>
14 #import <AISharedAdium.h>
16 #import "ESSIPEAccountViewController.h"
17 #import "ESPurpleSIPEAccount.h"
18 #import "ESSIPEService.h"
20 @implementation ESSIPEService
22 //Account Creation -----------------------------------------------------------------------------------------------------
23 #pragma mark Account Creation
27 return [ESPurpleSIPEAccount class];
30 - (AIAccountViewController *)accountViewController{
31 return [ESSIPEAccountViewController accountViewController];
34 //Service Description --------------------------------------------------------------------------------------------------
35 #pragma mark Service Description
36 - (NSString *)serviceCodeUniqueID{
37 return @"libpurple-SIPE";
40 - (NSString *)serviceID{
44 - (NSString *)serviceClass{
48 - (NSString *)shortDescription{
49 return @"Office Communicator";
52 - (NSString *)longDescription{
53 return @"Office Communicator";
56 - (NSString *)UIDPlaceholder
58 return @"username@company.com,DOMAIN\\username";
62 - (NSCharacterSet *)allowedCharacters
64 NSMutableCharacterSet *allowedCharacters = [[NSCharacterSet alphanumericCharacterSet] mutableCopy];
65 NSCharacterSet *returnSet;
67 [allowedCharacters addCharactersInString:@"._@-()[]^%#|/\\`=,"];
68 returnSet = [allowedCharacters immutableCopy];
70 return [returnSet autorelease];
73 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType
77 if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
78 image = [NSImage imageNamed:@"sipe-small"];
80 image = [NSImage imageNamed:@"sipe"];
86 - (NSString *)pathForDefaultServiceIconOfType:(AIServiceIconType)iconType
88 if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
89 return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"sipe-small"];
91 return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"sipe"];
95 //Service Properties ---------------------------------------------------------------------------------------------------
96 #pragma mark Service Properties
98 - (BOOL)canCreateGroupChats
103 - (AIServiceImportance)serviceImportance{
104 return AIServiceSecondary;
107 - (void)registerStatuses{
108 [adium.statusController registerStatus:STATUS_NAME_AVAILABLE
109 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
110 ofType:AIAvailableStatusType
113 - (BOOL)supportsPassword
118 - (BOOL)requiresPassword