1542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad/* 2542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * Copyright (C) 2014 The Android Open Source Project 3542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * 4542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * Licensed under the Apache License, Version 2.0 (the "License"); 5542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * you may not use this file except in compliance with the License. 6542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * You may obtain a copy of the License at 7542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * 8542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * http://www.apache.org/licenses/LICENSE-2.0 9542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * 10542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * Unless required by applicable law or agreed to in writing, software 11542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * distributed under the License is distributed on an "AS IS" BASIS, 12542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * See the License for the specific language governing permissions and 14542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * limitations under the License. 15542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad */ 16542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad 17ef9f6f957d897ea0ed82114185b8fa3fefd4917bTyler Gunnpackage android.telecom; 18542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad 19542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad/** 209d568c01db1f90fbe9cbff1d9385e7e7b809e066Nancy Chen * @hide 21542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad */ 22542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awadpublic interface Response<IN, OUT> { 23542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad 24542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad /** 25542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * Provide a set of results. 26542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * 27542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * @param request The original request. 28542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * @param result The results. 29542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad */ 30542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad void onResult(IN request, OUT... result); 31542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad 32542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad /** 33542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * Indicates the inability to provide results. 34542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * 35542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad * @param request The original request. 36fbb092f26e796fe638fb8bb4a91de2d4525bcaccIhab Awad * @param code An integer code indicating the reason for failure. 37fbb092f26e796fe638fb8bb4a91de2d4525bcaccIhab Awad * @param msg A message explaining the reason for failure. 38542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad */ 39fbb092f26e796fe638fb8bb4a91de2d4525bcaccIhab Awad void onError(IN request, int code, String msg); 40542e0ea8bfa60f09c33e4be366adf8681c25d0bfIhab Awad} 41