1 /*
2  * Copyright (C) 2020 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.aidl.tests;
18 
19 import android.aidl.tests.GenericStructuredParcelable;
20 import android.aidl.tests.IntEnum;
21 import android.aidl.tests.SimpleParcelable;
22 import android.aidl.tests.StructuredParcelable;
23 import android.aidl.tests.Union;
24 import android.aidl.tests.extension.ExtendableParcelable;
25 import android.os.PersistableBundle;
26 
27 // Tests that are only supported by the C++/Java backends, not NDK/Rust
28 interface ICppJavaTests {
RepeatSimpleParcelable(in SimpleParcelable input, out SimpleParcelable repeat)29     SimpleParcelable RepeatSimpleParcelable(in SimpleParcelable input, out SimpleParcelable repeat);
RepeatGenericParcelable( in GenericStructuredParcelable<int, StructuredParcelable, IntEnum> input, out GenericStructuredParcelable<int, StructuredParcelable, IntEnum> repeat)30     GenericStructuredParcelable<int, StructuredParcelable, IntEnum> RepeatGenericParcelable(
31             in GenericStructuredParcelable<int, StructuredParcelable, IntEnum> input,
32             out GenericStructuredParcelable<int, StructuredParcelable, IntEnum> repeat);
RepeatPersistableBundle(in PersistableBundle input)33     PersistableBundle RepeatPersistableBundle(in PersistableBundle input);
34 
ReverseSimpleParcelables( in SimpleParcelable[] input, out SimpleParcelable[] repeated)35     SimpleParcelable[] ReverseSimpleParcelables(
36             in SimpleParcelable[] input, out SimpleParcelable[] repeated);
ReversePersistableBundles( in PersistableBundle[] input, out PersistableBundle[] repeated)37     PersistableBundle[] ReversePersistableBundles(
38             in PersistableBundle[] input, out PersistableBundle[] repeated);
ReverseUnion(in Union input, out Union repeated)39     Union ReverseUnion(in Union input, out Union repeated);
40     // Test that List<T> types work correctly.
ReverseNamedCallbackList(in List<IBinder> input, out List<IBinder> repeated)41     List<IBinder> ReverseNamedCallbackList(in List<IBinder> input, out List<IBinder> repeated);
42 
RepeatFileDescriptor(in FileDescriptor read)43     FileDescriptor RepeatFileDescriptor(in FileDescriptor read);
ReverseFileDescriptorArray( in FileDescriptor[] input, out FileDescriptor[] repeated)44     FileDescriptor[] ReverseFileDescriptorArray(
45             in FileDescriptor[] input, out FileDescriptor[] repeated);
46 
TakesAnIBinderList(in List<IBinder> input)47     void TakesAnIBinderList(in List<IBinder> input);
TakesANullableIBinderList(in @ullable List<IBinder> input)48     void TakesANullableIBinderList(in @nullable List<IBinder> input);
49 
RepeatExtendableParcelable(in ExtendableParcelable ep, out ExtendableParcelable ep2)50     void RepeatExtendableParcelable(in ExtendableParcelable ep, out ExtendableParcelable ep2);
51 }
52