alvin_

updated NetPulseStatsView.h

Nov 27th, 2013
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.90 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.     typedef unsigned int if_index_t;
  32.            
  33. private:
  34.     BStringView *fConnectedToView;
  35.     BStringView *fElapsedTimeView;
  36.     BStringView *fLocalAddressView;
  37.     BStringView *fIBytesView;
  38.     BStringView *fOBytesView;
  39.     BStringView *fIPacketsView;
  40.     BStringView *fOPacketsView;
  41.     BStringView *fCollisionsView;
  42.     BStringView *fErrorsView;
  43.     if_index_t fIndex;
  44.     ifreq fRequest;
  45. };
  46.  
  47. #endif
  48. #ifndef __NET_PULSE_STATS_VIEW_H__
  49. #define __NET_PULSE_STATS_VIEW_H__
  50.  
  51. #include <Window.h>
  52. #include <View.h>
  53. #include <Box.h>
  54. #include <StringView.h>
  55. #include <Message.h>
  56. //#include <net/net_control.h>
  57.  
  58. class CNetPulseStatsView : public BView {
  59. public:
  60.     enum {
  61.         C_VIEW_WIDTH        = 280,
  62.         C_VIEW_HEIGHT       = 200,
  63.         C_QUIT              = 100000,
  64.         C_CHANGE_INTERFACE  = 100001
  65.     };
  66.    
  67. public:
  68.     CNetPulseStatsView(const char *name, if_index_t index);
  69.    
  70.     virtual ~CNetPulseStatsView();
  71.    
  72.     void AttachedToWindow();
  73.    
  74.     void MessageReceived(BMessage *message);
  75.  
  76.     virtual void Pulse();
  77.    
  78.     typedef unsigned int if_index_t;
  79.            
  80. private:
  81.     BStringView *fConnectedToView;
  82.     BStringView *fElapsedTimeView;
  83.     BStringView *fLocalAddressView;
  84.     BStringView *fIBytesView;
  85.     BStringView *fOBytesView;
  86.     BStringView *fIPacketsView;
  87.     BStringView *fOPacketsView;
  88.     BStringView *fCollisionsView;
  89.     BStringView *fErrorsView;
  90.     if_index_t fIndex;
  91.     ifreq fRequest;
  92. };
  93.  
  94. #endif
Advertisement
Add Comment
Please, Sign In to add comment