00001 /* 00002 * Copyright (C) 2009, Edmundo Albuquerque de Souza e Silva. 00003 * 00004 * This file may be distributed under the terms of the Q Public License 00005 * as defined by Trolltech AS of Norway and appearing in the file 00006 * LICENSE.QPL included in the packaging of this file. 00007 * 00008 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 00009 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00010 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 00011 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 00012 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 00013 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 00014 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00015 * 00016 */ 00017 00018 /////////////////////////////////////////////////////////////////////////////// 00019 // clientinterface.h : Defines class CClientInterface, which 00020 // implements the communication with client 00021 /////////////////////////////////////////////////////////////////////////////// 00022 00023 #ifndef __CLIENTINTERFACE_H_ 00024 #define __CLIENTINTERFACE_H_ 00025 00026 #include <vsitypesint.h> 00027 #include <vsisocket.h> 00028 #include <vsithread.h> 00029 00030 #include <sys/time.h> 00031 #include <request.h> 00032 00033 class CClientInterface 00034 { 00035 public: 00036 CClientInterface(); 00037 ~CClientInterface(); 00038 int Initialize (); 00039 int Initialize (int SendFlag, double m_EstimatedTimeParameter); 00040 void Stop (); 00041 void Send(StrRequest* Request); 00042 void Receive(StrRequest* Request); 00043 00044 private: 00045 int m_SendFlag; 00046 int m_NumberOfBlocksToSend; 00047 }; 00048 00049 #endif /* __CLIENTINTERFACE_H_ */