Adding ESP8266 code; modified for the latest password for LEDE
[iot2.git] / localconfig / iotpolicy / IHome / ihome.pol
1 public interface Speaker {
2
3         public void init();
4         public boolean startPlayback();
5         public boolean stopPlayback();
6         public boolean getPlaybackState();
7         public boolean setVolume(float _percent);
8         public float getVolume();
9         public int getPosition();
10         public void setPosition(int _mSec);
11         public void loadData(short _samples[], int _offs, int _len);
12         public void clearData();
13         public void registerCallback(SpeakerCallback _cb);
14
15         capability Initialize {
16                 description = "Initialize object";
17                 method = "init()";
18                 method = "registerCallback(SpeakerCallback _cb)";
19         }
20
21         capability Playback {
22                 description = "Manage playback";
23                 method = "startPlayback()";
24                 method = "stopPlayback()";
25                 method = "getPlaybackState()";
26         }
27
28         capability Volume {
29                 description = "Manage volume";
30                 method = "setVolume(float _percent)";
31                 method = "getVolume()";
32         }
33
34         capability Position {
35                 description = "Manage position in the song";
36                 method = "getPosition()";
37                 method = "setPosition(int _mSec)";
38         }
39
40         capability Data {
41                 description = "Manage song data";
42                 method = "loadData(short _samples[], int _offs, int _len)";
43                 method = "clearData()";
44         }
45 }
46
47