From 502790bd977a499836c9987b5e3b6c93a4733813 Mon Sep 17 00:00:00 2001 From: Nikita Poltorapavlo Date: Wed, 2 Dec 2020 18:20:47 +0200 Subject: [PATCH] remove unused event, updated doc --- UsbAccess/README.md | 8 ++++---- UsbAccess/UsbAccess.cpp | 1 - UsbAccess/UsbAccess.h | 1 - 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/UsbAccess/README.md b/UsbAccess/README.md index 7ba3ab1c3c..71b928fc1b 100644 --- a/UsbAccess/README.md +++ b/UsbAccess/README.md @@ -6,21 +6,21 @@ ## Methods: ``` -curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.getFileList","params":{}}' http://127.0.0.1:9998/jsonrpc +curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.getFileList","params":{"path":"www"}}' http://127.0.0.1:9998/jsonrpc curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.createLink","params":{}}' http://127.0.0.1:9998/jsonrpc curl -d '{"jsonrpc":"2.0","id":"3","method":"org.rdk.UsbAccess.1.clearLink","params":{}}' http://127.0.0.1:9998/jsonrpc ``` ## Responses ``` -{"jsonrpc":"2.0","id":3,"result":{"success":true}} -{"jsonrpc":"2.0","id":3,"result":{"success":true}} +{"jsonrpc":"2.0","id":3,"result":{"contents":[{"name":"var","t":"f"},{"name":"..","t":"d"},{"name":"pages","t":"d"},{"name":"logs","t":"f"},{"name":".","t":"d"}],"success":true}} +{"jsonrpc":"2.0","id":3,"result":{"baseURL":"http://localhost:50050/usbdrive","success":true}} {"jsonrpc":"2.0","id":3,"result":{"success":true}} ``` ## Events ``` -onUSBMountChanged +None ``` ## Full Reference diff --git a/UsbAccess/UsbAccess.cpp b/UsbAccess/UsbAccess.cpp index 0325359ee5..8abf1d188d 100644 --- a/UsbAccess/UsbAccess.cpp +++ b/UsbAccess/UsbAccess.cpp @@ -11,7 +11,6 @@ const string WPEFramework::Plugin::UsbAccess::SERVICE_NAME = "org.rdk.UsbAccess" const string WPEFramework::Plugin::UsbAccess::METHOD_GET_FILE_LIST = "getFileList"; const string WPEFramework::Plugin::UsbAccess::METHOD_CREATE_LINK = "createLink"; const string WPEFramework::Plugin::UsbAccess::METHOD_CLEAR_LINK = "clearLink"; -const string WPEFramework::Plugin::UsbAccess::EVT_ON_USB_MOUNT_CHANGED = "onUSBMountChanged"; const string WPEFramework::Plugin::UsbAccess::USB_MOUNT_PATH = "/run/media/sda"; // platco const string WPEFramework::Plugin::UsbAccess::LINK_PATH = "/opt/www/usbdrive"; const string WPEFramework::Plugin::UsbAccess::LINK_URL_HTTP = "http://localhost:50050/usbdrive"; diff --git a/UsbAccess/UsbAccess.h b/UsbAccess/UsbAccess.h index 5c2af80878..4e5a355fb4 100644 --- a/UsbAccess/UsbAccess.h +++ b/UsbAccess/UsbAccess.h @@ -28,7 +28,6 @@ namespace WPEFramework { static const string METHOD_CREATE_LINK; static const string METHOD_CLEAR_LINK; //events - static const string EVT_ON_USB_MOUNT_CHANGED; //other static const string USB_MOUNT_PATH; static const string LINK_PATH;