drcoupling.h

00001 /***************************************************************************
00002  *   Copyright (C) 2003 by Gav Wood                                        *
00003  *   gav@cs.york.ac.uk                                                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Library General Public License as       *
00007  *   published by the Free Software Foundation; either version 2 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  ***************************************************************************/
00010 #ifndef _GEDDEI_DRCOUPLING_H
00011 #define _GEDDEI_DRCOUPLING_H
00012 
00013 #include <qmutex.h>
00014 #include <qsocketdevice.h>
00015 
00016 #ifdef __GEDDEI_BUILD
00017 #include "qsocketsession.h"
00018 #include "dxcoupling.h"
00019 #include "qfastwaitcondition.h"
00020 #else
00021 #include <qtextra/qfastwaitcondition.h>
00022 #include <qtextra/qsocketsession.h>
00023 #include <geddei/dxcoupling.h>
00024 #endif
00025 using namespace Geddei;
00026 
00027 class QSocketSession;
00028 
00029 namespace Geddei
00030 {
00031 
00032 class BufferReader;
00033 
00045 class DRCoupling : virtual public DxCoupling
00046 {
00047  //* Reimplementations from xxCoupling (used by DxCoupling)
00048  virtual void go();
00049  virtual void stop();
00050  virtual void stoppingR();
00051  virtual void stoppedR();
00052  virtual void specifyTypes(const SignalTypeRefs &inTypes, const SignalTypeRefs &outTypes);
00053  virtual void initFromProperties(const Properties &p);
00054  virtual void transact(const BufferDatas &d, const uint chunks);
00055  virtual BufferDatas deliverResults(uint *timeTaken);
00056  virtual void defineIO(const uint inputs, const uint outputs);
00057 
00058  QMutex theComm;
00059  QSocketSession theRemote;
00060  QString theRemoteHost;
00061  uint theRemoteKey, theRemoteSubProcessorKey;
00062 
00063 public:
00068  void setCredentials(const QString &remoteHost, const uint remoteKey, const uint remoteSubProcessorKey);
00069 
00073  DRCoupling(DomProcessor *dom, QSocketDevice *sink);
00074 
00078  virtual ~DRCoupling();
00079 };
00080 
00081 
00082 };
00083 
00084 #endif

Generated on Thu Jul 13 06:56:33 2006 for Exscalibar by  doxygen 1.4.7