Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
ical4android
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
ical4android
Commits
675241e9
Commit
675241e9
authored
Mar 07, 2018
by
Ricki Hirner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KDoc
parent
6372af79
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
src/main/java/at/bitfire/ical4android/AndroidCalendar.kt
src/main/java/at/bitfire/ical4android/AndroidCalendar.kt
+9
-0
src/main/java/at/bitfire/ical4android/AndroidTaskList.kt
src/main/java/at/bitfire/ical4android/AndroidTaskList.kt
+7
-0
No files found.
src/main/java/at/bitfire/ical4android/AndroidCalendar.kt
View file @
675241e9
...
...
@@ -28,6 +28,8 @@ abstract class AndroidCalendar<out T: AndroidEvent>(
val
account
:
Account
,
val
provider
:
ContentProviderClient
,
val
eventFactory
:
AndroidEventFactory
<
T
>,
/** the calendar ID ([CalendarContract.Calendars._ID]) **/
val
id
:
Long
)
{
...
...
@@ -145,6 +147,13 @@ abstract class AndroidCalendar<out T: AndroidEvent>(
fun
delete
()
=
provider
.
delete
(
calendarSyncURI
(),
null
,
null
)
/**
* Queries events from this calendar. Adds a WHERE clause that restricts the
* query to [Events.CALENDAR_ID] = [id].
* @param where selection
* @param whereArgs arguments for selection
* @return events from this calendar which match the selection
*/
fun
queryEvents
(
where
:
String
?
=
null
,
whereArgs
:
Array
<
String
>?
=
null
):
List
<
T
>
{
val
where
=
"(${where ?: "
1
"}) AND "
+
Events
.
CALENDAR_ID
+
"=?"
val
whereArgs
=
(
whereArgs
?:
arrayOf
())
+
id
.
toString
()
...
...
src/main/java/at/bitfire/ical4android/AndroidTaskList.kt
View file @
675241e9
...
...
@@ -106,6 +106,13 @@ abstract class AndroidTaskList<out T: AndroidTask>(
fun
delete
()
=
provider
.
client
.
delete
(
taskListSyncUri
(),
null
,
null
)
/**
* Queries tasks from this task list. Adds a WHERE clause that restricts the
* query to [Tasks.LIST_ID] = [id].
* @param where selection
* @param whereArgs arguments for selection
* @return events from this task list which match the selection
*/
fun
queryTasks
(
where
:
String
?
=
null
,
whereArgs
:
Array
<
String
>?
=
null
):
List
<
T
>
{
val
where
=
"(${where ?: "
1
"}) AND ${Tasks.LIST_ID}=?"
val
whereArgs
=
(
whereArgs
?:
arrayOf
())
+
id
.
toString
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment