00001 /* 00002 * synergy -- mouse and keyboard sharing utility 00003 * Copyright (C) 2002 Chris Schoeneman 00004 * 00005 * This package is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * found in the file COPYING that should have accompanied this file. 00008 * 00009 * This package is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 */ 00014 00015 #ifndef XARCHWINDOWS_H 00016 #define XARCHWINDOWS_H 00017 00018 #define WIN32_LEAN_AND_MEAN 00019 00020 #include "XArch.h" 00021 #include <windows.h> 00022 00024 class XArchEvalWindows : public XArchEval { 00025 public: 00026 XArchEvalWindows() : m_errno(GetLastError()) { } 00027 XArchEvalWindows(DWORD err) : m_errno(err) { } 00028 virtual ~XArchEvalWindows() { } 00029 00030 // XArchEval overrides 00031 virtual XArchEval* clone() const throw(); 00032 virtual std::string eval() const throw(); 00033 00034 private: 00035 DWORD m_errno; 00036 }; 00037 00039 class XArchEvalWinsock : public XArchEval { 00040 public: 00041 XArchEvalWinsock(int err) : m_errno(err) { } 00042 virtual ~XArchEvalWinsock() { } 00043 00044 // XArchEval overrides 00045 virtual XArchEval* clone() const throw(); 00046 virtual std::string eval() const throw(); 00047 00048 private: 00049 int m_errno; 00050 }; 00051 00052 #endif