CPLNetworks.hpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*====================================================================*
  2. Copyright (c) 2020 Qualcomm Technologies, Inc.
  3. All Rights Reserved.
  4. Confidential and Proprietary - Qualcomm Technologies, Inc.
  5. ******************************************************************
  6. 2013 Qualcomm Atheros, Inc.
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * CPLNetworks.hpp - interface for the CPLNetworks class
  11. *
  12. * powerline network enumerator;
  13. *
  14. * the collection of CPLNetworks on a single host interface;
  15. *
  16. * Contributor(s):
  17. * Charles Maier <charles.maier@intellon.com>
  18. *
  19. *--------------------------------------------------------------------*/
  20. #ifndef CPLNETWORKS_HEADER
  21. #define CPLNETWORKS_HEADER
  22. /*====================================================================*
  23. * custom header files;
  24. *--------------------------------------------------------------------*/
  25. #include "../classes/stdafx.hpp"
  26. #include "../classes/CPLChannel.hpp"
  27. #include "../classes/CPLNetwork.hpp"
  28. /*====================================================================*
  29. * class declaration;
  30. *--------------------------------------------------------------------*/
  31. class __declspec (dllexport) CPLNetworks
  32. {
  33. public:
  34. explicit CPLNetworks (char const * ifname, unsigned timeout);
  35. virtual ~ CPLNetworks ();
  36. bool Empty (void) const;
  37. bool End (void) const;
  38. unsigned Count (void) const;
  39. unsigned Index (void) const;
  40. CPLNetworks & Select (unsigned);
  41. CPLNetworks & SelectPrev (void);
  42. CPLNetworks & SelectNext (void);
  43. CPLNetworks & SelectFirst (void);
  44. CPLNetworks & SelectFinal (void);
  45. CPLNetworks & Enumerate (void);
  46. CPLNetworks & operator = (unsigned);
  47. CPLNetwork & Selected (void) const;
  48. CPLNetwork & Network (void) const;
  49. CPLNetwork & operator [] (unsigned);
  50. private:
  51. CPLNetwork ** mtable;
  52. unsigned mcount;
  53. unsigned mindex;
  54. };
  55. /*====================================================================*
  56. * end declaration;
  57. *--------------------------------------------------------------------*/
  58. #endif