13957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo/*
23957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Copyright (C) 2014 The Android Open Source Project
33957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
43957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Licensed under the Apache License, Version 2.0 (the "License");
53957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * you may not use this file except in compliance with the License.
63957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * You may obtain a copy of the License at
73957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
83957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *      http://www.apache.org/licenses/LICENSE-2.0
93957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo *
103957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Unless required by applicable law or agreed to in writing, software
113957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * distributed under the License is distributed on an "AS IS" BASIS,
123957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * See the License for the specific language governing permissions and
143957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * limitations under the License.
153957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo */
163957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
17d5cc4a281e7ce29d1e8687ff3394b57a3a549260Jae Seopackage android.media.tv;
183957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
19d5cc4a281e7ce29d1e8687ff3394b57a3a549260Jae Seoimport android.media.tv.ITvInputSession;
20b93ccca6139a7ee2dba5c110e5f8213a2bd231e5Dongwon Kangimport android.net.Uri;
211f213914c45c23c653f721690da2ce0718e63139Dongwon Kangimport android.media.tv.TvTrackInfo;
22832860fb9f6b3a7188a6af2d5d67806593595800Youngsang Choimport android.os.Bundle;
233957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo
243957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo/**
253957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * Helper interface for ITvInputSession to allow the TV input to notify the system service when a
263957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * new session has been created.
273957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo * @hide
283957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo */
293957091ba8f08c02b5e781098cb955a5f697a1ffJae Seooneway interface ITvInputSessionCallback {
30bd2fa2c02d916a9b6c62f8fd8701d779c00bd68dDongwon Kang    void onSessionCreated(ITvInputSession session, in IBinder hardwareSessionToken);
31832860fb9f6b3a7188a6af2d5d67806593595800Youngsang Cho    void onSessionEvent(in String name, in Bundle args);
32b93ccca6139a7ee2dba5c110e5f8213a2bd231e5Dongwon Kang    void onChannelRetuned(in Uri channelUri);
3310d285ac06b3d3060c7d90d3dc196d4ac8367467Jae Seo    void onTracksChanged(in List<TvTrackInfo> tracks);
3410d285ac06b3d3060c7d90d3dc196d4ac8367467Jae Seo    void onTrackSelected(int type, in String trackId);
359b08edff236fc68d836eccfaa1a5f028dc390cecDongwon Kang    void onVideoAvailable();
369b08edff236fc68d836eccfaa1a5f028dc390cecDongwon Kang    void onVideoUnavailable(int reason);
37bbcd206a798c8c2845200daf7a2d4cb7b29056f3Jae Seo    void onContentAllowed();
386057102dbb746593a7d59cf377c969b62e38c664Jae Seo    void onContentBlocked(in String rating);
39ff04ae757a5542d2d5633e75b7adacc4fce1ce7eYoungsang Cho    void onLayoutSurface(int left, int top, int right, int bottom);
406f0240cf63fe62b0af2c7d5112f9881d1e167bfcDongwon Kang    void onTimeShiftStatusChanged(int status);
416f0240cf63fe62b0af2c7d5112f9881d1e167bfcDongwon Kang    void onTimeShiftStartPositionChanged(long timeMs);
426f0240cf63fe62b0af2c7d5112f9881d1e167bfcDongwon Kang    void onTimeShiftCurrentPositionChanged(long timeMs);
43a826d0172aae5e91d633ffe606059a2355fbf7e5Jae Seo
44a826d0172aae5e91d633ffe606059a2355fbf7e5Jae Seo    // For the recording session
45b55c7517ba4b2c2959a0bc4d37536e7e3c8283c9Dongwon Kang    void onTuned(in Uri channelUri);
46a826d0172aae5e91d633ffe606059a2355fbf7e5Jae Seo    void onRecordingStopped(in Uri recordedProgramUri);
47a826d0172aae5e91d633ffe606059a2355fbf7e5Jae Seo    void onError(int error);
483957091ba8f08c02b5e781098cb955a5f697a1ffJae Seo}
49