summaryrefslogtreecommitdiffstats
path: root/comm/calendar/base/public/calIRecurrenceRule.idl
blob: 8694036a8cbfcad58d07e8dbb355186b46bb4b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* -*- 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 "nsISupports.idl"

#include "calIRecurrenceItem.idl"

interface calIItemBase;
interface calIDateTime;

// an interface implementing a RRULE

[scriptable, uuid(e965a91a-49fa-41b5-b668-1a824a73bdbf)]
interface calIRecurrenceRule : calIRecurrenceItem
{
  //
  // rule-based recurrence
  //

  // null/"", "SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY",
  // "MONTHLY", "YEARLY"
  attribute AUTF8String type;

  // repeat every N of type
  attribute long interval;

  // These two are mutually exclusive; whichever is set
  // invalidates the other.  It's only valid to read the one
  // that was set; the other will throw NS_ERROR_FAILURE.  Use
  // isByCount to figure out whether count or untilDate is valid.
  // Setting count to -1 or untilDate to null indicates infinite
  // recurrence.
  attribute long count;
  attribute calIDateTime untilDate;

  // if this isn't infinite recurrence, this flag indicates whether
  // it was set by count or not
  readonly attribute boolean isByCount;

  // The week start for this rule, used for certain calculations. This is a
  // value from 0=Sunday to 6=Saturday.
  attribute short weekStart;

  // the components defining the recurrence
  // "BYSECOND", "BYMINUTE", "BYHOUR", "BYDAY",
  // "BYMONTHDAY", "BYYEARDAY", "BYWEEKNO", "BYMONTH",
  // "BYSETPOS"
  Array<short> getComponent (in AUTF8String aComponentType);
  void setComponent (in AUTF8String aComponentType, in Array<short> aValues);

};