gloox 1.0
statisticshandler.h
00001 /*
00002   Copyright (c) 2006-2009 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     long int totalBytesSent;             
00030     long int totalBytesReceived;         
00033     long int compressedBytesSent;        
00035     long int compressedBytesReceived;    
00037     long int uncompressedBytesSent;      
00039     long int uncompressedBytesReceived;  
00041     long int totalStanzasSent;           
00042     long int totalStanzasReceived;       
00043     long int iqStanzasSent;              
00044     long int iqStanzasReceived;          
00045     long int messageStanzasSent;         
00046     long int messageStanzasReceived;     
00047     long int s10nStanzasSent;            
00048     long int s10nStanzasReceived;        
00049     long int presenceStanzasSent;        
00050     long 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__