ECal.ReminderWatcher¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/en |
The default time zone |
||
r/w/co |
Data source registry |
||
r/w/en |
Whether can schedule timers |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Signal is emitted when the list of past or snoozed reminders changes. |
|
Formats time itt to a string and writes it to inout_buffer, which can hold up to buffer_size bytes. |
|
Signal is emitted when any reminder is either overdue or triggered. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class ECal.ReminderWatcher(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Contains only private data that should be read and manipulated using the functions below.
New in version 3.30.
- classmethod new(registry)¶
- Parameters:
registry (
EDataServer.SourceRegistry) – anEDataServer.SourceRegistry- Returns:
a new instance of
ECal.ReminderWatcher- Return type:
Creates a new
ECal.ReminderWatcher, which will use the registry. It adds its own reference to registry. Free the createdECal.ReminderWatcherwithGObject.Object.unref() when no longer needed.New in version 3.30.
- describe_data(rd, flags)¶
- Parameters:
rd (
ECal.ReminderData) – anECal.ReminderDataflags (
int) – bit-or ofECal.ReminderWatcherDescribeFlags
- Returns:
a new string with a text description of the rd.
- Return type:
Returns a new string with a text description of the rd. The text format can be influenced with flags.
Free the returned string with
GLib.free(), when no longer needed.New in version 3.30.
- dismiss(rd, cancellable, callback, *user_data)¶
- Parameters:
rd (
ECal.ReminderData) – anECal.ReminderDatato dismisscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
Asynchronously dismiss single reminder in the past or snoozed reminders.
When the operation is finished, callback will be called. You can then call
ECal.ReminderWatcher.dismiss_finish() to get the result of the operation.New in version 3.30.
- dismiss_all(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNonecallback (
Gio.AsyncReadyCallbackorNone) – aGio.AsyncReadyCallbackto call when the request is satisfieduser_data (
objectorNone) – data to pass to the callback function
Asynchronously dismiss all past reminders.
When the operation is finished, callback will be called. You can then call
ECal.ReminderWatcher.dismiss_all_finish() to get the result of the operation.New in version 3.30.
- dismiss_all_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
whether succeeded
- Return type:
Finishes the operation started with
ECal.ReminderWatcher.dismiss_all().New in version 3.30.
- dismiss_all_sync(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone- Raises:
- Returns:
whether succeeded.
- Return type:
Synchronously dismiss all past reminders. The operation stops after the first error is encountered, which can be before all the past reminders are dismissed.
New in version 3.30.
- dismiss_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – aGio.AsyncResult- Raises:
- Returns:
whether succeeded
- Return type:
Finishes the operation started with
ECal.ReminderWatcher.dismiss().New in version 3.30.
- dismiss_sync(rd, cancellable)¶
- Parameters:
rd (
ECal.ReminderData) – anECal.ReminderDatato dismisscancellable (
Gio.CancellableorNone) – optionalGio.Cancellableobject, orNone
- Raises:
- Returns:
whether succeeded
- Return type:
Synchronously dismiss single reminder in the past or snoozed reminders.
New in version 3.30.
- dup_default_zone()¶
- Returns:
A copy of the currently set default time zone. Free it with
GObject.Object.unref(), when no longer needed.- Return type:
New in version 3.30.
- dup_past()¶
- Returns:
a newly allocated
GLib.SListof the past reminders, orNone, when there are none- Return type:
[
ECal.ReminderData] orNone
Gathers a
GLib.SListof all past reminders which had not been removed afterECal.ReminderWatcher::triggeredsignal. Such reminders are remembered across sessions, until they are dismissed byECal.ReminderWatcher.dismiss() or its synchronous variant. These reminders can be also snoozed withECal.ReminderWatcher.snooze(), which removes them from the past reminders into the list of snoozed reminders, seeECal.ReminderWatcher.dup_snoozed().Free the returned
GLib.SListwith g_slist_free_full (reminders,ECal.ReminderData.free); when no longer needed.New in version 3.30.
- dup_snoozed()¶
- Returns:
a newly allocated
GLib.SListof the snoozed reminders, orNone, when there are none- Return type:
[
ECal.ReminderData] orNone
Gathers a
GLib.SListof currently snoozed reminder withECal.ReminderWatcher.snooze(). The snoozed reminders are remembered across sessions and they are re-triggered when their snooze time elapses, which can move them back to the list of past reminders.Free the returned
GLib.SListwith g_slist_free_full (reminders,ECal.ReminderData.free); when no longer needed.New in version 3.30.
- get_registry()¶
- Returns:
an
EDataServer.SourceRegistrywith which the self had been created- Return type:
- get_timers_enabled()¶
- Returns:
whether timers are enabled for the self. See
ECal.ReminderWatcher.set_timers_enabled() for more information what it means.- Return type:
New in version 3.30.
- ref_opened_client(source_uid)¶
- Parameters:
source_uid (
str) – anEDataServer.SourceUID of the calendar to return- Returns:
a referenced
ECal.Clientfor the source_uid, if any such is opened;Noneotherwise.- Return type:
ECal.ClientorNone
New in version 3.30.
- set_default_zone(zone)¶
- Parameters:
zone (
ICalGLib.TimezoneorNone) – anICalGLib.Timezone
Sets the default zone for the self. This is used when calculating trigger times for floating component times. When the zone is
None, then sets a UTC time zone.New in version 3.30.
- set_timers_enabled(enabled)¶
- Parameters:
enabled (
bool) – a value to set
The self can be used both for scheduling the timers for the reminders and respond to them through the “triggered” signal, or only to listen for changes on the past reminders. The default is to have timers enabled, thus to response to scheduled reminders. Disabling the timers also means there will be less resources needed by the self.
New in version 3.30.
- snooze(rd, until)¶
- Parameters:
rd (
ECal.ReminderData) – anECal.ReminderDataidentifying the reminderuntil (
int) – time_t as gint64, when the rd should be retriggered
Snoozes rd until until, which is an absolute time when the rd should be retriggered. This moves the rd from the list of past reminders into the list of snoozed reminders and invokes the “changed” signal.
The until can be a special value 0, to set the time as the event start, if it’s in the future. The function does nothing when the event time is in the past.
New in version 3.30.
- timer_elapsed()¶
Notifies the #watcher that the timer previously scheduled with EReminderWatcherClass::schedule_timer elapsed. This can be used by the descendants which override the default implementation of EReminderWatcherClass::schedule_timer. There is always scheduled only one timer and once it’s elapsed it should be also removed, the same when the EReminderWatcherClass::schedule_timer is called and the previously scheduled timer was not elapsed yet, the previous should be removed first, aka every call to EReminderWatcherClass::schedule_timer replaces any previously scheduled timer.
New in version 3.30.
- do_cal_client_connect(source, source_type, wait_for_connected_seconds, cancellable, callback, *user_data) virtual¶
- Parameters:
source (
EDataServer.Source) –source_type (
ECal.ClientSourceType) –wait_for_connected_seconds (
int) –cancellable (
Gio.CancellableorNone) –callback (
Gio.AsyncReadyCallbackorNone) –
- do_changed() virtual¶
- do_format_time(rd, itt, inout_buffer, buffer_size) virtual¶
- Parameters:
rd (
ECal.ReminderData) –itt (
ICalGLib.Time) –inout_buffer (
str) –buffer_size (
int) –
Signal Details¶
- ECal.ReminderWatcher.signals.changed(reminder_watcher)¶
- Signal Name:
changed- Flags:
- Parameters:
reminder_watcher (
ECal.ReminderWatcher) – The object which received the signal
Signal is emitted when the list of past or snoozed reminders changes. It’s called also when
Gio.Settingskey for past reminders is notified as changed, because this list is not held in memory.New in version 3.30.
- ECal.ReminderWatcher.signals.format_time(reminder_watcher, rd, itt, inout_buffer, buffer_size)¶
- Signal Name:
format-time- Flags:
- Parameters:
reminder_watcher (
ECal.ReminderWatcher) – The object which received the signalrd (
ECal.ReminderData) – anECal.ReminderDataitt (
ICalGLib.Time) – anICalGLib.Timeinout_buffer (
objectorNone) – a pointer to a buffer to fill with formatted ittbuffer_size (
int) – size of inout_buffer
- Returns:
a pointer to a buffer to fill with formatted itt
- Return type:
inout_buffer:
object
Formats time itt to a string and writes it to inout_buffer, which can hold up to buffer_size bytes. The first character of inout_buffer is the nul-byte when nothing wrote to it yet.
New in version 3.30.
- ECal.ReminderWatcher.signals.triggered(reminder_watcher, reminders, snoozed)¶
- Signal Name:
triggered- Flags:
- Parameters:
reminder_watcher (
ECal.ReminderWatcher) – The object which received the signalreminders ([
ECal.ReminderData]) – aGLib.SListofECal.ReminderDatasnoozed (
bool) –True, when the reminders had been snoozed,Falseotherwise
Signal is emitted when any reminder is either overdue or triggered.
New in version 3.30.
Property Details¶
- ECal.ReminderWatcher.props.default_zone¶
- Name:
default-zone- Type:
- Default Value:
- Flags:
An
ICalGLib.Timezoneto be used as the default time zone.New in version 3.30.
- ECal.ReminderWatcher.props.registry¶
- Name:
registry- Type:
- Default Value:
- Flags:
The
EDataServer.SourceRegistrywhich managesEDataServer.Sourceinstances.New in version 3.30.
- ECal.ReminderWatcher.props.timers_enabled¶
- Name:
timers-enabled- Type:
- Default Value:
- Flags:
Whether timers are enabled for the
ECal.ReminderWatcher. SeeECal.ReminderWatcher.set_timers_enabled() for more information what it means.Default:
TrueNew in version 3.30.