From ef5e6dc0668a8ca152aa38a78f0e91d65120d3b6 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Tue, 23 Jun 2015 19:21:32 +0200 Subject: [PATCH] Add some search APIs --- .../gms/playlog/internal/IPlayLogService.aidl | 3 +- .../search/corpora/ClearCorpusRequest.aidl | 3 + .../search/corpora/GetCorpusInfoRequest.aidl | 3 + .../corpora/GetCorpusStatusRequest.aidl | 3 + .../corpora/GetCorpusStatusResponse.aidl | 3 + .../corpora/RequestIndexingRequest.aidl | 3 + .../corpora/RequestIndexingResponse.aidl | 3 + .../internal/ISearchCorporaCallbacks.aidl | 9 +++ .../internal/ISearchCorporaService.aidl | 11 ++- .../internal/IGlobalSearchAdminService.aidl | 5 ++ .../gms/search/queries/QueryRequest.aidl | 3 + .../gms/search/queries/QueryResponse.aidl | 3 + .../internal/ISearchQueriesCallbacks.aidl | 7 ++ .../internal/ISearchQueriesService.aidl | 8 ++ .../gms/appdatasearch/QuerySpecification.java | 73 +++++++++++++++++++ .../gms/appdatasearch/SearchResults.java | 27 +++++++ .../search/corpora/ClearCorpusRequest.java | 23 ++++++ .../search/corpora/GetCorpusInfoRequest.java | 23 ++++++ .../corpora/GetCorpusStatusRequest.java | 49 +++++++++++++ .../corpora/GetCorpusStatusResponse.java | 49 +++++++++++++ .../corpora/RequestIndexingRequest.java | 54 ++++++++++++++ .../corpora/RequestIndexingResponse.java | 48 ++++++++++++ .../gms/search/queries/QueryRequest.java | 57 +++++++++++++++ .../gms/search/queries/QueryResponse.java | 49 +++++++++++++ 24 files changed, 517 insertions(+), 2 deletions(-) create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl create mode 100644 play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl create mode 100644 play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java create mode 100644 play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java diff --git a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl index 521df957..86169b99 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/playlog/internal/IPlayLogService.aidl @@ -4,5 +4,6 @@ import com.google.android.gms.playlog.internal.LogEvent; import com.google.android.gms.playlog.internal.PlayLoggerContext; interface IPlayLogService { - void event(String packageName, in PlayLoggerContext context, in LogEvent event) = 1; + void onEvent(String packageName, in PlayLoggerContext context, in LogEvent event) = 1; + void onMultiEvent(String packageName, in PlayLoggerContext context, in List events) = 2; } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl new file mode 100644 index 00000000..9f718934 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/ClearCorpusRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable ClearCorpusRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl new file mode 100644 index 00000000..11b0a4dc --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusInfoRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable GetCorpusInfoRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl new file mode 100644 index 00000000..b2e549d7 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable GetCorpusStatusRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl new file mode 100644 index 00000000..a837a7db --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/GetCorpusStatusResponse.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable GetCorpusStatusResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl new file mode 100644 index 00000000..ad68ef35 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable RequestIndexingRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl new file mode 100644 index 00000000..7aaa548c --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/RequestIndexingResponse.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.corpora; + +parcelable RequestIndexingResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl new file mode 100644 index 00000000..863b016f --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaCallbacks.aidl @@ -0,0 +1,9 @@ +package com.google.android.gms.search.corpora.internal; + +import com.google.android.gms.search.corpora.RequestIndexingResponse; +import com.google.android.gms.search.corpora.GetCorpusStatusResponse; + +interface ISearchCorporaCallbacks { + void onRequestIndexing(in RequestIndexingResponse response) = 1; + void onGetCorpusStatus(in GetCorpusStatusResponse response) = 3; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl index 8c54aa09..fe2073c0 100644 --- a/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/corpora/internal/ISearchCorporaService.aidl @@ -1,5 +1,14 @@ package com.google.android.gms.search.corpora.internal; -interface ISearchCorporaService { +import com.google.android.gms.search.corpora.ClearCorpusRequest; +import com.google.android.gms.search.corpora.GetCorpusStatusRequest; +import com.google.android.gms.search.corpora.GetCorpusInfoRequest; +import com.google.android.gms.search.corpora.RequestIndexingRequest; +import com.google.android.gms.search.corpora.internal.ISearchCorporaCallbacks; +interface ISearchCorporaService { + void requestIndexing(in RequestIndexingRequest request, ISearchCorporaCallbacks callbacks) = 1; + void clearCorpus(in ClearCorpusRequest request, ISearchCorporaCallbacks callbacks) = 2; + void getCorpusStatus(in GetCorpusStatusRequest request, ISearchCorporaCallbacks callbacks) = 3; + void getCorpusInfo(in GetCorpusInfoRequest request, ISearchCorporaCallbacks callbacks) = 4; } diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl new file mode 100644 index 00000000..35ed0dbe --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/global/internal/IGlobalSearchAdminService.aidl @@ -0,0 +1,5 @@ +package com.google.android.gms.search.global.internal; + +interface IGlobalSearchAdminService { + +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl new file mode 100644 index 00000000..1986e95d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.queries; + +parcelable QueryRequest; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl new file mode 100644 index 00000000..97047253 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/QueryResponse.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.search.queries; + +parcelable QueryResponse; diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl new file mode 100644 index 00000000..8bcb891e --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesCallbacks.aidl @@ -0,0 +1,7 @@ +package com.google.android.gms.search.queries.internal; + +import com.google.android.gms.search.queries.QueryResponse; + +interface ISearchQueriesCallbacks { + void onQuery(in QueryResponse response) = 1; +} diff --git a/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl new file mode 100644 index 00000000..091cdae5 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/search/queries/internal/ISearchQueriesService.aidl @@ -0,0 +1,8 @@ +package com.google.android.gms.search.queries.internal; + +import com.google.android.gms.search.queries.QueryRequest; +import com.google.android.gms.search.queries.internal.ISearchQueriesCallbacks; + +interface ISearchQueriesService { + void query(in QueryRequest request, ISearchQueriesCallbacks callbacks) = 1; +} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java new file mode 100644 index 00000000..9a77eb06 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/QuerySpecification.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2015 µg 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.appdatasearch; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.List; + +public class QuerySpecification extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + @SafeParceled(1) + public final boolean b; + //@SafeParceled(value = 2, subType = "TODO") + public final List c; + //@SafeParceled(value = 3, subType = "TODO") + public final List d; + @SafeParceled(4) + public final boolean e; + @SafeParceled(5) + public final int f; + @SafeParceled(6) + public final int g; + @SafeParceled(7) + public final boolean h; + @SafeParceled(8) + public final int i; + + private QuerySpecification() { + versionCode = 2; + b = false; + c = null; + d = null; + e = false; + f = 0; + g = 0; + h = false; + i = 0; + } + + @Override + public String toString() { + return "QuerySpecification{" + + "versionCode=" + versionCode + + ", b=" + b + + ", c=" + c + + ", d=" + d + + ", e=" + e + + ", f=" + f + + ", g=" + g + + ", h=" + h + + ", i=" + i + + '}'; + } + + public static final Creator CREATOR = new AutoCreator(QuerySpecification.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java new file mode 100644 index 00000000..59c7244b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/appdatasearch/SearchResults.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2015 µg 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.appdatasearch; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class SearchResults extends AutoSafeParcelable { + @SafeParceled(1000) + public final int versionCode = 2; + + public static Creator CREATOR = new AutoCreator(SearchResults.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java new file mode 100644 index 00000000..9bd5d83b --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/ClearCorpusRequest.java @@ -0,0 +1,23 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class ClearCorpusRequest extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(ClearCorpusRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java new file mode 100644 index 00000000..bdc842ff --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusInfoRequest.java @@ -0,0 +1,23 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class GetCorpusInfoRequest extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator(GetCorpusInfoRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java new file mode 100644 index 00000000..9ccfc30a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class GetCorpusStatusRequest extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + + @SafeParceled(1) + public final String packageName; + + @SafeParceled(2) + public final String corpus; + + private GetCorpusStatusRequest() { + versionCode = 1; + packageName = null; + corpus = null; + } + + @Override + public String toString() { + return "GetCorpusStatusRequest{" + + "versionCode=" + versionCode + + ", packageName='" + packageName + '\'' + + ", corpus='" + corpus + '\'' + + '}'; + } + + public static Creator CREATOR = new AutoCreator(GetCorpusStatusRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java new file mode 100644 index 00000000..79f2846a --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/GetCorpusStatusResponse.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import com.google.android.gms.appdatasearch.CorpusStatus; +import com.google.android.gms.common.api.Status; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class GetCorpusStatusResponse extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + + @SafeParceled(1) + public final Status status; + + @SafeParceled(2) + public final CorpusStatus corpusStatus; + + private GetCorpusStatusResponse() { + versionCode = 1; + status = null; + corpusStatus = null; + } + + public GetCorpusStatusResponse(Status status, CorpusStatus corpusStatus) { + this.versionCode = 1; + this.status = status; + this.corpusStatus = corpusStatus; + } + + public static Creator CREATOR = new AutoCreator(GetCorpusStatusResponse.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java new file mode 100644 index 00000000..5cec94b3 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class RequestIndexingRequest extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + + @SafeParceled(1) + public final String packageName; + + @SafeParceled(2) + public final String corpus; + + @SafeParceled(3) + public final long sequenceNumber; + + private RequestIndexingRequest() { + versionCode = 1; + packageName = null; + corpus = null; + sequenceNumber = 0; + } + + @Override + public String toString() { + return "RequestIndexingRequest{" + + "versionCode=" + versionCode + + ", packageName='" + packageName + '\'' + + ", corpus='" + corpus + '\'' + + ", sequenceNumber=" + sequenceNumber + + '}'; + } + + public static Creator CREATOR = new AutoCreator(RequestIndexingRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java new file mode 100644 index 00000000..024db887 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/corpora/RequestIndexingResponse.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2015 µg 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.search.corpora; + +import com.google.android.gms.common.api.Status; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class RequestIndexingResponse extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + + @SafeParceled(1) + public final Status status; + + @SafeParceled(2) + public final boolean scheduledIndexing; + + private RequestIndexingResponse() { + versionCode = 1; + status = null; + scheduledIndexing = false; + } + + public RequestIndexingResponse(Status status, boolean scheduledIndexing) { + this.versionCode = 1; + this.status = status; + this.scheduledIndexing = scheduledIndexing; + } + + public static Creator CREATOR = new AutoCreator(RequestIndexingResponse.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java new file mode 100644 index 00000000..4ac607de --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryRequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2015 µg 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.search.queries; + +import com.google.android.gms.appdatasearch.QuerySpecification; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.Arrays; + +public class QueryRequest extends AutoSafeParcelable { + + @SafeParceled(1000) + public int versionCode = 1; + @SafeParceled(1) + public String searchString; + @SafeParceled(2) + public String packageName; + @SafeParceled(3) + public String[] corpora; + @SafeParceled(4) + public int d; + @SafeParceled(5) + public int e; + @SafeParceled(6) + public QuerySpecification spec; + + @Override + public String toString() { + return "QueryRequest{" + + "versionCode=" + versionCode + + ", searchString='" + searchString + '\'' + + ", packageName='" + packageName + '\'' + + ", corpora=" + Arrays.toString(corpora) + + ", d=" + d + + ", e=" + e + + ", spec=" + spec + + '}'; + } + + public static Creator CREATOR = new AutoCreator(QueryRequest.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java new file mode 100644 index 00000000..a58a7be6 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/search/queries/QueryResponse.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2015 µg 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.search.queries; + +import com.google.android.gms.appdatasearch.SearchResults; +import com.google.android.gms.common.api.Status; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class QueryResponse extends AutoSafeParcelable { + + @SafeParceled(1000) + public final int versionCode; + + @SafeParceled(1) + public final Status status; + + @SafeParceled(2) + public final SearchResults results; + + private QueryResponse() { + versionCode = 1; + status = null; + results = null; + } + + public QueryResponse(Status status, SearchResults results) { + this.versionCode = 1; + this.status = status; + this.results = results; + } + + public static Creator CREATOR = new AutoCreator(QueryResponse.class); +}