diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/calendar/base/public/calITodo.idl | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/calendar/base/public/calITodo.idl')
-rw-r--r-- | comm/calendar/base/public/calITodo.idl | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/comm/calendar/base/public/calITodo.idl b/comm/calendar/base/public/calITodo.idl new file mode 100644 index 0000000000..1ed322829d --- /dev/null +++ b/comm/calendar/base/public/calITodo.idl @@ -0,0 +1,72 @@ +/* -*- Mode: idl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "calIItemBase.idl" + +// +// calITodo +// +// An interface for a todo item (analogous to a VTODO) +// + +[scriptable, uuid(0a93fdad-8a5c-44e9-8f90-16a6df819e03)] +interface calITodo : calIItemBase +{ + const long CAL_TODO_STATUS_NEEDSACTION = 4; + const long CAL_TODO_STATUS_COMPLETED = 5; + const long CAL_TODO_STATUS_INPROCESS = 6; + + // as per the rather broken RFC2445, + + // entryDate maps to DTSTART, which is the day + // this todo shows up on, if set. (optional). + // + // dueDate maps to DUE, which is the day + // this todo is due, if set. (optional). + // + // If neither DUE nor DTSTART are set, then + // the todo appears "today" until it is completed. + // + // The completeDate is the date the todo was completed, + // or null if it hasn't been completed yet. + + attribute calIDateTime entryDate; + attribute calIDateTime dueDate; + attribute calIDateTime completedDate; + attribute short percentComplete; + + // A todo isCompleted if any of the following is true: + // - percentComplete is 100, or + // - completedDate is non-null, or + // - status is COMPLETED. + // Setting isCompleted to true will + // - set percentComplete to 100, and + // - set completedDate to the current time, if it is not already set, and + // - set status to COMPLETED. + // Setting isCompleted to false will remove percentComplete, completedDate, + // and status properties. (This returns the todo to its state at creation, + // in terms of completion-relevant properties.) + // + // If you would like to take advantage of the full, confusing disaster that + // is the RFC2445 VTODO status state space, you can feel free to set the + // fields individually, instead of setting isCompleted directly. (And then + // hope that whatever else you're talking to has the same set of rules for + // determining if something is completed or not.) + // + // Setting percentComplete, completedDate, or status individually does not + // affect any of the others at present. (E.g., setting the percentComplete + // from 100 to 50 doesn't clear completedDate, or change status to + // IN-PROCESS.) It's not clear that we want any more magic than a simple + // property to control "all complete" vs "not complete in any way". + attribute boolean isCompleted; + + /** + * The duration of the todo, which is either set or defined as + * dueDate - entryDate. + * Please note that null is returned if there is no duration set and entry + * Date or dueDate don't exist. + */ + attribute calIDuration duration; +}; |