Plugins/Purple Service/PurpleMySpaceAccount.m
branchadium-1.5.11
changeset 6014 fcb71cb71a3d
parent 5941 307f53385811
parent 6013 f8d0dc659e3f
child 6016 325e2ab3406f
equal deleted inserted replaced
5941:307f53385811 6014:fcb71cb71a3d
     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 "PurpleMySpaceAccount.h"
       
    18 #import <Adium/AIHTMLDecoder.h>
       
    19 
       
    20 @implementation PurpleMySpaceAccount
       
    21 
       
    22 - (const char*)protocolPlugin
       
    23 {
       
    24     return "prpl-myspace";
       
    25 }
       
    26 
       
    27 - (NSString *)connectionStringForStep:(NSInteger)step
       
    28 {
       
    29 	switch (step) {
       
    30 	case 0:
       
    31 		return AILocalizedString(@"Connecting",nil);
       
    32 		break;
       
    33 	case 1:
       
    34 		return AILocalizedString(@"Reading challenge", "Description of a step in the connection process for MySpace. This could be translated as something like 'Reading from server'.");
       
    35 		break;
       
    36 	case 2:
       
    37 		return AILocalizedString(@"Logging in","Connection step");
       
    38 		break;			
       
    39 	case 3:
       
    40 		return AILocalizedString(@"Connected","Connection step");
       
    41 		break;
       
    42 	}
       
    43 
       
    44 	return nil;
       
    45 }
       
    46 	
       
    47 - (NSString *)encodedAttributedString:(NSAttributedString *)inAttributedString forListObject:(AIListObject *)inListObject
       
    48 {
       
    49 	return [AIHTMLDecoder encodeHTML:inAttributedString
       
    50 							 headers:YES
       
    51 							fontTags:YES
       
    52 				  includingColorTags:YES
       
    53 					   closeFontTags:YES
       
    54 						   styleTags:YES
       
    55 		  closeStyleTagsOnFontChange:YES
       
    56 					  encodeNonASCII:YES
       
    57 						encodeSpaces:NO
       
    58 						  imagesPath:nil
       
    59 				   attachmentsAsText:YES
       
    60 		   onlyIncludeOutgoingImages:NO
       
    61 					  simpleTagsOnly:NO
       
    62 					  bodyBackground:NO
       
    63 				 allowJavascriptURLs:YES];
       
    64 }
       
    65 
       
    66 @end