diff options
11 files changed, 359 insertions, 0 deletions
diff --git a/media/java/android/media/tv/extension/servicedb/IChannelListTransfer.aidl b/media/java/android/media/tv/extension/servicedb/IChannelListTransfer.aidl new file mode 100644 index 000000000000..cb6aeccb5b57 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IChannelListTransfer.aidl @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.os.ParcelFileDescriptor; + +/** + * @hide + */ +interface IChannelListTransfer { + // Parse XML file and import Channels information. + void importChannelList(in ParcelFileDescriptor pfd); + // Get Channels information for export and create XML file. + void exportChannelList(in ParcelFileDescriptor pfd); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceList.aidl b/media/java/android/media/tv/extension/servicedb/IServiceList.aidl new file mode 100644 index 000000000000..51daa80ccbd6 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceList.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.os.Bundle; + +/** + * @hide + */ +interface IServiceList { + // Get a list of the Service list IDs quivalent to COLUMN_CHANNEL_LIST_ID + // in the Channels table of TvProvider. + String[] getServiceListIds(); + // Get the information associated with the Service list. + Bundle getServiceListInfo(String serviceListId, in String[] keys); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListEdit.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListEdit.aidl new file mode 100644 index 000000000000..1b1577ffc015 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListEdit.aidl @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.media.tv.extension.servicedb.IServiceListEditListener; +import android.os.Bundle; + +/** + * @hide + */ +interface IServiceListEdit { + // Open in edit mode. Must call close() after edit is done. + int open(IServiceListEditListener listener); + // Method to close in edit mode. + int close(); + // Method to commit changes made to service database. + int commit(); + // Method to commit and close the changes. + int userEditCommit(); + + // Get a service/transportStream/Network/Satellite record information specified by + // serviceInfoId and keys from tvdb. + Bundle getServiceInfoFromDatabase(String serviceInfoId, in String[] keys); + // Get a list of all service records' information specified by serviceListId and keys from tvdb. + Bundle getServiceInfoListFromDatabase(String serviceListId, in String[] keys); + // Get a list of all service info IDs in the service list of serviceListId from tvdb. + String[] getServiceInfoIdsFromDatabase(String inServiceListId); + // Update a service information by the contents of serviceInfo; + int updateServiceInfoFromDatabase(in Bundle updateServiceInfo); + // Update all service information by the contents of serviceInfoList. + int updateServiceInfoByListFromDatabase(in Bundle[] updateServiceInfoList); + // Remove a service information of the serviceInfoId from the service list. + int removeServiceInfoFromDatabase(String serviceInfoId); + // Remove all service information of the serviceInfoId from the service list. + int removeServiceInfoByListFromDatabase(in String[] serviceInfoIdList); + // Get a list of the Service list IDs which is equivalent to COLUMN_CHANNEL_LIST_ID + // in Channels table from tv db. + String[] getServiceListChannelIds(); + // Get the information associated with the Service list Channel id. + Bundle getServiceListInfoByChannelId(String serviceListChannelId, in String[] keys); + + // Get a list of transportStream records' information specified by serviceListId and keys. + Bundle getTransportStreamInfoList(String serviceListId, in String[] keys); + // Get a list of transportStream records' information specified by serviceListId and keys + // from work db. + Bundle getTransportStreamInfoListForce(String serviceListId, in String[] keys); + + // Get a list of network records' information specified by serviceListId and keys. + Bundle getNetworkInfoList(String serviceListId, in String[] keys); + // Get a list of satellite records' information specified by serviceListId and keys. + Bundle getSatelliteInfoList(String serviceListId, in String[] keys); + + // Decompress whole bundle value of single service/transportStream/Network/Satellite record. + // RecordInfoBundle:a single record got from database by getServiceInfoFromDatabase() + String toRecordInfoByType(in Bundle recordInfoBundle, String recordType); + // Set channels(tv.db) modified result to middleware database(SVL/TSL/NWL/SATL). + int putRecordIdList(String serviceListId, in Bundle recordIdListBundle, int optType); + + // Add predefined ServiceListInfo of Hotbird 13E in scan two satellite scene EU region + // following by commit(). + String addPredefinedServiceListInfo(int broadcastType, String serviceListType, + String serviceListPrefix, String countryCode, int operatorId); + // Add predefined channels of Hotbird 13E in scan two satellite scene EU region. + int addPredefinedChannelList(String serviceListId, in Bundle[] predefinedListBundle); + // Add predefined satellite info of Hotbird 13E in scan two satellite scene EU region. + int addPredefinedSatInfo(String serviceListId, in Bundle predefinedSatInfoBundle); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListEditListener.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListEditListener.aidl new file mode 100644 index 000000000000..e227eda47d4f --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListEditListener.aidl @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +/** + * @hide + */ +oneway interface IServiceListEditListener { + void onCompleted(int requestId, int result); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListExportListener.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListExportListener.aidl new file mode 100644 index 000000000000..c57e8f97ed4c --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListExportListener.aidl @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +/** + * @hide + */ +oneway interface IServiceListExportListener { + void onExported(int exportResult); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListExportSession.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListExportSession.aidl new file mode 100644 index 000000000000..fcde581548f6 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListExportSession.aidl @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.os.Bundle; +import android.os.ParcelFileDescriptor; + +/** + * @hide + */ +interface IServiceListExportSession { + // Start export service list with reserved parameters. + int exportServiceList(in ParcelFileDescriptor pfd, in Bundle exportParams); + // Release export resources. + int release(); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListImportListener.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListImportListener.aidl new file mode 100644 index 000000000000..abd8320df11d --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListImportListener.aidl @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +/** + * @hide + */ +interface IServiceListImportListener { + void onImported(int importResult); + void onPreloaded(int preloadResult); +}
\ No newline at end of file diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListImportSession.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListImportSession.aidl new file mode 100644 index 000000000000..1f1ae010a444 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListImportSession.aidl @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.os.Bundle; +import android.os.ParcelFileDescriptor; + +/** + * @hide + */ +interface IServiceListImportSession { + // Start import service list. Should call after preload and before release. + int importServiceList(in ParcelFileDescriptor pfd, in Bundle importParams); + // Preparing for import. + int preload(in ParcelFileDescriptor pfd); + // Release import resources. + int release(); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListListener.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListListener.aidl new file mode 100644 index 000000000000..7c9c5c8a8048 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListListener.aidl @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +/** + * @hide + */ +oneway interface IServiceListSetChannelListListener { + void onCompleted(int setChannelListResult); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListSession.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListSession.aidl new file mode 100644 index 000000000000..b0527b3709b7 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListSetChannelListSession.aidl @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.os.Bundle; + +/** + * @hide + */ +interface IServiceListSetChannelListSession { + // Set channelList with channelinfo bundles, serviceListInfo, and operation type. + int setChannelList(in Bundle[] channelsInfo, in Bundle ServiceListInfoBundle, int optType); + // Release set channellist resources. + int release(); +} diff --git a/media/java/android/media/tv/extension/servicedb/IServiceListTransferInterface.aidl b/media/java/android/media/tv/extension/servicedb/IServiceListTransferInterface.aidl new file mode 100644 index 000000000000..91fb15728b06 --- /dev/null +++ b/media/java/android/media/tv/extension/servicedb/IServiceListTransferInterface.aidl @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * 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 android.media.tv.extension.servicedb; + +import android.media.tv.extension.servicedb.IServiceListExportListener; +import android.media.tv.extension.servicedb.IServiceListImportListener; +import android.media.tv.extension.servicedb.IServiceListSetChannelListListener; +import android.os.IBinder; + +/** + * @hide + */ +interface IServiceListTransferInterface { + IBinder createExportSession(in IServiceListExportListener listener); + IBinder createImportSession(in IServiceListImportListener listener); + IBinder createSetChannelListSession(in IServiceListSetChannelListListener listener); +} |