00001 /* Copyright (C) 2004 Guido Simone 00002 * 00003 * This program is free software; you can redistribute it and/or modify 00004 * it under the terms of the GNU General Public License as published by 00005 * the Free Software Foundation; either version 2 of the License, or 00006 * (at your option) any later version. 00007 * 00008 * This program is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 * GNU General Public License for more details. 00012 00013 * You should have received a copy of the GNU General Public License 00014 * along with this program; if not, write to the Free Software 00015 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 */ 00017 00018 #ifndef GXLIB_GXPLATFORMHELPER_H 00019 #define GXLIB_GXPLATFORMHELPER_H 00020 00021 #include "../gx.h" 00022 00023 class gxPath; 00024 00049 class gxPlatformHelper 00050 { 00051 public: 00052 gxPlatformHelper(); 00053 virtual ~gxPlatformHelper(); 00054 00063 static int newMutex( void ** mutex); 00064 static int deleteMutex( void * mutex); 00065 static int lockMutex( void * mutex); 00066 static int unlockMutex( void * mutex); 00067 00068 static int newEvent( void ** event); 00069 static int deleteEvent( void * event); 00070 static int signalEvent( void * event); 00071 static int waitForEvent( void * event, long time); 00072 00073 static std::string getModuleFileName(); 00074 static std::string getAppDataFolder(); 00075 00081 static int ensureFolderExists( gxPath & folderPath ); 00082 00083 private: 00084 gxPlatformHelper( const gxPlatformHelper & rhs); 00085 gxPlatformHelper & operator=( const gxPlatformHelper & rhs); 00086 }; 00087 #endif