00001 /* 00002 * Copyright (C) 2006, Jose Renato Santos. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 /////////////////////////////////////////////////////////////////////////////// 00019 // global.cpp : Declaration of global variables 00020 /////////////////////////////////////////////////////////////////////////////// 00021 00022 #include "config.h" 00023 #include "request.h" 00024 #include "msgqueue.h" 00025 #include "routerinterface.h" 00026 #include "clientinterface.h" 00027 #include "storagedevice.h" 00028 #include "NetMgr.h" 00029 #include "LogRotation.h" 00030 #include "SearchLogs.h" 00031 #include "NetInterface.h" 00032 #include <sys/types.h> 00033 #include <unistd.h> 00034 #include <stdio.h> 00035 #include <stdlib.h> 00036 00037 // Current configuration parameters 00038 StorageConfig Config; 00039 00040 // Request Manager 00041 CRequestManager RequestManager; 00042 00043 // Router Message Manager 00044 CMsgManager MsgManager; 00045 00046 // Router Interface 00047 CRouterInterface Router; 00048 00049 // Client Interface 00050 CClientInterface Client; 00051 00052 // Pointer to Storage Devices vector (number of elements in vector is 00053 // number of disks in Config structure) 00054 CStorageDevice* Device; 00055 00056 // NetManager 00057 // Manages network to communicate with client 00058 NetMgr NetManager( true ); 00059 00060 // SentPackagesLog 00061 // New class used to store all the send package information 00062 CLogRotation SentPackagesLog; 00063 00064 // SearchPackagesLogs 00065 // New class used to search logs managed by SentPackagesLog object 00066 CSearchLogs SearchPackagesLogs; 00067 00068 // NetInterface 00069 // New network managment class also used to communicate with client 00070 CNetInterface NetInterface; 00071