diff --git a/apis/ResourceManager/IResourceManager.h b/apis/ResourceManager/IResourceManager.h index ed48cedd..02a77367 100644 --- a/apis/ResourceManager/IResourceManager.h +++ b/apis/ResourceManager/IResourceManager.h @@ -27,55 +27,44 @@ namespace WPEFramework namespace Exchange { /* @json 1.0.0 @text:keep */ - struct EXTERNAL IResourceManager : virtual public Core::IUnknown + struct EXTERNAL IResourceManager : virtual public Core::IUnknown { enum { ID = ID_RESOURCEMANAGER }; - // Define string iterator for ResourceManager using IStringIterator = RPC::IIteratorType; - // Result struct for SetAVBlocked operation - struct EXTERNAL SetAVBlockedResult { + struct EXTERNAL Success { bool success; }; - // Result struct for TTS operations - struct EXTERNAL TTSResult { - bool success; - }; - - /**********************setAVBlocked() - start****************************/ + /** Sets AV blocking status for an application */ // @text setAVBlocked - // @brief Sets AV blocking status for an application + // @brief Adds/removes the application with the given callsign to/from the AV blacklist // @param appId - in - string - // @param blocked - in - bool - // @param result - out - SetAVBlockedResult - virtual Core::hresult SetAVBlocked(const string& appId, const bool blocked, SetAVBlockedResult& result /* @out */) = 0; - /**********************setAVBlocked() - end******************************/ + // @param blocked - in - boolean + // @param result - out - Success + virtual Core::hresult SetAVBlocked(const string& appId, const bool blocked, Success& result /* @out */) = 0; - /**********************getBlockedAVApplications() - start***************/ - // @text getBlockedAVApplications - // @brief Gets list of applications with blocked AV access - // @param clients: list of blocked applications - // @param success: success status + /** Gets a list of blacklisted clients */ + // @text getBlockedAVApplications + // @brief Gets a list of blacklisted clients + // @param clients - out - IStringIterator + // @param success - out - boolean virtual Core::hresult GetBlockedAVApplications(IStringIterator*& clients /* @out */, bool& success /* @out */) const = 0; - /**********************getBlockedAVApplications() - end*****************/ - /**********************reserveTTSResource() - start*********************/ + /** Reserves the Text To Speech resource for a specified client */ // @text reserveTTSResource - // @brief Reserves TTS resource for a single application + // @brief Reserves the Text To Speech resource for a specified client // @param appId - in - string - // @param ttsResult - out - TTSResult - virtual Core::hresult ReserveTTSResource(const string& appId, TTSResult& ttsResult /* @out */) = 0; - /**********************reserveTTSResource() - end***********************/ + // @param result - out - Success + virtual Core::hresult ReserveTTSResource(const string& appId, Success& result /* @out */) = 0; - /**********************reserveTTSResourceForApps() - start***************/ + /** Reserves the Text To Speech resource for specified clients */ // @text reserveTTSResourceForApps - // @brief Reserves TTS resource for multiple applications - // @param appids: list of application IDs - // @param ttsResult: result of the TTS reservation - virtual Core::hresult ReserveTTSResourceForApps(IStringIterator* const appids, TTSResult& ttsResult /* @out */) = 0; - /**********************reserveTTSResourceForApps() - end*****************/ + // @brief Reserves the Text To Speech resource for specified clients + // @param appids - in - IStringIterator + // @param result - out - Success + virtual Core::hresult ReserveTTSResourceForApps(IStringIterator* const appids, Success& result /* @out */) = 0; }; } // namespace Exchange } // namespace WPEFramework \ No newline at end of file diff --git a/docs/apis/ResourceManager.md b/docs/apis/ResourceManager.md index c624d968..6698f998 100644 --- a/docs/apis/ResourceManager.md +++ b/docs/apis/ResourceManager.md @@ -46,15 +46,15 @@ ResourceManager interface methods: | Method | Description | | :-------- | :-------- | -| [getBlockedAVApplications](#getBlockedAVApplications) | Gets list of applications with blocked AV access | -| [reserveTTSResource](#reserveTTSResource) | Reserves TTS resource for a single application | -| [reserveTTSResourceForApps](#reserveTTSResourceForApps) | Reserves TTS resource for multiple applications | -| [setAVBlocked](#setAVBlocked) | Sets AV blocking status for an application | +| [getBlockedAVApplications](#getBlockedAVApplications) | Gets a list of blacklisted clients | +| [reserveTTSResource](#reserveTTSResource) | Reserves the Text To Speech resource for a specified client | +| [reserveTTSResourceForApps](#reserveTTSResourceForApps) | Reserves the Text To Speech resource for specified clients | +| [setAVBlocked](#setAVBlocked) | Adds/removes the application with the given callsign to/from the AV blacklist | ## *getBlockedAVApplications* -Gets list of applications with blocked AV access +Gets a list of blacklisted clients ### Events Event details will be updated soon. @@ -64,9 +64,9 @@ This method takes no parameters. | Name | Type | Description | | :-------- | :-------- | :-------- | | result | object | | -| result.clients | IStringIterator | list of blocked applications | +| result.clients | IStringIterator | IStringIterator | | result.clients[#] | string | | -| result.success | bool | success status | +| result.success | bool | boolean | ### Examples @@ -107,7 +107,7 @@ curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "met ## *reserveTTSResource* -Reserves TTS resource for a single application +Reserves the Text To Speech resource for a specified client ### Events Event details will be updated soon. @@ -120,7 +120,7 @@ Event details will be updated soon. | Name | Type | Description | | :-------- | :-------- | :-------- | | result | object | | -| result.success | bool | success status | +| result.success | bool | boolean | ### Examples @@ -161,7 +161,7 @@ curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 1, "met ## *reserveTTSResourceForApps* -Reserves TTS resource for multiple applications +Reserves the Text To Speech resource for specified clients ### Events Event details will be updated soon. @@ -169,13 +169,13 @@ Event details will be updated soon. | Name | Type | Description | | :-------- | :-------- | :-------- | | params | object | | -| params.appids | IStringIterator | list of application IDs | +| params.appids | IStringIterator | IStringIterator | | params.appids[#] | string | | ### Results | Name | Type | Description | | :-------- | :-------- | :-------- | | result | object | | -| result.success | bool | success status | +| result.success | bool | boolean | ### Examples @@ -216,7 +216,7 @@ curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 2, "met ## *setAVBlocked* -Sets AV blocking status for an application +Adds/removes the application with the given callsign to/from the AV blacklist ### Events Event details will be updated soon. @@ -225,12 +225,12 @@ Event details will be updated soon. | :-------- | :-------- | :-------- | | params | object | | | params.appId | string | string | -| params.blocked | bool | bool | +| params.blocked | bool | boolean | ### Results | Name | Type | Description | | :-------- | :-------- | :-------- | | result | object | | -| result.success | bool | success status | +| result.success | bool | boolean | ### Examples