/******************************************************************************
@header FTBootstrap
@abstract Instances of this class are used to startup the server.
@copyright 2004, 2005, 2006 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-------------------------------------------------------------------------
Modification history
30.01.2005 ola initial version
-------------------------------------------------------------------------
******************************************************************************/
#if !defined(__FTBOOTSTRAP_H)
#define __FTBOOTSTRAP_H
#include
#include
#include
/*!
* @marco FTBootstrap_OPTION_CONFIG_FILE
* @abstract command line option to specify the location of the configuration
* file
*/
#define FTBOOTSTRAP_OPTION_CONFIG_FILE @"-configFile"
/*!
* @class FTBootstrap
* @abstract This interface is used to start the server
*/
@interface FTBootstrap : FTObject {
@private
/**
* configuration of the server
*/
FTConfig *config;
/**
* the currently running server or nil if none is running
*/
id server;
}
/*!
* @method instance
* @abstract this instance is used to startup the
*/
+ (FTBootstrap *) bootstrap;
- init;
- (void) dealloc;
/*!
* @method baseDataDir
* @result directory where data files will be stored
*
DELETE
- (NSString *) baseDataDir;
*/
/*!
* @method config
* @result returns the configuration of the server
*/
- (FTConfig *) config;
/*!
* @method displayCommandlineOptions
* @abstract displays all command line options available
* @result self
*/
- displayCommandlineOptions;
/*!
* @method loadServices
* @abstract Internal method to load all services
* @result self
*/
- loadServices;
/*!
* @method readConfiguration
* @abstract Reads in the configuration of the server.
* @discussion Throught the required parameter
* "-configFile=<ftconfig.xml>" it determines the xml config
* file which contains all configuration settings
* @result self
*/
- readConfiguration;
/*!
* @method setBaseDataDir
* @abstract specify the basis for the data files
* @param dataDir basis of data files
*
DELETE
- setBaseDataDir: (NSString *) dataDir;
*/
/*!
* @method initializeServer
* @abstract initialize the server by creating all database structures
* @discussionion Before using this method {@link #setBaseDataDir} must be called.
* Also take care of using either {@link #startServer} or this method, not
* both.
*/
- (id ) initializeServer;
/*!
* @method startServer
* @abstract start the server. Does nothing if the server is already running
* @discussionion At least the basic data directory has to be set.
* @result return the server being started or currently running.
*/
- (id ) startServer;
@end
#endif