Plugins/Purple Service/ESMSNService.m
branchadium-1.5.11-merge
changeset 6013 f8d0dc659e3f
parent 5941 307f53385811
parent 6012 200a01709ba4
child 6014 fcb71cb71a3d
child 6015 2b01cc935b7c
equal deleted inserted replaced
5941:307f53385811 6013:f8d0dc659e3f
     1 /* 
       
     2  * Adium is the legal property of its developers, whose names are listed in the copyright file included
       
     3  * with this source distribution.
       
     4  * 
       
     5  * This program is free software; you can redistribute it and/or modify it under the terms of the GNU
       
     6  * General Public License as published by the Free Software Foundation; either version 2 of the License,
       
     7  * or (at your option) any later version.
       
     8  * 
       
     9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
       
    10  * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
       
    11  * Public License for more details.
       
    12  * 
       
    13  * You should have received a copy of the GNU General Public License along with this program; if not,
       
    14  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
       
    15  */
       
    16 
       
    17 #import <Adium/AIStatusControllerProtocol.h>
       
    18 #import "DCPurpleMSNJoinChatViewController.h"
       
    19 #import "ESPurpleMSNAccount.h"
       
    20 #import "ESPurpleMSNAccountViewController.h"
       
    21 #import "ESMSNService.h"
       
    22 
       
    23 @implementation ESMSNService
       
    24 
       
    25 //Account Creation
       
    26 - (Class)accountClass{
       
    27 	return [ESPurpleMSNAccount class];
       
    28 }
       
    29 
       
    30 - (AIAccountViewController *)accountViewController{
       
    31     return [ESPurpleMSNAccountViewController accountViewController];
       
    32 }
       
    33 
       
    34 - (DCJoinChatViewController *)joinChatView{
       
    35 	return [DCPurpleMSNJoinChatViewController joinChatView];
       
    36 }
       
    37 
       
    38 //Service Description
       
    39 - (NSString *)serviceCodeUniqueID{
       
    40 	return @"libpurple-MSN";
       
    41 }
       
    42 - (NSString *)serviceID{
       
    43 	return @"MSN";
       
    44 }
       
    45 - (NSString *)serviceClass{
       
    46 	return @"MSN";
       
    47 }
       
    48 - (NSString *)shortDescription{
       
    49 	return @"MSN";
       
    50 }
       
    51 - (NSString *)longDescription{
       
    52 	return @"MSN Messenger";
       
    53 }
       
    54 - (NSCharacterSet *)allowedCharacters{
       
    55 	return [NSCharacterSet characterSetWithCharactersInString:@"+abcdefghijklmnopqrstuvwxyz0123456789@._-"];
       
    56 }
       
    57 - (NSUInteger)allowedLength{
       
    58 	return 113;
       
    59 }
       
    60 - (BOOL)caseSensitive{
       
    61 	return NO;
       
    62 }
       
    63 - (AIServiceImportance)serviceImportance{
       
    64 	return AIServicePrimary;
       
    65 }
       
    66 - (NSString *)userNameLabel{
       
    67     return AILocalizedString(@"MSN Passport","");    //Sign-in name
       
    68 }
       
    69 
       
    70 - (void)registerStatuses{
       
    71 	[adium.statusController registerStatus:STATUS_NAME_AVAILABLE
       
    72 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AVAILABLE]
       
    73 									  ofType:AIAvailableStatusType
       
    74 								  forService:self];
       
    75 	
       
    76 	[adium.statusController registerStatus:STATUS_NAME_AWAY
       
    77 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_AWAY]
       
    78 									  ofType:AIAwayStatusType
       
    79 								  forService:self];
       
    80 	
       
    81 	[adium.statusController registerStatus:STATUS_NAME_BRB
       
    82 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_BRB]
       
    83 									  ofType:AIAwayStatusType
       
    84 								  forService:self];
       
    85 	
       
    86 	[adium.statusController registerStatus:STATUS_NAME_BUSY
       
    87 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_BUSY]
       
    88 									  ofType:AIAwayStatusType
       
    89 								  forService:self];
       
    90 	
       
    91 	[adium.statusController registerStatus:STATUS_NAME_PHONE
       
    92 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_PHONE]
       
    93 									  ofType:AIAwayStatusType
       
    94 								  forService:self];
       
    95 	
       
    96 	[adium.statusController registerStatus:STATUS_NAME_LUNCH
       
    97 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_LUNCH]
       
    98 									  ofType:AIAwayStatusType
       
    99 								  forService:self];
       
   100 
       
   101 	[adium.statusController registerStatus:STATUS_NAME_INVISIBLE
       
   102 							 withDescription:[adium.statusController localizedDescriptionForCoreStatusName:STATUS_NAME_INVISIBLE]
       
   103 									  ofType:AIInvisibleStatusType
       
   104 								  forService:self];
       
   105 	/*
       
   106 	m = g_list_append(m, _("Available"));
       
   107 	m = g_list_append(m, _("Away From Computer"));
       
   108 	m = g_list_append(m, _("Be Right Back"));
       
   109 	m = g_list_append(m, _("Busy"));
       
   110 	m = g_list_append(m, _("On The Phone"));
       
   111 	m = g_list_append(m, _("Out To Lunch"));
       
   112 	m = g_list_append(m, _("Hidden"));
       
   113 	 */
       
   114 }
       
   115 
       
   116 @end