KNemo – network interfaces monitor for systray
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

131 lines
3.0 KiB

  1. /* This file is part of KNemo
  2. Copyright (C) 2005 Percy Leonhardt <percy@eris23.de>
  3. KNemo is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Library General Public License as
  5. published by the Free Software Foundation; either version 2 of
  6. the License, or (at your option) any later version.
  7. KNemo is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef GLOBAL_H
  17. #define GLOBAL_H
  18. #include <tqpair.h>
  19. #include <tqcolor.h>
  20. #include <tqstring.h>
  21. /**
  22. * This file contains data structures and enums used in the knemo daemon.
  23. *
  24. * @short Daemon wide structures and enums
  25. * @author Percy Leonhardt <percy@eris23.de>
  26. */
  27. struct GeneralData
  28. {
  29. int toolTipContent;
  30. int pollInterval;
  31. int saveInterval;
  32. TQString statisticsDir;
  33. };
  34. struct InterfaceData
  35. {
  36. InterfaceData()
  37. : existing( false ),
  38. available( false ),
  39. wirelessDevice( false ),
  40. prevRxPackets( 0L ),
  41. prevTxPackets( 0L ),
  42. rxPackets( 0L ),
  43. txPackets( 0L ),
  44. prevRxBytes( 0L ),
  45. prevTxBytes( 0L ),
  46. incomingBytes( 0L ),
  47. outgoingBytes( 0L ),
  48. rxBytes( 0L ),
  49. txBytes( 0L )
  50. {}
  51. bool existing;
  52. bool available;
  53. bool wirelessDevice;
  54. unsigned long prevRxPackets;
  55. unsigned long prevTxPackets;
  56. unsigned long rxPackets;
  57. unsigned long txPackets;
  58. unsigned long prevRxBytes;
  59. unsigned long prevTxBytes;
  60. unsigned long incomingBytes;
  61. unsigned long outgoingBytes;
  62. TQString ipAddress;
  63. TQString subnetMask;
  64. TQString hwAddress;
  65. TQString ptpAddress;
  66. TQString broadcastAddress;
  67. TQString defaultGateway;
  68. TQString rxString;
  69. TQString txString;
  70. TQ_UINT64 rxBytes;
  71. TQ_UINT64 txBytes;
  72. };
  73. struct WirelessData
  74. {
  75. TQString essid;
  76. TQString mode;
  77. TQString frequency;
  78. TQString channel;
  79. TQString bitRate;
  80. TQString linkQuality;
  81. TQString accessPoint;
  82. TQString nickName;
  83. bool encryption;
  84. };
  85. struct PlotterSettings
  86. {
  87. int pixel;
  88. int count;
  89. int distance;
  90. int fontSize;
  91. int minimumValue;
  92. int maximumValue;
  93. bool labels;
  94. bool topBar;
  95. bool showIncoming;
  96. bool showOutgoing;
  97. bool verticalLines;
  98. bool horizontalLines;
  99. bool automaticDetection;
  100. bool verticalLinesScroll;
  101. TQColor colorVLines;
  102. TQColor colorHLines;
  103. TQColor colorIncoming;
  104. TQColor colorOutgoing;
  105. TQColor colorBackground;
  106. };
  107. struct StatisticEntry
  108. {
  109. int day;
  110. int month;
  111. int year;
  112. TQ_UINT64 rxBytes;
  113. TQ_UINT64 txBytes;
  114. };
  115. extern TQPair<TQString, int> ToolTips[];
  116. #endif // GLOBAL_H