1 /*
2  * Copyright (C) 2015 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 package com.android.messaging.ui;
17 
18 /**
19  * An interface for a UI element ("View") that reflects the playback state of a piece of media
20  * content. It needs to support the ability to take common playback commands (play, pause, stop,
21  * restart) and reflect the state in UI (through timer or progress bar etc.)
22  */
23 public interface PlaybackStateView {
24     /**
25      * Restart the playback.
26      */
restart()27     void restart();
28 
29     /**
30      * Reset ("stop") the playback to the starting position.
31      */
reset()32     void reset();
33 
34     /**
35      * Resume the playback, or start it if it hasn't been started yet.
36      */
resume()37     void resume();
38 
39     /**
40      * Pause the playback.
41      */
pause()42     void pause();
43 }
44