system_info.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_WEBUI_ECHE_APP_UI_SYSTEM_INFO_H_
  5. #define ASH_WEBUI_ECHE_APP_UI_SYSTEM_INFO_H_
  6. #include <memory>
  7. #include <string>
  8. namespace ash {
  9. namespace eche_app {
  10. // Stores system information for Eche app.
  11. class SystemInfo {
  12. public:
  13. class Builder {
  14. public:
  15. Builder();
  16. virtual ~Builder();
  17. std::unique_ptr<SystemInfo> Build();
  18. Builder& SetBoardName(const std::string& board_name);
  19. Builder& SetDeviceName(const std::string& device_name);
  20. Builder& SetGaiaId(const std::string& gaia_id);
  21. Builder& SetDeviceType(const std::string& device_type);
  22. private:
  23. std::string board_name_;
  24. std::string device_name_;
  25. std::string gaia_id_;
  26. std::string device_type_;
  27. };
  28. SystemInfo(const SystemInfo& other);
  29. virtual ~SystemInfo();
  30. std::string GetDeviceName() const { return device_name_; }
  31. std::string GetBoardName() const { return board_name_; }
  32. std::string GetGaiaId() const { return gaia_id_; }
  33. std::string GetDeviceType() const { return device_type_; }
  34. protected:
  35. SystemInfo(const std::string& device_name,
  36. const std::string& board_name,
  37. const std::string& gaia_id,
  38. const std::string& device_type);
  39. private:
  40. std::string device_name_;
  41. std::string board_name_;
  42. std::string gaia_id_;
  43. std::string device_type_;
  44. };
  45. } // namespace eche_app
  46. } // namespace ash
  47. #endif // ASH_WEBUI_ECHE_APP_UI_SYSTEM_INFO_H_