ne7ssh_mutex.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005-2006 by NetSieben Technologies INC                 *
00003  *   Author: Andrew Useckas                                                *
00004  *   Email: andrew@netsieben.com                                           *
00005  *                                                                         *
00006  *   Windows Port and bugfixes: Keef Aragon <keef@netsieben.com>           *
00007  *                                                                         *
00008  *   This program may be distributed under the terms of the Q Public       *
00009  *   License as defined by Trolltech AS of Norway and appearing in the     *
00010  *   file LICENSE.QPL included in the packaging of this file.              *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *
00015  ***************************************************************************/
00016 
00017 
00018 #ifndef NE7SSH_MUTEX_H
00019 #define NE7SSH_MUTEX_H
00020 
00021 #if defined(WIN32) || defined(__MINGW32__)
00022 #   include <windows.h>
00023 #else
00024 #   include <pthread.h>
00025 #endif
00026 
00027 class Ne7ssh_Mutex
00028 {
00029 public:
00030     Ne7ssh_Mutex();
00031 
00032     int lock();
00033 
00034     int unlock();
00035 
00036     ~Ne7ssh_Mutex();
00037 private:
00038 #if defined(WIN32) || defined(__MINGW32__)
00039     CRITICAL_SECTION mutint;
00040 #else
00041     pthread_mutex_t mutint;
00042 #endif
00043 };
00044 
00045 #endif

Generated on Tue May 5 14:10:41 2009 for ne7ssh.kdevelop by  doxygen 1.5.9