1af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino/* 2af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * Copyright (C) 2017 The Android Open Source Project 3af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * 4af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * Licensed under the Apache License, Version 2.0 (the "License"); 5af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * you may not use this file except in compliance with the License. 6af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * You may obtain a copy of the License at 7af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * 8af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * http://www.apache.org/licenses/LICENSE-2.0 9af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * 10af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * Unless required by applicable law or agreed to in writing, software 11af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * distributed under the License is distributed on an "AS IS" BASIS, 12af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * See the License for the specific language governing permissions and 14af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * limitations under the License 15af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino */ 16af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino 17af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufinopackage com.android.server.backup.transport; 18af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino 19af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufinoimport android.annotation.Nullable; 20af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino 21af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufinoimport com.android.internal.backup.IBackupTransport; 22af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino 23af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino/** 24af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * Listener to be called by {@link TransportClient#connectAsync(TransportConnectionListener, 25af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * String)}. 26af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino */ 27af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufinopublic interface TransportConnectionListener { 28af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino /** 29af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * Called when {@link TransportClient} has a transport binder available or that it decided it 30af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * couldn't obtain one, in which case {@param transport} is null. 31af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * 32af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * @param transport A {@link IBackupTransport} transport binder or null. 33af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino * @param transportClient The {@link TransportClient} used to retrieve this transport binder. 34af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino */ 35af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino void onTransportConnectionResult( 36af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino @Nullable IBackupTransport transport, TransportClient transportClient); 37af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino} 38