blob: 1ceda41e2790da819015759e73918523fad2fceb [file] [log] [blame]
The Android Open Source Projectedbf3b62009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//
18#ifndef _PIM_EVENT_RECURRENCE_H
19#define _PIM_EVENT_RECURRENCE_H
20
21#include <utils/String16.h>
22
23namespace android {
24
25struct EventRecurrence
26{
27public:
28 EventRecurrence();
29 ~EventRecurrence();
30
31 status_t parse(const String16&);
32
33
34 enum freq_t {
35 SECONDLY = 1,
36 MINUTELY = 2,
37 HOURLY = 3,
38 DAILY = 4,
39 WEEKLY = 5,
40 MONTHLY = 6,
41 YEARLY = 7
42 };
43
44 enum {
45 SU = 0x00010000,
46 MO = 0x00020000,
47 TU = 0x00040000,
48 WE = 0x00080000,
49 TH = 0x00100000,
50 FR = 0x00200000,
51 SA = 0x00400000
52 };
53
54 freq_t freq;
55 String16 until;
56 int count;
57 int interval;
58 int* bysecond;
59 int bysecondCount;
60 int* byminute;
61 int byminuteCount;
62 int* byhour;
63 int byhourCount;
64 int* byday;
65 int* bydayNum;
66 int bydayCount;
67 int* bymonthday;
68 int bymonthdayCount;
69 int* byyearday;
70 int byyeardayCount;
71 int* byweekno;
72 int byweeknoCount;
73 int* bymonth;
74 int bymonthCount;
75 int* bysetpos;
76 int bysetposCount;
77 int wkst;
78};
79
80}; // namespace android
81
82#endif // _PIM_EVENT_RECURRENCE_H