5 // Created by Matt Meissner on 10/30/09.
6 // Modified by Michael Lamb on 2/27/13
7 // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved.
10 #import <AIUtilities/AICharacterSetAdditions.h>
11 #import <AIUtilities/AIImageAdditions.h>
12 #import <Adium/AIStatusControllerProtocol.h>
13 #import <AISharedAdium.h>
15 #import "ESSIPEAccountViewController.h"
16 #import "ESPurpleSIPEAccount.h"
17 #import "ESSIPEService.h"
19 @implementation ESSIPEService
21 #pragma mark Account/Chat Creation
24 return [ESPurpleSIPEAccount class];
27 - (AIAccountViewController *)accountViewController{
28 return [ESSIPEAccountViewController accountViewController];
31 - (DCJoinChatViewController *)joinChatView{
35 #pragma mark Service Description Metadata
36 - (NSString *)serviceCodeUniqueID{
37 return @"libpurple-SIPE";
40 - (NSString *)serviceID{
44 - (NSString *)serviceClass{
48 - (NSString *)shortDescription{
52 - (NSString *)longDescription{
53 return @"Office Communicator";
56 - (BOOL)caseSensitive{
59 - (AIServiceImportance)serviceImportance{
60 return AIServiceSecondary;
62 - (BOOL)canCreateGroupChats{
66 // Some auth schemes may not need a password
67 - (BOOL)requiresPassword{
71 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType {
72 NSImage *baseImage = [NSImage imageNamed:@"sipe" forClass:[self class]];
74 if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
75 [baseImage setSize:NSMakeSize(16, 16)];
82 #pragma mark Service Properties
83 - (NSCharacterSet *)allowedCharacters
85 NSMutableCharacterSet *allowedCharacters = [[NSCharacterSet alphanumericCharacterSet] mutableCopy];
86 NSCharacterSet *returnSet;
88 [allowedCharacters addCharactersInString:@"._@-()[]^%#|/\\`=,"];
89 returnSet = [allowedCharacters immutableCopy];
91 return [returnSet autorelease];
95 - (void)registerStatuses{
98 [adium.statusController registerStatus:STATUS_NAME_AVAILABLE
99 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
100 ofType:AIAvailableStatusType
103 [adium.statusController registerStatus:STATUS_NAME_AWAY
104 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
105 ofType:AIAwayStatusType
108 [adium.statusController registerStatus:STATUS_NAME_BUSY
109 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_BUSY]
110 ofType:AIAwayStatusType
113 [adium.statusController registerStatus:STATUS_NAME_INVISIBLE
114 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_INVISIBLE]
115 ofType:AIInvisibleStatusType
118 [adium.statusController registerStatus:STATUS_NAME_BRB
119 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_BRB]
120 ofType:AIAwayStatusType
123 [adium.statusController registerStatus:STATUS_NAME_DND
124 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_DND]
125 ofType:AIAwayStatusType
128 [adium.statusController registerStatus:STATUS_NAME_LUNCH
129 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_LUNCH]
130 ofType:AIAwayStatusType
133 [adium.statusController registerStatus:STATUS_NAME_OFFLINE
134 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_OFFLINE]
135 ofType:AIOfflineStatusType
138 [adium.statusController registerStatus:STATUS_NAME_PHONE
139 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_PHONE]
140 ofType:AIAwayStatusType
143 [adium.statusController registerStatus:STATUS_NAME_NOT_AT_DESK
144 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_NOT_AT_DESK]
145 ofType:AIAwayStatusType
148 [adium.statusController registerStatus:STATUS_NAME_NOT_IN_OFFICE
149 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_NOT_IN_OFFICE]
150 ofType:AIAwayStatusType
153 [adium.statusController registerStatus:STATUS_NAME_AWAY_FRIENDS_ONLY
154 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY_FRIENDS_ONLY]
155 ofType:AIAwayStatusType