Enable/disable the okay button based on the presence of text in the To: field for...
[adiumx.git] / Plugins / Bonjour / AWBonjourService.m
blobc88d4112ea98bbdbb40aa4d4cda83f297d1b940b
1 //
2 //  AWBonjourService.m
3 //  Adium
4 //
5 //  Created by Adam Iser on 8/26/04.
6 //  Copyright (c) 2004-2006 The Adium Team. All rights reserved.
7 //
9 #import <Adium/AIStatusControllerProtocol.h>
10 #import "AWBonjourAccount.h"
11 #import "AWBonjourService.h"
12 #import "ESBonjourAccountViewController.h"
13 #import <Adium/DCJoinChatViewController.h>
15 @implementation AWBonjourService
17 //Account Creation
18 - (Class)accountClass{
19         return [AWBonjourAccount class];
22 - (AIAccountViewController *)accountViewController{
23     return [ESBonjourAccountViewController accountViewController];
26 - (DCJoinChatViewController *)joinChatView{
27         return [DCJoinChatViewController joinChatView];
30 //Service Description
31 - (NSString *)serviceCodeUniqueID{
32         return @"bonjour-libezv";
34 - (NSString *)serviceID{
35         return @"Bonjour";
37 - (NSString *)serviceClass{
38         return @"Bonjour";
40 - (NSString *)shortDescription{
41         return @"Bonjour";
43 - (NSString *)longDescription{
44         return @"Bonjour";
46 - (NSCharacterSet *)allowedCharacters{
47         return [[NSCharacterSet illegalCharacterSet] invertedSet];
49 - (NSCharacterSet *)ignoredCharacters{
50         return [NSCharacterSet characterSetWithCharactersInString:@""];
52 - (int)allowedLength{
53         return 999;
55 - (BOOL)caseSensitive{
56         return YES;
58 - (AIServiceImportance)serviceImportance{
59         return AIServiceSecondary;
61 - (BOOL)supportsProxySettings{
62         return NO;
64 //No need for a password for Bonjour accounts
65 - (BOOL)supportsPassword
67         return NO;
69 - (void)registerStatuses{
70         [[adium statusController] registerStatus:STATUS_NAME_AVAILABLE
71                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
72                                                                           ofType:AIAvailableStatusType
73                                                                   forService:self];
74         
75         [[adium statusController] registerStatus:STATUS_NAME_AWAY
76                                                          withDescription:[[adium statusController] localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
77                                                                           ofType:AIAwayStatusType
78                                                                   forService:self];
80 - (NSString *)defaultUserName {
81         return NSFullUserName(); 
83 @end