/*
* $Id: STSessionRestoreTab.m 198 2010-01-06 23:05:30Z stuart $
*
* SafariTabs
* http://stuconnolly.com/projects/safaritabs/
*
* Copyright (c) 2010 Stuart Connolly. All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#import "STSessionRestoreTab.h"
@implementation STSessionRestoreTab
@synthesize tabTitle;
@synthesize tabURL;
@synthesize tabEnabled;
@synthesize tabIcon;
/*!
* Returns an initialised restore tab using the supplied details.
*
* @param title The tab's title.
* @param url The tab's URL.
* @param icon The tab's icon.
*
* @return The initialised restore tab instance.
*/
{
return [[[STSessionRestoreTab alloc] initWithTitle:title url:url icon:icon] autorelease];
}
/*!
* Initialises a restore tab using the supplied details.
*
* @param title The tab's title.
* @param url The tab's URL.
* @param icon The tab's icon.
*
* @return The initialised restore tab instance.
*/
{
if ((self = [super init])) {
[self setTabTitle:title];
[self setTabURL:url];
[self setTabEnabled
:[NSNumber numberWithBool
:YES]];
[self setTabIcon:icon];
}
return self;
}
/*!
* Returns a description of this object instance.
*
* @return The description as a string.
*/
{
return [NSString stringWithFormat
:@"<%@: %@, %@>",
[self className
],
[self tabTitle
],
[self tabURL
]];
}
/*!
* @brief Dealloc
*/
- (void)dealloc
{
[tabTitle release], tabTitle = nil;
[tabURL release], tabURL = nil;
[tabEnabled release], tabEnabled = nil;
[tabIcon release], tabIcon = nil;
[super dealloc];
}
@end