Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

cabal_waiter.h

00001 /*
00002    Cabal - cabal_waiter.h
00003    Waiting objects, line and channel
00004 
00005    $Id: cabal_waiter.h,v 1.1 2004/03/29 14:17:08 jonnymind Exp $
00006 ---------------------------------------------
00007    Begin      : lun mar 29 2004 $TIME$
00008    Author     : Giancarlo Niccolai <gc@niccolai.ws>, (C) 2004
00009 
00010    Last modified because:
00011 
00012 */
00013 
00014 /**************************************************************************
00015 *   This program is free software; you can redistribute it and/or modify  *
00016 *   it under the terms of the GNU Library General Public License as       *
00017 *   published by the Free Software Foundation; either version 2.1 of the  *
00018 *   License, or (at your option) any later version.                       *
00019 ***************************************************************************/
00020 
00021 #ifndef CABAL_WAITER_H
00022 #define CABAL_WAITER_H
00023 
00024 #include <cabal_defs.h>
00025 
00026 namespace Cabal
00027 {
00028 
00031 class Waiter
00032 {
00033 protected:
00034    long int m_bandwidth;
00035    long int m_lastSentTime;
00036    long int m_lastSentSize;
00037 
00038 public:
00039    Waiter( long int bandwidth = 0 )
00040    {
00041       m_bandwidth = bandwidth;
00042       m_lastSentTime = -1001; // more than one second before 
00043       m_lastSentSize = 0;   
00044    }
00045 
00047    void usedBandwidth( const long int bytes );
00048    
00050    MSECS minimalWait();
00051 
00052 };
00053 
00054 }
00055 
00056 #endif
00057 
00058 /* end of cabal_waiter.h */

Generated on Sat Apr 10 17:41:49 2004 for Cabal by doxygen 1.3.5