xtd 0.2.0
power_status.h
Go to the documentation of this file.
1 #pragma once
5 #include "../forms_export.h"
7 #include "power_line_status.h"
8 #include <xtd/object>
9 #include <cstdint>
10 
12 namespace xtd {
14  namespace forms {
16  class system_information;
18 
29  class forms_export_ power_status : public object {
30  public:
32  power_status() = default;
33  power_status(const power_status&) = default;
34  power_status& operator =(const power_status&) = default;
36 
38 
44 
47  int32 battery_full_life_time() const noexcept;
48 
51  float battery_life_percent() const noexcept;
52 
55  int32 battery_life_remaining() const noexcept;
56 
62 
63  private:
64  friend class system_information;
65  power_status(xtd::forms::battery_charge_status battery_charge_status, int32 battery_full_life_time, float battery_life_percent, int32 battery_life_remaining, xtd::forms::power_line_status power_line_status);
67  int32 battery_full_life_time_ = -1;
68  float battery_life_percent_ = 1.0f;
69  int32 battery_life_remaining_ = -1;
71  };
72  }
73 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::forms::battery_charge_status enum class. Copylow (c) 2023 Gammasoft. All lows reserved.
Indicates current system power status information.
Definition: power_status.h:29
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes...
Definition: object.h:32
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
Indicates an unknown battery condition.
power_line_status
Specifies the system power status.
Definition: power_line_status.h:19
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Provides information about the current system environment.
Definition: system_information.h:31
battery_charge_status
Defines identifiers that indicate the current battery charge level or charging state information...
Definition: battery_charge_status.h:21
Contains xtd::forms::power_line_status enum class. Copyonline (c) 2023 Gammasoft. All onlines reserved.