/* * * ProLinga-Run * * Copyright (C) 2002-2008 Xobas Software. * All rights reserved. * * This file is part of ProLinga-Run. * * ProLinga-Run 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. * * ProLinga-Run 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 ProLinga-Run. If not, see . * * More information is available at the following addresses: * * Website : http://www.prolinga.org * * Email : prolinga-list@prolinga.org * * */ #include #include "RunCommon.h" #include "RunConfig.hpp" #include "BuiltIn.hpp" #if BUILD_DATA #include #endif #if BUILD_REPOSITORY #include #endif #if BUILD_VALIDATE #include #endif extern pthread_t mainThreadId; extern ConfigRunPtr confRunPtr; extern BiWebParameterPtr biWebPtr; extern BiQuitLastScreenPtr biQuitLastScreenPtr; #ifdef BUILD_DATA extern PlDataPtr datRunPtr; #else extern char *dataEndPoint; extern int dataCompressionLevel; #endif #ifdef BUILD_REPOSITORY extern PlRepositoryPtr repRunPtr; #else extern char *repositoryEndPoint; extern int repositoryCompressionLevel; #endif #ifdef BUILD_VALIDATE extern PlValidatePtr valRunPtr; #else extern char *validateEndPoint; extern int validateCompressionLevel; #endif void RunInit(char *configFileName, int argc, char **argv) { /* Set Main thread */ mainThreadId = pthread_self(); /* Get Config values */ confRunPtr = new ConfigRun(configFileName); /* Only used for web */ biWebPtr = NULL; /* Set exit strategy */ biQuitLastScreenPtr->setQuitLastScreen(0); #ifdef BUILD_DATA /* Open Data */ datRunPtr = new PlData; datRunPtr->dataOpen(NULL, argc, argv); #else dataEndPoint = NULL; dataCompressionLevel = 0; #endif #ifdef BUILD_REPOSITORY /* Open Repository */ repRunPtr = new PlRepository; repRunPtr->repositoryOpen(configFileName); #else repositoryEndPoint = NULL; repositoryCompressionLevel = 0; #endif #ifdef BUILD_VALIDATE /* Open Validate */ valRunPtr = new PlValidate; valRunPtr->validateOpen(configFileName); #else validateEndPoint = NULL; validateCompressionLevel = 0; #endif }