Adjusting C++ files to compile with gcc 4.9.3
[iot2.git] / benchmarks / original_interfaces / Speaker.java
1 package iotcode.interfaces;
2
3 import java.rmi.Remote;
4 import java.rmi.RemoteException;
5
6 // Checker annotations
7 import iotchecker.qual.NonLocalRemote;
8
9 /** Speaker Interface Class
10  *
11  * @author      Rahmadi Trimananda <rahmadi.trimananda @ uci.edu>
12  * @version     1.0
13  * @since       2016-04-29
14  */
15 public interface Speaker extends Remote {
16
17         /** Init method
18          *
19          *   @param None.
20          *
21          *   @return [void] None.
22          */
23     public void init() throws RemoteException;
24
25         /** Method to start playback
26          *
27          *   @param None.
28          *
29          *   @return [boolean] True/false to start playback.
30          */
31     public boolean startPlayback() throws RemoteException;
32
33         /** Method to stop playback
34          *
35          *   @param None.
36          *
37          *   @return [boolean] True/false to stop playback.
38          */
39     public boolean stopPlayback() throws RemoteException;
40
41
42         /** Method to getPlaybackState
43          *
44          *   @param None.
45          *
46          *   @return [boolean] True/false of playback state
47          */
48     public boolean getPlaybackState() throws RemoteException;
49
50         /** Method to set volume
51          *
52          *   @param [float] Volume percentage.
53          *
54          *   @return [boolean] True/false to set volume.
55          */
56     public boolean setVolume(float _percent) throws RemoteException;
57
58         /** Method to get volume
59          *
60          *   @param None.
61          *
62          *   @return [float] Volume percentage.
63          */
64     public float getVolume() throws RemoteException;
65
66         /** Method to get position in the song
67          *
68          *   @param None.
69          *
70          *   @return [int] Position in the song when playing music.
71          */
72     public int getPosition()throws RemoteException;
73
74         /** Method to set position
75          *
76          *   @param [int] Position to set (in milliseconds)
77          *
78          *   @return [void] None.
79          */
80     public void setPosition(int _mSec) throws RemoteException;
81
82         /** Method to set position
83          *
84          *   @param [short[]] Sample packets from music file
85          *   @param [int] Offset
86          *   @param [int] Length
87          *
88          *   @return [void] None.
89          */
90     public void loadData(short[] _samples, int _offs, int _len) throws RemoteException;
91
92
93         /** Method to clear all pcm data
94          *
95          *   @param None
96          *
97          *   @return [void] None.
98          */
99     public void clearData() throws RemoteException;
100
101
102         /** Method to register callbacks
103          *
104          *   @param [SpeakerCallback] Callback object
105          *
106          *   @return [void] None.
107          */
108     public void registerCallback(@NonLocalRemote SpeakerCallback _cb) throws RemoteException;
109 }