00001 /* 00002 Copyright (c) 2006-2007 by Jakob Schroeter <js@camaya.net> 00003 This file is part of the gloox library. http://camaya.net/gloox 00004 00005 This software is distributed under a license. The full license 00006 agreement can be found in the file LICENSE in this distribution. 00007 This software may not be copied, modified, sold or distributed 00008 other than expressed in the named license agreement. 00009 00010 This software is distributed without any warranty. 00011 */ 00012 00013 00014 #ifndef STATISTICSHANDLER_H__ 00015 #define STATISTICSHANDLER_H__ 00016 00017 #include "stanza.h" 00018 00019 namespace gloox 00020 { 00021 00025 struct StatisticsStruct 00026 { 00027 int totalBytesSent; 00030 int totalBytesReceived; 00033 int compressedBytesSent; 00035 int compressedBytesReceived; 00037 int uncompressedBytesSent; 00039 int uncompressedBytesReceived; 00041 int totalStanzasSent; 00042 int totalStanzasReceived; 00043 int iqStanzasSent; 00044 int iqStanzasReceived; 00045 int messageStanzasSent; 00046 int messageStanzasReceived; 00047 int s10nStanzasSent; 00048 int s10nStanzasReceived; 00049 int presenceStanzasSent; 00050 int presenceStanzasReceived; 00051 bool encryption; 00052 bool compression; 00053 }; 00054 00063 class GLOOX_API StatisticsHandler 00064 { 00065 public: 00069 virtual ~StatisticsHandler() {} 00070 00075 virtual void handleStatistics( const StatisticsStruct stats ) = 0; 00076 }; 00077 00078 } 00079 00080 #endif // STATISTICSHANDLER_H__