Main Page | Class List | File List

svdrpc.h

00001 /***************************************************************************
00002                           svdrpc.h  -  description
00003                              -------------------
00004     begin                : Sat Aug  5 13:32:09 MEST 2000
00005     copyright            : (C) 2000 by Guido
00006     email                : gfiala@s.netic.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __SVDRPC_H
00019 #define __SVDRPC_H
00020 
00021 //#define _GNU_SOURCE
00022 
00023 #define MAXCMDBUFFER 256
00024 
00025 class cSocket {
00026 private:
00027   int port;
00028   int sock;
00029   int queue;
00030 public:
00031   ~cSocket();
00032   bool Open(int Port);
00033   int Connect(void);
00034   void Close(void);
00035 };
00036 
00037 class cSVDRPC {
00038 public:
00039   ~cSVDRPC();
00040   bool Connected();
00041   bool CmdQuit();
00042   bool CmdTKey(const char *key);
00043   const char* CmdChan();
00044   char name[22];
00045   void Open(int Port);
00046   void Close(void);
00047 private:
00048   cSocket socket;
00049   int  filedes;
00050   int port;
00051   bool Send(const char *s, int length = -1);
00052   bool ReadReply();
00053   char buf[MAXCMDBUFFER];
00054   int  outstandingReply;
00055 };
00056 
00057 #endif //__SVDRP_H

Generated on Tue Jan 17 18:19:44 2006 for kvdr.kdevelop by doxygen 1.3.5