| Top |
| char * | driver-name | Read / Write / Construct Only |
| char * | performance-inhibited | Read / Write |
| PpdProfile | profiles | Read / Write / Construct Only |
| struct | PpdDriverClass |
| PpdDriver | |
| enum | PpdProbeResult |
| enum | PpdProfileActivationReason |
Profile drivers are the implementation of the different profiles for
the whole system. A driver will implement support for one or more
profiles, usually one or both of the performance and power-saver
profiles, for a particular system. Only one driver will be selected and
running per profile.
If no system-specific driver is available, some placeholder balanced
and power-saver drivers will be put in place, and the performance
profile will be unavailable.
Common implementation of drivers might be:
a driver handling all three profiles, relying on a firmware feature exposed in the kernel,
a driver that only implements the performance profile on a particular
system it has intimate knowledge of, leaving the balanced and
power-saver profiles using placeholder
When a driver implements the performance profile, it might set the
“performance-inhibited” property if the profile isn't available for any
reason, such as thermal limits being reached, or because a part of the
user's body is too close for safety, for example.
struct PpdDriverClass {
GObjectClass parent_class;
PpdProbeResult (* probe) (PpdDriver *driver,
PpdProfile *previous_profile);
gboolean (* activate_profile) (PpdDriver *driver,
PpdProfile profile,
PpdProfileActivationReason reason,
GError **error);
};
New profile drivers should derive from PpdDriver and implement
at least one of probe() and activate_profile
.
Those are the three possible values returned by a driver probe, along with an unset value for convenience.
“driver-name” property “driver-name” char *
Profile driver name.
Owner: PpdDriver
Flags: Read / Write / Construct Only
Default value: NULL
“performance-inhibited” property “performance-inhibited” char *
If set to a non-NULL value, the reason why the performance profile is unavailable.
The value must be one of the options listed in the D-Bus API reference.
Owner: PpdDriver
Flags: Read / Write
Default value: NULL
“profiles” property“profiles” PpdProfile
Profiles implemented by this driver.
Owner: PpdDriver
Flags: Read / Write / Construct Only
“probe-request” signalvoid user_function (PpdDriver *ppddriver, gpointer user_data)
The driver requested to be reprobed, because it became available.
Flags: Run Last
“profile-changed” signalvoid user_function (PpdDriver *profile, PpdProfile arg1, gpointer user_data)
Emitted when the profile was changed from the outside, usually by key combinations implemented in firmware.
profile |
the updated PpdProfile |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last