Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __STATISTICS_H__
00021 #define __STATISTICS_H__
00022
00023 #include <vector>
00024 #include <sys/time.h>
00025 #include <network.h>
00026 #include <list>
00027
00028 #include "netstats.h"
00029
00030 namespace gnash
00031 {
00032
00033 class Statistics : public NetStats {
00034 public:
00035 Statistics();
00036 ~Statistics();
00037 typedef enum {
00038 NO_BROWSER,
00039 MOZILLA,
00040 FIREFOX,
00041 OPERA,
00042 KONQUEROR,
00043 GALEON,
00044 EPIPHANY,
00045 SAFARI,
00046 IE
00047 } browser_e;
00048 typedef enum {
00049 OSTYPE_NONE,
00050 OSTYPE_LINUX,
00051 OSTYPE_BSD,
00052 OSTYPE_DARWIN,
00053 OSTYPE_WIN32,
00054 OSTYPE_SOLARIS
00055 } ostype_e;
00056
00057
00058 int addStats();
00059
00060
00061 float getFPS();
00062 int getBitRate();
00063
00064
00065 void setIPaddr(in_addr_t x) { _ipaddr = x; };
00066 void setBrowser(browser_e x) { _browser = x; } ;
00067 void setOS(ostype_e x) { _os = x; } ;
00068 in_addr_t getIPaddr() { return _ipaddr; };
00069 browser_e getBrowser() { return _browser; };
00070 ostype_e getOS() { return _os; };
00071
00072
00073
00074
00075 void dump();
00076 void clear();
00077 private:
00078 in_addr_t _ipaddr;
00079 browser_e _browser;
00080 ostype_e _os;
00081 std::list<NetStats *> _netstats;
00082 boost::uint32_t _msg_count;
00083 std::vector<std::string> _filespec;
00084 };
00085
00086 }
00087
00088 #endif // __STATISTICS_H__
00089
00090
00091
00092
00093