Add calendar plugins
This commit is contained in:
+37
-3
@@ -1,7 +1,7 @@
|
||||
package de.mm20.launcher2.plugin.contracts
|
||||
|
||||
abstract class CalendarPluginContract {
|
||||
object EventColumns: Columns() {
|
||||
object EventColumns : Columns() {
|
||||
/**
|
||||
* The unique ID of the event.
|
||||
*/
|
||||
@@ -17,6 +17,11 @@ abstract class CalendarPluginContract {
|
||||
*/
|
||||
val Description = column<String>("description")
|
||||
|
||||
/**
|
||||
* The calendar name of the event.
|
||||
*/
|
||||
val CalendarName = column<String>("calendar_name")
|
||||
|
||||
/**
|
||||
* The location of the event.
|
||||
*/
|
||||
@@ -33,9 +38,9 @@ abstract class CalendarPluginContract {
|
||||
val EndTime = column<Long>("end_time")
|
||||
|
||||
/**
|
||||
* Whether the event is an all-day event.
|
||||
* Whether the times should include times or truncate to dates.
|
||||
*/
|
||||
val AllDay = column<Boolean>("all_day")
|
||||
val IncludeTime = column<Boolean>("include_time")
|
||||
|
||||
/**
|
||||
* The color of the event.
|
||||
@@ -46,5 +51,34 @@ abstract class CalendarPluginContract {
|
||||
* The attendees of the event.
|
||||
*/
|
||||
val Attendees = column<List<String>>("attendees")
|
||||
|
||||
/**
|
||||
* The URI of the event.
|
||||
*/
|
||||
val Uri = column<String>("uri")
|
||||
|
||||
/**
|
||||
* Whether the event is a task and if so, whether it is completed.
|
||||
*/
|
||||
val IsCompleted = column<Boolean>("completed")
|
||||
}
|
||||
|
||||
object CalendarListColumns : Columns() {
|
||||
val Id = column<String>("id")
|
||||
val Name = column<String>("name")
|
||||
val Color = column<Int>("color")
|
||||
val AccountName = column<String>("account_name")
|
||||
}
|
||||
|
||||
|
||||
object Params {
|
||||
const val Query = "query"
|
||||
const val StartTime = "start"
|
||||
const val EndTime = "end"
|
||||
const val Exclude = "exclude"
|
||||
}
|
||||
|
||||
object Paths {
|
||||
const val CalendarLists = "calendar_lists"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package de.mm20.launcher2.search.calendar
|
||||
|
||||
data class CalendarQuery(
|
||||
val query: String?,
|
||||
val start: Long?,
|
||||
val end: Long?,
|
||||
/**
|
||||
* List of calendar list ids that should be excluded from the search results.
|
||||
*/
|
||||
val excludedCalendars: List<String>,
|
||||
)
|
||||
Reference in New Issue
Block a user