00001 // 00002 // Statistics.h 00003 // 00004 // Copyright (c) Shareaza Development Team, 2002-2005. 00005 // This file is part of SHAREAZA (www.shareaza.com) 00006 // 00007 // Shareaza is free software; you can redistribute it 00008 // and/or modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation; either version 2 of 00010 // the License, or (at your option) any later version. 00011 // 00012 // Shareaza is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU General Public License 00018 // along with Shareaza; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 // 00021 00022 #if !defined(AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_) 00023 #define AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_ 00024 00025 #pragma once 00026 00027 00028 class CStatistics 00029 { 00030 // Construction 00031 public: 00032 CStatistics(); 00033 virtual ~CStatistics(); 00034 00035 // Attributes 00036 public: 00037 struct 00038 { 00039 struct 00040 { 00041 QWORD Connected; 00042 QWORD Hub; 00043 QWORD Ultrapeer; 00044 } Timer; 00045 00046 struct 00047 { 00048 QWORD Outgoing; 00049 QWORD Incoming; 00050 } Connections; 00051 00052 struct 00053 { 00054 QWORD Outgoing; 00055 QWORD Incoming; 00056 } Bandwidth; 00057 00058 struct 00059 { 00060 QWORD Files; 00061 QWORD Volume; 00062 } Uploads; 00063 00064 struct 00065 { 00066 QWORD Outgoing; 00067 QWORD Incoming; 00068 QWORD Routed; 00069 QWORD Dropped; 00070 QWORD Lost; 00071 QWORD Queries; 00072 } Gnutella1, Gnutella2; 00073 00074 struct 00075 { 00076 QWORD Outgoing; 00077 QWORD Incoming; 00078 QWORD Dropped; 00079 } eDonkey; 00080 } 00081 Ever, Today, Last, Current; 00082 00083 DWORD m_tUpdate; 00084 DWORD m_tSeconds; 00085 00086 // Operations 00087 public: 00088 void Update(); 00089 protected: 00090 static void Add(LPVOID pTarget, LPCVOID pSource, int nCount); 00091 00092 }; 00093 00094 extern CStatistics Statistics; 00095 00096 #endif // !defined(AFX_STATISTICS_H__58CE4F23_CE39_4AAF_B3DE_1A77B801D9AC__INCLUDED_)