Ubuntu Platform API 3.0.0
A library helping with tight integration into the Ubuntu platform
alarm.h
Go to the documentation of this file.
1/*
2 * Copyright © 2014 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_ALARM_H_
19#define UBUNTU_HARDWARE_ALARM_H_
20
21#include <ubuntu/status.h>
22#include <ubuntu/visibility.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29typedef enum
30{
34
36
38typedef enum
39{
45
47
49typedef struct
50{
54
56
58typedef struct UbuntuHardwareAlarm* UHardwareAlarm;
59
63
67 UHardwareAlarm alarm);
68
72 UHardwareAlarm alarm);
73
77 UHardwareAlarm alarm,
78 struct timespec *tz);
79
83 UHardwareAlarm alarm,
84 const struct timezone *tz);
85
89 UHardwareAlarm alarm,
90 UHardwareAlarmTimeReference time_reference,
92 const struct timespec *ts);
93
97 UHardwareAlarm alarm,
99
100#ifdef __cplusplus
101}
102#endif
103
104#endif
struct UbuntuHardwareAlarm * UHardwareAlarm
Definition: alarm.h:58
UBUNTU_DLL_PUBLIC UStatus u_hardware_alarm_get_elapsed_real_time(UHardwareAlarm alarm, struct timespec *tz)
UbuntuHardwareAlarmWaitResult UHardwareAlarmWaitResult
Definition: alarm.h:55
UBUNTU_DLL_PUBLIC UHardwareAlarm u_hardware_alarm_create()
UBUNTU_DLL_PUBLIC void u_hardware_alarm_ref(UHardwareAlarm alarm)
UbuntuHardwareAlarmTimeReference
Definition: alarm.h:30
@ U_HARDWARE_ALARM_TIME_REFERENCE_RTC
Definition: alarm.h:32
@ U_HARDWARE_ALARM_TIME_REFERENCE_BOOT
Definition: alarm.h:31
UbuntuHardwareAlarmTimeReference UHardwareAlarmTimeReference
Definition: alarm.h:35
UBUNTU_DLL_PUBLIC UStatus u_hardware_alarm_set_timezone(UHardwareAlarm alarm, const struct timezone *tz)
UbuntuHardwareAlarmSleepBehavior
Definition: alarm.h:39
@ U_HARDWARE_ALARM_SLEEP_BEHAVIOR_WAKEUP_DEVICE
Definition: alarm.h:41
@ U_HARDWARE_ALARM_SLEEP_BEHAVIOR_KEEP_DEVICE_ASLEEP
Definition: alarm.h:43
UBUNTU_DLL_PUBLIC UStatus u_hardware_alarm_set_relative_to_with_behavior(UHardwareAlarm alarm, UHardwareAlarmTimeReference time_reference, UHardwareAlarmSleepBehavior behavior, const struct timespec *ts)
UBUNTU_DLL_PUBLIC UStatus u_hardware_alarm_wait_for_next_alarm(UHardwareAlarm alarm, UHardwareAlarmWaitResult *result)
UbuntuHardwareAlarmSleepBehavior UHardwareAlarmSleepBehavior
Definition: alarm.h:46
UBUNTU_DLL_PUBLIC void u_hardware_alarm_unref(UHardwareAlarm alarm)
UbuntuStatus
Indicates the status of an operation.
Definition: status.h:27
UHardwareAlarmSleepBehavior sleep_behavior
Definition: alarm.h:52
UHardwareAlarmTimeReference reference
Definition: alarm.h:51
#define UBUNTU_DLL_PUBLIC
Definition: visibility.h:26