-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from builttoroam/1.0
Support for advanced recurrence rules, attendees, reminders and fixes
- Loading branch information
Showing
38 changed files
with
1,841 additions
and
761 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
538 changes: 314 additions & 224 deletions
538
device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/CalendarDelegate.kt
Large diffs are not rendered by default.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
...ce_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/DayOfWeekSerializer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.builttoroam.devicecalendar | ||
|
||
import com.builttoroam.devicecalendar.common.DayOfWeek | ||
import com.google.gson.* | ||
import java.lang.reflect.Type | ||
|
||
class DayOfWeekSerializer: JsonSerializer<DayOfWeek> { | ||
override fun serialize(src: DayOfWeek?, typeOfSrc: Type?, context: JsonSerializationContext?): JsonElement { | ||
if(src != null) { | ||
return JsonPrimitive(src.ordinal) | ||
} | ||
return JsonObject() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/common/DayOfWeek.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.builttoroam.devicecalendar.common | ||
|
||
enum class DayOfWeek { | ||
SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY | ||
} |
6 changes: 1 addition & 5 deletions
6
device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/models/Attendee.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,4 @@ | ||
package com.builttoroam.devicecalendar.models | ||
|
||
class Attendee(val name: String) { | ||
var id: Long = -1 | ||
var eventId: Long = -1 | ||
var email: String? = null | ||
var attendanceRequired: Boolean = false | ||
class Attendee(val emailAddress: String, val name: String?, val isRequired: Boolean?, val attendanceStatus: Int?, val isOrganizer: Boolean?) { | ||
} |
9 changes: 6 additions & 3 deletions
9
device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/models/Event.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
package com.builttoroam.devicecalendar.models | ||
|
||
class Event(val title: String) { | ||
class Event { | ||
var title: String? = null | ||
var eventId: String? = null | ||
var calendarId: String? = null | ||
var description: String? = null | ||
var start: Long = -1 | ||
var end: Long = -1 | ||
var start: Long? = null | ||
var end: Long? = null | ||
var allDay: Boolean = false | ||
var location: String? = null | ||
var attendees: MutableList<Attendee> = mutableListOf() | ||
var recurrenceRule: RecurrenceRule? = null | ||
var organizer: Attendee? = null | ||
var reminders: MutableList<Reminder> = mutableListOf() | ||
} |
6 changes: 6 additions & 0 deletions
6
..._calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/models/RecurrenceRule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
package com.builttoroam.devicecalendar.models | ||
|
||
import com.builttoroam.devicecalendar.common.DayOfWeek | ||
import com.builttoroam.devicecalendar.common.RecurrenceFrequency | ||
|
||
|
||
class RecurrenceRule(val recurrenceFrequency : RecurrenceFrequency) { | ||
var totalOccurrences: Int? = null | ||
var interval: Int? = null | ||
var endDate: Long? = null | ||
var daysOfTheWeek: MutableList<DayOfWeek>? = null | ||
var daysOfTheMonth: MutableList<Int>? = null | ||
var monthsOfTheYear: MutableList<Int>? = null | ||
var weeksOfTheYear: MutableList<Int>? = null | ||
var setPositions: MutableList<Int>? = null | ||
} |
4 changes: 4 additions & 0 deletions
4
device_calendar/android/src/main/kotlin/com/builttoroam/devicecalendar/models/Reminder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package com.builttoroam.devicecalendar.models | ||
|
||
class Reminder(val minutes: Int) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.