alvin_

NetPulseStatsView.h

Nov 27th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.82 KB | None | 0 0
  1. #ifndef __NET_PULSE_STATS_VIEW_H__
  2. #define __NET_PULSE_STATS_VIEW_H__
  3.  
  4. #include <Window.h>
  5. #include <View.h>
  6. #include <Box.h>
  7. #include <StringView.h>
  8. #include <Message.h>
  9. //#include <net/net_control.h>
  10.  
  11. class CNetPulseStatsView : public BView {
  12. public:
  13.     enum {
  14.         C_VIEW_WIDTH        = 280,
  15.         C_VIEW_HEIGHT       = 200,
  16.         C_QUIT              = 100000,
  17.         C_CHANGE_INTERFACE  = 100001
  18.     };
  19.    
  20. public:
  21.     CNetPulseStatsView(const char *name, if_index_t index);
  22.    
  23.     virtual ~CNetPulseStatsView();
  24.    
  25.     void AttachedToWindow();
  26.    
  27.     void MessageReceived(BMessage *message);
  28.  
  29.     virtual void Pulse();
  30.            
  31. private:
  32.     BStringView *fConnectedToView;
  33.     BStringView *fElapsedTimeView;
  34.     BStringView *fLocalAddressView;
  35.     BStringView *fIBytesView;
  36.     BStringView *fOBytesView;
  37.     BStringView *fIPacketsView;
  38.     BStringView *fOPacketsView;
  39.     BStringView *fCollisionsView;
  40.     BStringView *fErrorsView;
  41.     if_index_t fIndex;
  42.     ifreq fRequest;
  43. };
  44.  
  45. #endif
  46. #ifndef __NET_PULSE_STATS_VIEW_H__
  47. #define __NET_PULSE_STATS_VIEW_H__
  48.  
  49. #include <Window.h>
  50. #include <View.h>
  51. #include <Box.h>
  52. #include <StringView.h>
  53. #include <Message.h>
  54. //#include <net/net_control.h>
  55.  
  56. class CNetPulseStatsView : public BView {
  57. public:
  58.     enum {
  59.         C_VIEW_WIDTH        = 280,
  60.         C_VIEW_HEIGHT       = 200,
  61.         C_QUIT              = 100000,
  62.         C_CHANGE_INTERFACE  = 100001
  63.     };
  64.    
  65. public:
  66.     CNetPulseStatsView(const char *name, if_index_t index);
  67.    
  68.     virtual ~CNetPulseStatsView();
  69.    
  70.     void AttachedToWindow();
  71.    
  72.     void MessageReceived(BMessage *message);
  73.  
  74.     virtual void Pulse();
  75.            
  76. private:
  77.     BStringView *fConnectedToView;
  78.     BStringView *fElapsedTimeView;
  79.     BStringView *fLocalAddressView;
  80.     BStringView *fIBytesView;
  81.     BStringView *fOBytesView;
  82.     BStringView *fIPacketsView;
  83.     BStringView *fOPacketsView;
  84.     BStringView *fCollisionsView;
  85.     BStringView *fErrorsView;
  86.     if_index_t fIndex;
  87.     ifreq fRequest;
  88. };
  89.  
  90. #endif
Advertisement
Add Comment
Please, Sign In to add comment