audio: minor refactorings
[siplcs.git] / src / adium / ESSIPEService.m
blob4e81172c9f85944c7cc1b7162416b610b4f760da
1 //
2 //  ESSIPEService.m
3 //  SIPEAdiumPlugin
4 //
5 //  Created by Matt Meissner on 10/30/09.
6 //  Copyright 2009 Matt Meissner. All rights reserved.
7 //
9 #import <AppKit/AppKit.h>
11 #import <AIUtilities/AICharacterSetAdditions.h>
12 #import <AIUtilities/AIImageAdditions.h>
14 #import "ESPurpleSIPEAccount.h"
15 #import "ESSIPEService.h"
17 @implementation ESSIPEService
19 //Account Creation -----------------------------------------------------------------------------------------------------
20 #pragma mark Account Creation
22 - (Class)accountClass
24         return [ESPurpleSIPEAccount class];
27 //Service Description --------------------------------------------------------------------------------------------------
28 #pragma mark Service Description
29 - (NSString *)serviceCodeUniqueID{
30     return @"libpurple-SIPE";
33 - (NSString *)serviceID{
34     return @"SIPE";
37 - (NSString *)serviceClass{
38         return @"SIPE";
41 - (NSString *)shortDescription{
42     return @"Office Communicator";
45 - (NSString *)longDescription{
46     return @"Office Communicator";
49 - (NSString *)UIDPlaceholder
51         return @"first.last.company.com@company.net";
54 - (NSCharacterSet *)allowedCharacters
56         NSMutableCharacterSet *allowedCharacters = [[NSCharacterSet alphanumericCharacterSet] mutableCopy];
57         NSCharacterSet *returnSet;
58         
59         [allowedCharacters addCharactersInString:@"._@-()[]^%#|\\`=,"];
60         returnSet = [allowedCharacters immutableCopy];
61         
62         return [returnSet autorelease];
65 - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType
67         NSImage *image;
68         
69         if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
70                 image = [NSImage imageNamed:@"sipe-small"];
71         } else {
72                 image = [NSImage imageNamed:@"sipe"];
73         }
75         return image;
78 - (NSString *)pathForDefaultServiceIconOfType:(AIServiceIconType)iconType
80         if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) {
81                 return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"sipe-small"];
82         } else {
83                 return [[NSBundle bundleForClass:[self class]] pathForImageResource:@"sipe"];           
84         }
87 //Service Properties ---------------------------------------------------------------------------------------------------
88 #pragma mark Service Properties
90 - (BOOL)canCreateGroupChats
92         return YES;
95 @end