Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

CProtocolUtil.h

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 CPROTOCOLUTIL_H
00016 #define CPROTOCOLUTIL_H
00017 
00018 #include "BasicTypes.h"
00019 #include "XIO.h"
00020 #include <stdarg.h>
00021 
00022 class IStream;
00023 
00025 
00029 class CProtocolUtil {
00030 public:
00032 
00049     static void         writef(IStream*,
00050                             const char* fmt, ...);
00051 
00053 
00068     static bool         readf(IStream*,
00069                             const char* fmt, ...);
00070 
00071 private:
00072     static void         vwritef(IStream*,
00073                             const char* fmt, UInt32 size, va_list);
00074     static void         vreadf(IStream*,
00075                             const char* fmt, va_list);
00076 
00077     static UInt32       getLength(const char* fmt, va_list);
00078     static void         writef(void*, const char* fmt, va_list);
00079     static UInt32       eatLength(const char** fmt);
00080     static void         read(IStream*, void*, UInt32);
00081 };
00082 
00084 
00088 class XIOReadMismatch : public XIO {
00089 public:
00090     // XBase overrides
00091     virtual CString     getWhat() const throw();
00092 };
00093 
00094 #endif
00095 

Generated on Fri Nov 6 00:21:14 2009 for synergy-plus by  doxygen 1.3.9.1