- VolumeService ⇒
Object Volume Service.
- StorageProvider
Instance.
- UtilsConnector
- STORAGE_CONSTANTS ⇒
Object Storage to add/get content (volume, channel, etc.).
- bootstrapPortalConnectors()
Global PortalConnectors.
Volume Service.
Returns: Object - Object with volume status.
- VolumeService ⇒
Object- ~setVolume() ⇒
boolean - ~toggleMute() ⇒
boolean
- ~setVolume() ⇒
Sets volume.
Kind: inner method of VolumeService
Returns: boolean - True if volume was successful.
Todo
- Need check this function.
Example
volumeConnector.setVolume(10);Toggles to audio and mute.
Kind: inner method of VolumeService
Returns: boolean - True if volume was toggled.
Todo
- Need check this function.
Instance.
Todo
- Nao deve instanciar duas vezes aqui
- StorageProvider
- static
- .getFilePath(filename, asTemporary) ⇒
string - .writeFile(filename, content, asTemporary) ⇒
boolean - .appendFile(filename, content, asTemporary) ⇒
boolean - .readFile(filename, asTemporary) ⇒
string - .readFileAt(filePath) ⇒
string - .removeFile(filename, asTemporary)
- .removeFileAtPath(filePath)
- .getType(filename, asTemporary) ⇒
string - .getTypeAt(filePath) ⇒
string - .fileExists(filename, asTemporary) ⇒
boolean - .existsAtPath(filePath) ⇒
boolean - .createDir(basePath, dirName)
- .listAt(path) ⇒
Array - .saveTmpOnFlash()
- .loadFlashOnTmp()
- .getFilePath(filename, asTemporary) ⇒
- inner
- ~startTuner()
- ~stopTuner() ⇒
boolean
- static
Gets filePath where is storaged all information in flash memory.
Kind: static method of StorageProvider
Returns: string - Complete path of file.
Todo
- check it.
| Param | Type | Description |
|---|---|---|
| filename | string |
Specific filename. E.g: lastVolumeLevel |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.storageProvider('lastVolumeLevel', false);Writes a new configuration file in storage.
Kind: static method of StorageProvider
Returns: boolean - True if file was saved.
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to write. |
| content | string |
Configuration content. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.writeFile('lastVolumeLevel', 10, true);Appends configuration or information to an existing file.
Kind: static method of StorageProvider
Returns: boolean - True if file was saved.
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to append. |
| content | string |
Configuration content. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.appendFile('lastVolumeLevel', 20, false);Reads a file without filePath.
Kind: static method of StorageProvider
Returns: string - File content.
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to read. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.readFile('lastVolumeLevel', true);Reads a file with filePath in flash memory.
Kind: static method of StorageProvider
Returns: string - File content.
| Param | Type | Description |
|---|---|---|
| filePath | string |
Filepath to read. |
Example
storageProvider.readFileAt('/flash/var/lastVolumeLevel');Removes a specific file without filePath.
Kind: static method of StorageProvider
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to remove. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.removeFile('lastVolumeLevel', true);Removes a specific file with filePath.
Kind: static method of StorageProvider
| Param | Type | Description |
|---|---|---|
| filePath | string |
Filepath to remove. |
Example
storageProvider.removeFileAtPath('/flash/var/lastVolumeLevel');Gets file type without filePath.
Kind: static method of StorageProvider
Returns: string - File type.
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to get type. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.getFilePath('lastVolumeLevel', true);Gets file type with filePath.
Kind: static method of StorageProvider
Returns: string - File type.
| Param | Type | Description |
|---|---|---|
| filePath | string |
Filepath to get type. |
Example
storageProvider.getFilePath('/flash/var/lastVolumeLevel');Checks if exists a specific file without filePath.
Kind: static method of StorageProvider
Returns: boolean - True if file exists.
| Param | Type | Description |
|---|---|---|
| filename | string |
Filename to check. |
| asTemporary | boolean |
True if should get as temporary file. |
Example
storageProvider.fileExists('lastVolumeLevel', true);Checks if exists a specific file with filePath.
Kind: static method of StorageProvider
Returns: boolean - True if file exists.
| Param | Type | Description |
|---|---|---|
| filePath | string |
Filepath to check. |
Example
storageProvider.existsAtPath('/flash/var/lastVolumeLevel');Creates a directory.
Kind: static method of StorageProvider
| Param | Type | Description |
|---|---|---|
| basePath | string |
Path where it'll be created. |
| dirName | string |
Directory name. |
Example
storageProvider.createDir('/flash/var/', 'myDirectory');Shows file list.
Kind: static method of StorageProvider
Returns: Array - List of files.
| Param | Type | Description |
|---|---|---|
| path | string |
Path to list. |
Example
storageProvider.listAt('/flash/var/');Saves on temporary flash memory.
Kind: static method of StorageProvider
Example
storageProvider.saveTmpOnFlash();Loads temporary flash memory.
Kind: static method of StorageProvider
Example
storageProvider.loadFlashOnTmp();Starts tuner.
Kind: inner method of StorageProvider
Example
tunerConnector.startTuner();Stops tuner.
Kind: inner method of StorageProvider
Returns: boolean - True if it was stopped.
Example
tunerConnector.stopTuner();Todo
- Nao deve instanciar duas vezes aqui
- UtilsConnector
- init ⏏
- new init()
- .getMAC() ⇒
string - .getIP() ⇒
string - .isPincodePurchaseEnabled() ⇒
boolean - .setParentalRating(parentalRating) ⇒
number
- init ⏏
Initializes the UtilsConnector.
Gets MAC Adress of network.
Kind: static method of init
Returns: string - MAC Address.
Example
utilsConnector.getMAC();Gets IP of network.
Kind: static method of init
Returns: string - Network IP.
Example
utilsConnector.getIP();Checks if PIN Purchase is activated.
Kind: static method of init
Returns: boolean - True if PIN Purchase is activated.
Example
utilsConnector.isPincodePurchaseEnabled();Sets Parental Rating.
Kind: static method of init
Returns: number - Parental rating value.
| Param | Type | Description |
|---|---|---|
| parentalRating | number |
Parental rating number. |
Example
utilsConnector.setParentalRating();Storage to add/get content (volume, channel, etc.).
Kind: global constant
Returns: Object - BASE_PATH
Todo
- Implement.
| Param | Type |
|---|---|
| BASE_PATH | Object |
Global PortalConnectors.
Kind: global function
Todo
- Implement documentation.