Start adding reminders API

This commit is contained in:
Marvin W 2016-06-02 23:10:06 +02:00
parent 9daa4db4f3
commit 5f2083f227
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
20 changed files with 268 additions and 1 deletions

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders;
parcelable AccountState;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders;
parcelable CreateReminderOptionsInternal;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders;
parcelable LoadRemindersOptions;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders;
parcelable ReindexDueDatesOptions;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders;
parcelable UpdateRecurrenceOptions;

View File

@ -0,0 +1,17 @@
package com.google.android.gms.reminders.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.reminders.AccountState;
interface IRemindersCallbacks {
void onDataHolder(in DataHolder data, in Status status) = 0;
void onStatus(in Status status) = 1;
void onNoStatus() = 2;
void onDataHolderNoStatus(in DataHolder data, in Status status) = 3;
void onBool(boolean b, in Status status) = 4;
void onString(in String s, in Status status) = 5;
void onAccountState(in AccountState accountState, in Status status) = 6;
void onAsyncDataHolder(in DataHolder data) = 7;
}

View File

@ -0,0 +1,5 @@
package com.google.android.gms.reminders.internal;
interface IRemindersListener {
}

View File

@ -0,0 +1,37 @@
package com.google.android.gms.reminders.internal;
import com.google.android.gms.reminders.internal.IRemindersCallbacks;
import com.google.android.gms.reminders.AccountState;
import com.google.android.gms.reminders.CreateReminderOptionsInternal;
import com.google.android.gms.reminders.LoadRemindersOptions;
import com.google.android.gms.reminders.ReindexDueDatesOptions;
import com.google.android.gms.reminders.UpdateRecurrenceOptions;
import com.google.android.gms.reminders.model.CustomizedSnoozePresetEntity;
import com.google.android.gms.reminders.model.TaskEntity;
import com.google.android.gms.reminders.model.TaskIdEntity;
interface IRemindersService {
void loadReminders(IRemindersCallbacks callbacks, in LoadRemindersOptions options) = 0;
void addListener(IRemindersCallbacks callbacks) = 1;
void createReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 2;
void updateReminder(IRemindersCallbacks callbacks, in TaskEntity task) = 3;
void deleteReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 4;
void bumpReminder(IRemindersCallbacks callbacks, in TaskIdEntity taskId) = 5;
void hasUpcomingReminders(IRemindersCallbacks callbacks) = 6;
void createRecurrence(IRemindersCallbacks callbacks, in TaskEntity task) = 7;
void updateRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 8;
void deleteRecurrence(IRemindersCallbacks callbacks, String s1, in UpdateRecurrenceOptions options) = 9;
void changeRecurrence(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 10;
void makeTaskRecurring(IRemindersCallbacks callbacks, in TaskEntity task) = 11;
void makeRecurrenceSingleInstance(IRemindersCallbacks callbacks, String s1, in TaskEntity task, in UpdateRecurrenceOptions options) = 12;
void clearListeners() = 13;
void batchUpdateReminders(IRemindersCallbacks callbacks, in List<TaskEntity> tasks) = 14;
void createReminderWithOptions(IRemindersCallbacks callbacks, in TaskEntity task, in CreateReminderOptionsInternal options) = 15;
void getCustomizedSnoozePreset(IRemindersCallbacks callbacks) = 16;
void setCustomizedSnoozePreset(IRemindersCallbacks callbacks, in CustomizedSnoozePresetEntity preset) = 17;
void setAccountState(IRemindersCallbacks callbacks, in AccountState accountState) = 18;
void getAccountState(IRemindersCallbacks callbacks) = 19;
void checkReindexDueDatesNeeded(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 20;
void reindexDueDates(IRemindersCallbacks callbacks, in ReindexDueDatesOptions options) = 21;
}

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders.model;
parcelable CustomizedSnoozePresetEntity;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders.model;
parcelable TaskEntity;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.reminders.model;
parcelable TaskIdEntity;

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders;
import org.microg.safeparcel.AutoSafeParcelable;
public class AccountState extends AutoSafeParcelable {
public static Creator<AccountState> CREATOR = new AutoCreator<AccountState>(AccountState.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders;
import org.microg.safeparcel.AutoSafeParcelable;
public class CreateReminderOptionsInternal extends AutoSafeParcelable {
public static Creator<CreateReminderOptionsInternal> CREATOR = new AutoCreator<CreateReminderOptionsInternal>(CreateReminderOptionsInternal.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders;
import org.microg.safeparcel.AutoSafeParcelable;
public class LoadRemindersOptions extends AutoSafeParcelable {
public static Creator<LoadRemindersOptions> CREATOR = new AutoCreator<LoadRemindersOptions>(LoadRemindersOptions.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders;
import org.microg.safeparcel.AutoSafeParcelable;
public class ReindexDueDatesOptions extends AutoSafeParcelable {
public static Creator<ReindexDueDatesOptions> CREATOR = new AutoCreator<ReindexDueDatesOptions>(ReindexDueDatesOptions.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders;
import org.microg.safeparcel.AutoSafeParcelable;
public class UpdateRecurrenceOptions extends AutoSafeParcelable {
public static Creator<UpdateRecurrenceOptions> CREATOR = new AutoCreator<UpdateRecurrenceOptions>(UpdateRecurrenceOptions.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders.model;
import org.microg.safeparcel.AutoSafeParcelable;
public class CustomizedSnoozePresetEntity extends AutoSafeParcelable {
public static Creator<CustomizedSnoozePresetEntity> CREATOR = new AutoCreator<CustomizedSnoozePresetEntity>(CustomizedSnoozePresetEntity.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders.model;
import org.microg.safeparcel.AutoSafeParcelable;
public class TaskEntity extends AutoSafeParcelable {
public static Creator<TaskEntity> CREATOR = new AutoCreator<TaskEntity>(TaskEntity.class);
}

View File

@ -0,0 +1,23 @@
/*
* Copyright 2013-2016 microG Project Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.gms.reminders.model;
import org.microg.safeparcel.AutoSafeParcelable;
public class TaskIdEntity extends AutoSafeParcelable {
public static Creator<TaskIdEntity> CREATOR = new AutoCreator<TaskIdEntity>(TaskIdEntity.class);
}

View File

@ -21,7 +21,7 @@ public class Constants {
* This is the highest version that was looked at during development.
* Does not necessarily mean anything.
*/
public static final int MAX_REFERENCE_VERSION = 8489000;
public static final int MAX_REFERENCE_VERSION = 9083000;
public static final String GMS_PACKAGE_NAME = "com.google.android.gms";
public static final String GSF_PACKAGE_NAME = "com.google.android.gsf";
public static final String GMS_PACKAGE_SIGNATURE_SHA1 = "38918a453d07199354f8b19af05ec6562ced5788";