Ubuntu Platform API  3.0.0
A library helping with tight integration into the Ubuntu platform
booster.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Thomas Voß <thomas.voss@canonical.com>
17  */
18 #ifndef UBUNTU_HARDWARE_BOOSTER_H_
19 #define UBUNTU_HARDWARE_BOOSTER_H_
20 
21 #include <ubuntu/visibility.h>
22 
23 #include <stdint.h>
24 #include <stddef.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30  typedef enum
31  {
35 
37  typedef UbuntuHardwareBoosterScenario UHardwareBoosterScenario;
38  typedef struct UbuntuHardwareBooster;
41  typedef UbuntuHardwareBooster UHardwareBooster;
42 
44  UBUNTU_DLL_PUBLIC UHardwareBooster*
48  u_hardware_booster_ref(UHardwareBooster*);
51  u_hardware_booster_unref(UHardwareBooster*);
52 
55  u_hardware_booster_enable_scenario(UHardwareBooster*, UHardwareBoosterScenario);
58  u_hardware_booster_disable_scenario(UHardwareBooster*, UHardwareBoosterScenario);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif // UBUNTU_HARDWARE_BOOSTER_H_
UBUNTU_DLL_PUBLIC void u_hardware_booster_enable_scenario(UHardwareBooster *, UHardwareBoosterScenario)
UBUNTU_DLL_PUBLIC void u_hardware_booster_disable_scenario(UHardwareBooster *, UHardwareBoosterScenario)
Boost device performance to account for user interacting with device.
Definition: booster.h:33
UBUNTU_DLL_PUBLIC UHardwareBooster * u_hardware_booster_new()
u_hardware_booster_new creates a new UHardwareBooster* instance with an initial referrence count of 1...
UbuntuHardwareBooster UHardwareBooster
UbuntuHardwareBooster is an opaque type providing access to the performance booster capabilities of t...
Definition: booster.h:41
UBUNTU_DLL_PUBLIC void u_hardware_booster_ref(UHardwareBooster *)
u_hardware_booster_ref increases the reference count of booster by 1.
UbuntuHardwareBoosterScenario UHardwareBoosterScenario
Enumerates all known performance boosting scenarios.
Definition: booster.h:37
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26
UbuntuHardwareBoosterScenario
Definition: booster.h:30
UBUNTU_DLL_PUBLIC void u_hardware_booster_unref(UHardwareBooster *)
u_hardware_booster_unref decreases the reference count of booster by 1.