From 946b6652f04abca15886410a3332da47da7d674e Mon Sep 17 00:00:00 2001 From: Woochan Lee Date: Mon, 16 Oct 2023 13:29:11 +0900 Subject: [PATCH] aurum-service: code clean up It contains below changes - delete unused header include (config.h) - update bolier-plate - use pragma intead of ifdef - adjust tizen c++ code indentation - re-arrage header file - log cleanup Change-Id: I41e4ff1fc67b9f634cab0994e67d9b748f8bcc96 --- org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h | 12 +++--------- .../inc/Commands/ActionAndWaitEventCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/Command.h | 14 +++----------- org.tizen.aurum-bootstrap/inc/Commands/Commands.h | 12 ++---------- .../inc/Commands/DumpObjectTreeCommand.h | 11 ++--------- .../inc/Commands/EnableScreenAnalyzerCommand.h | 9 ++------- .../inc/Commands/FindElementCommand.h | 9 ++------- .../inc/Commands/FindElementsCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h | 9 ++------- .../inc/Commands/GetActiveAppToolkitNameCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/GetAngleCommand.h | 7 +------ .../inc/Commands/GetAppInfoCommand.h | 9 ++------- .../inc/Commands/GetAttributeCommand.h | 9 ++------- .../inc/Commands/GetDeviceTimeCommand.h | 9 ++------- .../inc/Commands/GetLocationCommand.h | 9 ++------- .../inc/Commands/GetScreenSizeCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h | 9 ++------- .../inc/Commands/GetTextMinBoundingRectCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h | 9 ++------- .../inc/Commands/InstallAppCommand.h | 9 ++------- .../inc/Commands/KillServerCommand.h | 9 ++------- .../inc/Commands/LaunchAppCommand.h | 11 +++-------- .../inc/Commands/LongClickCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h | 8 ++------ org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h | 8 ++------ .../inc/Commands/RemoveAppCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/SetFocusCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h | 9 ++------- .../inc/Commands/SetXMLSyncCommand.h | 7 +------ .../inc/Commands/TakeScreenshotCommand.h | 9 ++------- .../inc/Commands/TouchDownCommand.h | 9 ++------- .../inc/Commands/TouchMoveCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h | 9 ++------- org.tizen.aurum-bootstrap/inc/ObjectMapper.h | 9 +++------ .../inc/Runnable/ActionAndWaitEventRunnable.h | 2 +- .../inc/Runnable/LaunchAppRunnable.h | 2 +- org.tizen.aurum-bootstrap/inc/bootstrap.h | 13 ++++++++----- org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc | 12 ++++-------- org.tizen.aurum-bootstrap/src/BootstrapServer.cc | 10 +++------- .../src/Commands/ActionAndWaitEventCommand.cc | 9 +++++---- org.tizen.aurum-bootstrap/src/Commands/ClearCommand.cc | 7 ++++--- org.tizen.aurum-bootstrap/src/Commands/ClickCommand.cc | 15 +++++++++------ .../src/Commands/CloseAppCommand.cc | 8 +++++--- org.tizen.aurum-bootstrap/src/Commands/Command.cc | 2 +- .../src/Commands/DumpObjectTreeCommand.cc | 5 +++-- .../src/Commands/EnableScreenAnalyzerCommand.cc | 6 +++--- .../src/Commands/FindElementCommand.cc | 5 +++-- .../src/Commands/FindElementsCommand.cc | 6 ++++-- org.tizen.aurum-bootstrap/src/Commands/FlickCommand.cc | 3 +-- .../src/Commands/GetActiveAppToolkitNameCommand.cc | 3 +-- .../src/Commands/GetAngleCommand.cc | 4 +--- .../src/Commands/GetAppInfoCommand.cc | 8 ++++---- .../src/Commands/GetAttributeCommand.cc | 16 ++++++++++++++-- .../src/Commands/GetDeviceTimeCommand.cc | 7 +++---- .../src/Commands/GetLocationCommand.cc | 3 +-- .../src/Commands/GetScreenSizeCommand.cc | 3 +-- org.tizen.aurum-bootstrap/src/Commands/GetSizeCommand.cc | 4 ++-- .../src/Commands/GetTextMinBoundingRectCommand.cc | 3 +-- .../src/Commands/GetValueCommand.cc | 8 ++++---- .../src/Commands/InstallAppCommand.cc | 6 +++--- .../src/Commands/KillServerCommand.cc | 3 +-- .../src/Commands/LaunchAppCommand.cc | 12 +++++++----- .../src/Commands/LongClickCommand.cc | 3 +-- org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc | 8 +++----- org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc | 12 +----------- .../src/Commands/RemoveAppCommand.cc | 6 +++--- org.tizen.aurum-bootstrap/src/Commands/SendKeyCommand.cc | 4 ++-- .../src/Commands/SetFocusCommand.cc | 6 +++--- .../src/Commands/SetValueCommand.cc | 7 ++++--- .../src/Commands/SetXMLSyncCommand.cc | 6 +++--- .../src/Commands/TakeScreenshotCommand.cc | 6 +++--- .../src/Commands/TouchDownCommand.cc | 4 ++-- .../src/Commands/TouchMoveCommand.cc | 4 ++-- org.tizen.aurum-bootstrap/src/Commands/TouchUpCommand.cc | 4 ++-- org.tizen.aurum-bootstrap/src/ObjectMapper.cc | 10 +++++----- .../src/Runnable/ActionAndWaitEventRunnable.cc | 2 +- .../src/Runnable/LaunchAppRunnable.cc | 2 +- 81 files changed, 212 insertions(+), 408 deletions(-) diff --git a/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h b/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h index 22be632..458f4b7 100644 --- a/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h +++ b/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,9 @@ * */ -#ifndef _AURUM_SERVICE_IMPL_H_ -#define _AURUM_SERVICE_IMPL_H_ +#pragma once -#include -#include "Commands/Command.h" -#include +#include "bootstrap.h" class aurumServiceImpl final : public aurum::Bootstrap::Service { public: @@ -141,6 +138,3 @@ public: public: int WAIT_TIMEOUT_MS; }; - -#endif - diff --git a/org.tizen.aurum-bootstrap/inc/Commands/ActionAndWaitEventCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/ActionAndWaitEventCommand.h index b6bf1ec..49ec6f0 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/ActionAndWaitEventCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/ActionAndWaitEventCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class ActionAndWaitEventCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h index cef1deb..b078da3 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class ClearCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h index 8f7a465..496de55 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class ClickCommand : public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h index 5222364..4525cfd 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class CloseAppCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/Command.h b/org.tizen.aurum-bootstrap/inc/Commands/Command.h index 634edbe..af8a93b 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/Command.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/Command.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,15 +15,9 @@ * */ -#ifndef _COMMAND_H_ -#define _COMMAND_H_ +#pragma once -#include -#include -#include "ObjectMapper.h" -#include - -#include "config.h" +#include "bootstrap.h" class Command { public: @@ -32,5 +26,3 @@ public: virtual ::grpc::Status executePost(); virtual ::grpc::Status executePre(); }; - -#endif diff --git a/org.tizen.aurum-bootstrap/inc/Commands/Commands.h b/org.tizen.aurum-bootstrap/inc/Commands/Commands.h index 992295d..9ecdb4c 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/Commands.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/Commands.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,32 +18,25 @@ #include "Commands/KillServerCommand.h" #include "Commands/FindElementCommand.h" #include "Commands/FindElementsCommand.h" - #include "Commands/GetAttributeCommand.h" #include "Commands/GetValueCommand.h" #include "Commands/SetValueCommand.h" - #include "Commands/ClearCommand.h" #include "Commands/GetSizeCommand.h" - #include "Commands/ClickCommand.h" #include "Commands/FlickCommand.h" #include "Commands/LongClickCommand.h" - #include "Commands/TouchDownCommand.h" #include "Commands/TouchMoveCommand.h" #include "Commands/TouchUpCommand.h" - #include "Commands/CloseAppCommand.h" #include "Commands/GetAppInfoCommand.h" #include "Commands/InstallAppCommand.h" #include "Commands/LaunchAppCommand.h" #include "Commands/RemoveAppCommand.h" - #include "Commands/GetDeviceTimeCommand.h" #include "Commands/GetLocationCommand.h" #include "Commands/SendKeyCommand.h" - #include "Commands/TakeScreenshotCommand.h" #include "Commands/DumpObjectTreeCommand.h" #include "Commands/GetScreenSizeCommand.h" @@ -51,7 +44,6 @@ #include "Commands/SetFocusCommand.h" #include "Commands/GetActiveAppToolkitNameCommand.h" #include "Commands/EnableScreenAnalyzerCommand.h" - #include "Commands/GetTextMinBoundingRectCommand.h" #include "Commands/SetXMLSyncCommand.h" -#include "Commands/GetAngleCommand.h" \ No newline at end of file +#include "Commands/GetAngleCommand.h" diff --git a/org.tizen.aurum-bootstrap/inc/Commands/DumpObjectTreeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/DumpObjectTreeCommand.h index da5ec04..f248436 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/DumpObjectTreeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/DumpObjectTreeCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,14 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include "UiObject.h" - -#include -#include "config.h" +#include "bootstrap.h" class DumpObjectTreeCommand: public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/EnableScreenAnalyzerCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/EnableScreenAnalyzerCommand.h index 700611e..105d8b9 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/EnableScreenAnalyzerCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/EnableScreenAnalyzerCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class EnableScreenAnalyzerCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h index 4edc4e8..ceb94e8 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class FindElementCommand : public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/FindElementsCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/FindElementsCommand.h index 92d325b..02f0f99 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/FindElementsCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/FindElementsCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class FindElementsCommand : public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h index 3f5a188..fd032c8 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class FlickCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetActiveAppToolkitNameCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetActiveAppToolkitNameCommand.h index e85aba3..bc30d53 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetActiveAppToolkitNameCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetActiveAppToolkitNameCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetActiveAppToolkitNameCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetAngleCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetAngleCommand.h index d378b16..4d58776 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetAngleCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetAngleCommand.h @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetAngleCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h index 3c866c4..fb9c0f2 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetAppInfoCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h index 94ef0a9..b61ca52 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetAttributeCommand : public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h index 05ed05e..0727981 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetDeviceTimeCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h index fc4d4c6..5e504df 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetLocationCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetScreenSizeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetScreenSizeCommand.h index cbb37ff..4ab16d3 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetScreenSizeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetScreenSizeCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetScreenSizeCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h index 9fead13..3c3ecd4 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetSizeCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetTextMinBoundingRectCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetTextMinBoundingRectCommand.h index bc04262..b7c6583 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetTextMinBoundingRectCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetTextMinBoundingRectCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetTextMinBoundingRectCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h index daeae97..2d9e2a8 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class GetValueCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h index a241697..0e39716 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class InstallAppCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h index f1c6739..0a44c24 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class KillServerCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h index c8f62f8..ff67a7a 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class LaunchAppCommand : public Command { private: @@ -31,4 +26,4 @@ public: LaunchAppCommand(const ::aurum::ReqLaunchApp *request, ::aurum::RspLaunchApp *response); ::grpc::Status execute() override; -}; \ No newline at end of file +}; diff --git a/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h index 02ed889..2b39aaa 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class LongClickCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h index 2683a7b..e08bcd2 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include -#include "config.h" +#include "bootstrap.h" class PostCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h index 13eccee..2021caa 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include -#include "config.h" +#include "bootstrap.h" class PreCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h index 5f973e8..c317841 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class RemoveAppCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h index b7a9c86..860545f 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class SendKeyCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SetFocusCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SetFocusCommand.h index 6df2850..1565352 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SetFocusCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SetFocusCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class SetFocusCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h index 4ab2a2e..3ce13ac 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class SetValueCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SetXMLSyncCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SetXMLSyncCommand.h index b26310a..b54ae90 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SetXMLSyncCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SetXMLSyncCommand.h @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class SetXMLSyncCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TakeScreenshotCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TakeScreenshotCommand.h index 0355350..67ea668 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TakeScreenshotCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TakeScreenshotCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class TakeScreenshotCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h index 54bbebd..afb5950 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class TouchDownCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h index c319ecd..827fad9 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class TouchMoveCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h index 8d2bf08..4d338c8 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,7 @@ * */ -#include -#include -#include "Commands/Command.h" -#include "ObjectMapper.h" -#include -#include "config.h" +#include "bootstrap.h" class TouchUpCommand : public Command { private: diff --git a/org.tizen.aurum-bootstrap/inc/ObjectMapper.h b/org.tizen.aurum-bootstrap/inc/ObjectMapper.h index d71ce6d..4948d33 100644 --- a/org.tizen.aurum-bootstrap/inc/ObjectMapper.h +++ b/org.tizen.aurum-bootstrap/inc/ObjectMapper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ * */ -#ifndef _OBJECT_MAPPER_H_ -#define _OBJECT_MAPPER_H_ +#pragma once #include #include +#include "bootstrap.h" #include "UiObject.h" using namespace Aurum; @@ -28,7 +28,6 @@ using namespace Aurum; class ObjectMapper { private: std::map> mObjectMap; - unsigned long long mObjCounter; private: ObjectMapper(); @@ -43,5 +42,3 @@ public: bool removeElement(const std::string& elementId); void cleanUp(); }; - -#endif diff --git a/org.tizen.aurum-bootstrap/inc/Runnable/ActionAndWaitEventRunnable.h b/org.tizen.aurum-bootstrap/inc/Runnable/ActionAndWaitEventRunnable.h index eb31798..683af34 100644 --- a/org.tizen.aurum-bootstrap/inc/Runnable/ActionAndWaitEventRunnable.h +++ b/org.tizen.aurum-bootstrap/inc/Runnable/ActionAndWaitEventRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/org.tizen.aurum-bootstrap/inc/Runnable/LaunchAppRunnable.h b/org.tizen.aurum-bootstrap/inc/Runnable/LaunchAppRunnable.h index b951681..e8eb22d 100644 --- a/org.tizen.aurum-bootstrap/inc/Runnable/LaunchAppRunnable.h +++ b/org.tizen.aurum-bootstrap/inc/Runnable/LaunchAppRunnable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/org.tizen.aurum-bootstrap/inc/bootstrap.h b/org.tizen.aurum-bootstrap/inc/bootstrap.h index c5b9bc5..61ef117 100644 --- a/org.tizen.aurum-bootstrap/inc/bootstrap.h +++ b/org.tizen.aurum-bootstrap/inc/bootstrap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,15 @@ * */ -#ifndef _BOOT_STRAP_H_ -#define _BOOT_STRAP_H_ +#pragma once #include +#include +#include +#include + +#include "Commands/Command.h" +#include "ObjectMapper.h" #ifdef LOG_TAG #undef LOG_TAG @@ -43,5 +48,3 @@ __FILE__, __func__, __LINE__, ##arg); \ } while (0); }) #endif - -#endif diff --git a/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc b/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc index 16f8842..3c9978b 100644 --- a/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc +++ b/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,15 +16,11 @@ */ #include "AurumServiceImpl.h" - -#include +#include "AccessibleWatcher.h" #include "Commands/Commands.h" #include "Commands/PostCommand.h" #include "Commands/PreCommand.h" -#include "config.h" -#include "bootstrap.h" - using namespace grpc; using namespace aurum; @@ -39,9 +35,9 @@ aurumServiceImpl::aurumServiceImpl() { std::unique_ptr proxyPreCmd = std::make_unique(cmd); std::unique_ptr proxyPostCmd = std::make_unique(proxyPreCmd.get()); - ::grpc::Status rst = proxyPostCmd->execute(); + ::grpc::Status ret = proxyPostCmd->execute(); if (clean) ObjectMapper::getInstance()->cleanUp(); - return rst; + return ret; } aurumServiceImpl::~aurumServiceImpl() diff --git a/org.tizen.aurum-bootstrap/src/BootstrapServer.cc b/org.tizen.aurum-bootstrap/src/BootstrapServer.cc index 93902f5..7ae8188 100644 --- a/org.tizen.aurum-bootstrap/src/BootstrapServer.cc +++ b/org.tizen.aurum-bootstrap/src/BootstrapServer.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,14 +17,10 @@ #include #include -#include -#include -#include #include #include #include -#include "bootstrap.h" #include "AurumServiceImpl.h" #include "config.h" @@ -53,7 +49,7 @@ static void _vconf_force_enable_touch_set(void *data, bool enable) } static gpointer -_grpc_thread_func (gpointer data) +_grpc_thread_func(gpointer data) { ServiceContext *ctx = (ServiceContext *)data; std::string binding("0.0.0.0:50051"); @@ -72,7 +68,7 @@ _grpc_thread_func (gpointer data) free(value); } - LOGI("[T] Server Listening on %s", binding.c_str()); + LOGI("Server Listening on %s", binding.c_str()); builder.AddListeningPort(binding, grpc::InsecureServerCredentials()); builder.RegisterService(&service); ctx->server = std::move(builder.BuildAndStart()); diff --git a/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc index d31ed8e..0cfb1e8 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/ActionAndWaitEventCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ * */ -#include "bootstrap.h" +#include +#include + #include "ActionAndWaitEventCommand.h" #include "ActionAndWaitEventRunnable.h" #include "UiDevice.h" -#include -#include ActionAndWaitEventCommand::ActionAndWaitEventCommand(const ::aurum::ReqActionAndWaitEvent *request, ::aurum::RspActionAndWaitEvent *response) @@ -47,6 +47,7 @@ A11yEvent convertEventType(const ::aurum::ReqActionAndWaitEvent_EventType type) ::grpc::Status ActionAndWaitEventCommand::execute() { LOGI("ActionAndWaitEvent --------------- "); + std::unique_ptr cmd = std::make_unique( mRequest->type(), mRequest->elementid(), mRequest->xf86keycode()); std::shared_ptr obj = UiDevice::getInstance(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/ClearCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/ClearCommand.cc index afec1b6..bfcdd83 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/ClearCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/ClearCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ * */ -#include "bootstrap.h" -#include "ClearCommand.h" #include +#include "ClearCommand.h" + ClearCommand::ClearCommand(const ::aurum::ReqClear *request, ::aurum::RspClear *response) : mRequest{request}, mResponse{response} @@ -42,6 +42,7 @@ bool ClearCommand::hasHintText(std::shared_ptr obj) ::grpc::Status ClearCommand::execute() { LOGI("Clear --------------- "); + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); diff --git a/org.tizen.aurum-bootstrap/src/Commands/ClickCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/ClickCommand.cc index d5181f6..bb464d1 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/ClickCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/ClickCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "ClickCommand.h" #include "UiObject.h" #include "UiDevice.h" @@ -47,9 +46,10 @@ std::unique_ptr ClickCommand::createCommand(const ::aurum::ReqClic ::grpc::Status ClickElementCommand::execute() { + LOGI("ClickElement --------------- "); + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); - LOGI("ClickElementCommand execute %p", obj.get()); if (obj) { obj->click(); @@ -62,21 +62,24 @@ std::unique_ptr ClickCommand::createCommand(const ::aurum::ReqClic ::grpc::Status ClickCoordCommand::execute() { + LOGI("ClickCoord (%d, %d) --------------- ", point.x(), point.y()); + std::shared_ptr obj = UiDevice::getInstance(); const ::aurum::Point& point = mRequest->coordination(); - LOGI("ClickCoordCommand execute %p @ (%d, %d)", obj.get(), point.x(), point.y()); + obj->click(point.x(), point.y()); mResponse->set_status(::aurum::RspStatus::OK); + return grpc::Status::OK; } ::grpc::Status ClickAtspiCommand::execute() { + LOGI("ClickAtspi --------------- "); + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); - LOGI("ClickAtspiCommand execute %p", obj.get()); - if (obj) { if (obj->DoAtspiActivate()) mResponse->set_status(::aurum::RspStatus::OK); else mResponse->set_status(::aurum::RspStatus::ERROR); diff --git a/org.tizen.aurum-bootstrap/src/Commands/CloseAppCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/CloseAppCommand.cc index 7ac889a..1ea5a42 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/CloseAppCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/CloseAppCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,10 +15,10 @@ * */ -#include "bootstrap.h" -#include "CloseAppCommand.h" #include #include + +#include "CloseAppCommand.h" #include CloseAppCommand::CloseAppCommand(const ::aurum::ReqCloseApp *request, @@ -51,6 +51,7 @@ CloseAppCommand::CloseAppCommand(const ::aurum::ReqCloseApp *request, } app_context_destroy(app_context); + return grpc::Status::OK; } @@ -58,5 +59,6 @@ CloseAppCommand::CloseAppCommand(const ::aurum::ReqCloseApp *request, { LOGI("Wait for 1500ms"); std::this_thread::sleep_for(std::chrono::milliseconds{1500}); + return grpc::Status::OK; } diff --git a/org.tizen.aurum-bootstrap/src/Commands/Command.cc b/org.tizen.aurum-bootstrap/src/Commands/Command.cc index efcc880..32fc2ff 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/Command.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/Command.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/org.tizen.aurum-bootstrap/src/Commands/DumpObjectTreeCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/DumpObjectTreeCommand.cc index 80fbca3..4ed405d 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/DumpObjectTreeCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/DumpObjectTreeCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "bootstrap.h" #include "DumpObjectTreeCommand.h" #include "UiObject.h" #include "UiDevice.h" #include "UiSelector.h" #include "Sel.h" #include "ISearchable.h" +#include "config.h" DumpObjectTreeCommand::DumpObjectTreeCommand(const ::aurum::ReqDumpObjectTree *request, ::aurum::RspDumpObjectTree *response) @@ -160,5 +160,6 @@ void DumpObjectTreeCommand::traverse(::aurum::Element *root, std::shared_ptrenable(), mRequest->serverip().c_str()); std::shared_ptr mDevice = UiDevice::getInstance(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/FindElementCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/FindElementCommand.cc index b894822..9567d93 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/FindElementCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/FindElementCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "bootstrap.h" #include "FindElementCommand.h" #include "UiObject.h" #include "UiDevice.h" #include "UiSelector.h" #include "Sel.h" #include "ISearchable.h" +#include "config.h" #ifdef MQTT_ENABLED #include "SaObject.h" #endif @@ -82,6 +82,7 @@ std::shared_ptr FindElementCommand::getSelector(void) ::grpc::Status FindElementCommand::execute() { LOGI("findElement --------------- "); + auto searchableObj = getSearchableTop(); auto selector = getSelector(); std::shared_ptr mDevice = UiDevice::getInstance(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/FindElementsCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/FindElementsCommand.cc index 796839d..711be13 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/FindElementsCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/FindElementsCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "bootstrap.h" #include "FindElementsCommand.h" #include "UiObject.h" #include "UiDevice.h" #include "UiSelector.h" #include "Sel.h" #include "ISearchable.h" +#include "config.h" #ifdef MQTT_ENABLED #include "SaObject.h" #endif @@ -81,6 +81,8 @@ std::vector> FindElementsCommand::getSelectors(void) ::grpc::Status FindElementsCommand::execute() { + LOGI("findElements --------------- "); + auto searchableObj = getSearchableTop(); auto selectors = getSelectors(); std::shared_ptr mDevice = UiDevice::getInstance(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/FlickCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/FlickCommand.cc index 1d2c0d8..365a540 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/FlickCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/FlickCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "FlickCommand.h" #include "UiDevice.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetActiveAppToolkitNameCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetActiveAppToolkitNameCommand.cc index cb9d869..fa5935e 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetActiveAppToolkitNameCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetActiveAppToolkitNameCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetActiveAppToolkitNameCommand.h" #include "UiDevice.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetAngleCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetAngleCommand.cc index 01a9420..feac108 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetAngleCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetAngleCommand.cc @@ -15,9 +15,7 @@ * */ -#include "bootstrap.h" #include "GetAngleCommand.h" - #include "UiDevice.h" GetAngleCommand::GetAngleCommand(const ::aurum::ReqGetAngle* request, @@ -34,7 +32,7 @@ GetAngleCommand::GetAngleCommand(const ::aurum::ReqGetAngle* request, mResponse->set_windowangle(mDevice->getWindowAngle()); mResponse->set_targetangle(mDevice->getTargetAngle()); - mResponse->set_status(::aurum::RspStatus::OK); + return grpc::Status::OK; } diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetAppInfoCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetAppInfoCommand.cc index 76d9b7c..2389050 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetAppInfoCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetAppInfoCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,11 @@ * */ -#include "bootstrap.h" -#include "GetAppInfoCommand.h" #include #include +#include "GetAppInfoCommand.h" + GetAppInfoCommand::GetAppInfoCommand(const ::aurum::ReqGetAppInfo *request, ::aurum::RspGetAppInfo *response) : mRequest{request}, mResponse{response} @@ -28,7 +28,7 @@ GetAppInfoCommand::GetAppInfoCommand(const ::aurum::ReqGetAppInfo *request, ::grpc::Status GetAppInfoCommand::execute() { - LOGI("GetAppInfo --------------- "); + LOGI("GetAppInfo (%s) --------------- ", mRequest->packagename().c_str()); std::string packageName = mRequest->packagename(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetAttributeCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetAttributeCommand.cc index 1afc58e..cea8ac5 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetAttributeCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetAttributeCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetAttributeCommand.h" #include "UiObject.h" #include "UiDevice.h" @@ -35,6 +34,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: ::aurum::RspGetAttribute*response) { LOGI("GetAttribute --------------- "); + ::aurum::ReqGetAttribute_RequestType type = request->attribute(); LOGI("type : %d", type); @@ -77,6 +77,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isVisible()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -91,6 +92,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isFocused()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -105,6 +107,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isFocusable()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -119,6 +122,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isCheckable()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -133,6 +137,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isChecked()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -147,6 +152,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isEnabled()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -161,6 +167,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isClickable()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -175,6 +182,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isScrollable()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -189,6 +197,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isSelectable()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -203,6 +212,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isSelected()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -217,6 +227,7 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isShowing()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } @@ -231,5 +242,6 @@ std::unique_ptr GetAttributeCommand::createCommand(const :: obj->updateStates(); mResponse->set_boolvalue(obj->isActive()); mResponse->set_status(aurum::RspStatus::OK); + return grpc::Status::OK; } diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetDeviceTimeCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetDeviceTimeCommand.cc index bf8e735..099947b 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetDeviceTimeCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetDeviceTimeCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,11 @@ * */ -#include "bootstrap.h" -#include "GetDeviceTimeCommand.h" - #include #include #include + +#include "GetDeviceTimeCommand.h" #include "UiDevice.h" #define BUFSIZE 64 diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetLocationCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetLocationCommand.cc index bd38555..f7c0228 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetLocationCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetLocationCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetLocationCommand.h" GetLocationCommand::GetLocationCommand(const ::aurum::ReqGetLocation *request, diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetScreenSizeCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetScreenSizeCommand.cc index 29f4cfb..640cb27 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetScreenSizeCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetScreenSizeCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetScreenSizeCommand.h" #include "UiDevice.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetSizeCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetSizeCommand.cc index 534e5a1..19033f1 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetSizeCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetSizeCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "bootstrap.h" #include "GetSizeCommand.h" #include "UiObject.h" #include "UiDevice.h" #include "UiSelector.h" #include "Sel.h" #include "ISearchable.h" +#include "config.h" #ifdef MQTT_ENABLED #include "SaObject.h" #endif diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetTextMinBoundingRectCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetTextMinBoundingRectCommand.cc index c512ae5..5cdec49 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetTextMinBoundingRectCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetTextMinBoundingRectCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetTextMinBoundingRectCommand.h" #include "UiObject.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/GetValueCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/GetValueCommand.cc index e5eaaba..72c6c5e 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/GetValueCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/GetValueCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "GetValueCommand.h" #include "UiObject.h" @@ -28,9 +27,10 @@ GetValueCommand::GetValueCommand(const ::aurum::ReqGetValue *request, ::grpc::Status GetValueCommand::execute() { LOGI("GetValue --------------- "); + ::aurum::ParamType param_type = mRequest->type(); if (param_type == ::aurum::STRING) { - ObjectMapper *mObjMap = ObjectMapper::getInstance(); + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); @@ -47,7 +47,7 @@ GetValueCommand::GetValueCommand(const ::aurum::ReqGetValue *request, LOGI("Integer is not supported."); mResponse->set_status(::aurum::RspStatus::ERROR); } else if (param_type == ::aurum::DOUBLE) { - ObjectMapper *mObjMap = ObjectMapper::getInstance(); + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); diff --git a/org.tizen.aurum-bootstrap/src/Commands/InstallAppCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/InstallAppCommand.cc index 10747f3..069c226 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/InstallAppCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/InstallAppCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "bootstrap.h" -#include "InstallAppCommand.h" #include #include #include #include +#include "InstallAppCommand.h" + InstallAppCommand::InstallAppCommand( ::grpc::ServerReader<::aurum::ReqInstallApp> *request, ::aurum::RspInstallApp * response) diff --git a/org.tizen.aurum-bootstrap/src/Commands/KillServerCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/KillServerCommand.cc index 11aca7c..548744f 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/KillServerCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/KillServerCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "KillServerCommand.h" KillServerCommand::KillServerCommand(const ::aurum::ReqEmpty *request, diff --git a/org.tizen.aurum-bootstrap/src/Commands/LaunchAppCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/LaunchAppCommand.cc index 20375a5..d1fc6ea 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/LaunchAppCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/LaunchAppCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ * */ -#include "bootstrap.h" +#include +#include + #include "LaunchAppCommand.h" #include "LaunchAppRunnable.h" #include "UiDevice.h" -#include -#include #define WAIT_APP_LAUNCH 10000 @@ -32,8 +32,10 @@ LaunchAppCommand::LaunchAppCommand(const ::aurum::ReqLaunchApp *request, ::grpc::Status LaunchAppCommand::execute() { + LOGI("LaunchApp (%s) --------------- ", mRequest->packagename().c_str()); + bool ret = false; - LOGI("LaunchApp --------------- "); + std::unique_ptr cmd = std::make_unique(mRequest->packagename(), mRequest->data()); std::shared_ptr obj = UiDevice::getInstance(); ret = obj->executeAndWaitForEvents(cmd.get(), A11yEvent::EVENT_WINDOW_ACTIVATE, WAIT_APP_LAUNCH, mRequest->packagename(), 0); diff --git a/org.tizen.aurum-bootstrap/src/Commands/LongClickCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/LongClickCommand.cc index 645d860..6856f86 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/LongClickCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/LongClickCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "LongClickCommand.h" #include "UiObject.h" #include "UiDevice.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc index 302d360..fe0c9a4 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,20 +15,18 @@ * */ -#include "bootstrap.h" #include "PostCommand.h" -#include PostCommand::PostCommand() : PostCommand(nullptr) {} PostCommand::PostCommand(Command *cmd) : mCommand{cmd} {} ::grpc::Status PostCommand::execute() { - ::grpc::Status rst = mCommand->execute(); + ::grpc::Status ret = mCommand->execute(); mCommand->executePost(); - return rst; + return ret; } ::grpc::Status PostCommand::executePre() diff --git a/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc index e699b46..0e62883 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/PreCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,17 +15,7 @@ * */ -#include "bootstrap.h" #include "PreCommand.h" -#include - -#include -#include - -#include -#include -#include -#include PreCommand::PreCommand() : PreCommand(nullptr) {} PreCommand::PreCommand(Command *cmd) : mCommand{cmd} {} diff --git a/org.tizen.aurum-bootstrap/src/Commands/RemoveAppCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/RemoveAppCommand.cc index bc634dc..c6a3ce4 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/RemoveAppCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/RemoveAppCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,12 +15,12 @@ * */ -#include "bootstrap.h" -#include "RemoveAppCommand.h" #include #include #include +#include "RemoveAppCommand.h" + RemoveAppCommand::RemoveAppCommand(const ::aurum::ReqRemoveApp* request, ::aurum::RspRemoveApp* response) : mRequest{request}, mResponse{response} diff --git a/org.tizen.aurum-bootstrap/src/Commands/SendKeyCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/SendKeyCommand.cc index 150c072..263d1a6 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/SendKeyCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/SendKeyCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "SendKeyCommand.h" #include "UiDevice.h" @@ -28,6 +27,7 @@ SendKeyCommand::SendKeyCommand(const ::aurum::ReqKey *request, ::grpc::Status SendKeyCommand::execute() { LOGI("SendKey --------------- "); + std::shared_ptr mDevice = UiDevice::getInstance(); ::aurum::ReqKey_KeyType type = mRequest->type(); ::aurum::ReqKey_KeyActionType action_type = mRequest->actiontype(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/SetFocusCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/SetFocusCommand.cc index d162101..a42c68a 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/SetFocusCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/SetFocusCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "SetFocusCommand.h" #include "UiObject.h" @@ -27,9 +26,10 @@ SetFocusCommand::SetFocusCommand(const ::aurum::ReqSetFocus *request, ::grpc::Status SetFocusCommand::execute() { - bool ret = false; LOGI("SetFocus --------------- "); + bool ret = false; + ObjectMapper *mObjMap = ObjectMapper::getInstance(); std::shared_ptr obj = mObjMap->getElement(mRequest->elementid()); if (obj) ret = obj->setFocus(); diff --git a/org.tizen.aurum-bootstrap/src/Commands/SetValueCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/SetValueCommand.cc index 6f7f1ee..31d892f 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/SetValueCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/SetValueCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "SetValueCommand.h" SetValueCommand::SetValueCommand(const ::aurum::ReqSetValue* request, @@ -26,8 +25,10 @@ SetValueCommand::SetValueCommand(const ::aurum::ReqSetValue* request, ::grpc::Status SetValueCommand::execute() { - bool ret = false; LOGI("SetValue --------------- "); + + bool ret = false; + ::aurum::ParamType param_type = mRequest->type(); if (param_type == ::aurum::STRING) { LOGI("text:%s", mRequest->stringvalue().c_str()); diff --git a/org.tizen.aurum-bootstrap/src/Commands/SetXMLSyncCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/SetXMLSyncCommand.cc index 5b09d66..c84175f 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/SetXMLSyncCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/SetXMLSyncCommand.cc @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "SetXMLSyncCommand.h" SetXMLSyncCommand::SetXMLSyncCommand(const ::aurum::ReqSetXMLSync* request, @@ -26,8 +25,9 @@ SetXMLSyncCommand::SetXMLSyncCommand(const ::aurum::ReqSetXMLSync* request, ::grpc::Status SetXMLSyncCommand::execute() { - bool sync = mRequest->enable(); - AccessibleWatcher::getInstance()->setXMLsync(sync); + LOGI("SetXMLSync (%d) --------------- ", mRequest->enable()); + + AccessibleWatcher::getInstance()->setXMLsync(mRequest->enable()); mResponse->set_status(::aurum::RspStatus::OK); return grpc::Status::OK; diff --git a/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc index a536684..73f84e5 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/TakeScreenshotCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,9 +15,9 @@ * */ -#include "bootstrap.h" -#include "TakeScreenshotCommand.h" #include + +#include "TakeScreenshotCommand.h" #include "UiObject.h" #include "UiDevice.h" diff --git a/org.tizen.aurum-bootstrap/src/Commands/TouchDownCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/TouchDownCommand.cc index 02e4fe6..040e7f4 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/TouchDownCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/TouchDownCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "TouchDownCommand.h" #include "UiDevice.h" @@ -28,6 +27,7 @@ TouchDownCommand::TouchDownCommand(const ::aurum::ReqTouchDown *request, ::grpc::Status TouchDownCommand::execute() { LOGI("TouchDown --------------- "); + const aurum::Point& point_ = mRequest->coordination(); int seq = UiDevice::getInstance() ->touchDown(point_.x(), point_.y()); diff --git a/org.tizen.aurum-bootstrap/src/Commands/TouchMoveCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/TouchMoveCommand.cc index a7389b0..5a5e332 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/TouchMoveCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/TouchMoveCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "TouchMoveCommand.h" #include "UiDevice.h" @@ -28,6 +27,7 @@ TouchMoveCommand::TouchMoveCommand(const ::aurum::ReqTouchMove *request, ::grpc::Status TouchMoveCommand::execute() { LOGI("TouchMove --------------- "); + const aurum::Point& point = mRequest->coordination(); int seq = mRequest->seqid(); UiDevice::getInstance()->touchMove(point.x(), point.y(), seq); diff --git a/org.tizen.aurum-bootstrap/src/Commands/TouchUpCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/TouchUpCommand.cc index a87c6c3..894a375 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/TouchUpCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/TouchUpCommand.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ * */ -#include "bootstrap.h" #include "TouchUpCommand.h" #include "UiDevice.h" @@ -28,6 +27,7 @@ TouchUpCommand::TouchUpCommand(const ::aurum::ReqTouchUp *request, ::grpc::Status TouchUpCommand::execute() { LOGI("TouchUp --------------- "); + const aurum::Point& point = mRequest->coordination(); int seq = mRequest->seqid(); UiDevice::getInstance()->touchUp(point.x(), point.y(), seq); diff --git a/org.tizen.aurum-bootstrap/src/ObjectMapper.cc b/org.tizen.aurum-bootstrap/src/ObjectMapper.cc index 87e1f01..269b3bb 100644 --- a/org.tizen.aurum-bootstrap/src/ObjectMapper.cc +++ b/org.tizen.aurum-bootstrap/src/ObjectMapper.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,13 +15,13 @@ * */ -#include "ObjectMapper.h" -#include -#include "bootstrap.h" #include #include +#include + +#include "ObjectMapper.h" -ObjectMapper::ObjectMapper() : mObjectMap{}, mObjCounter{0} {} +ObjectMapper::ObjectMapper() : mObjectMap{} {} ObjectMapper::~ObjectMapper() {} diff --git a/org.tizen.aurum-bootstrap/src/Runnable/ActionAndWaitEventRunnable.cc b/org.tizen.aurum-bootstrap/src/Runnable/ActionAndWaitEventRunnable.cc index 75c4637..a9a755b 100644 --- a/org.tizen.aurum-bootstrap/src/Runnable/ActionAndWaitEventRunnable.cc +++ b/org.tizen.aurum-bootstrap/src/Runnable/ActionAndWaitEventRunnable.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/org.tizen.aurum-bootstrap/src/Runnable/LaunchAppRunnable.cc b/org.tizen.aurum-bootstrap/src/Runnable/LaunchAppRunnable.cc index 1fc173d..a59109c 100644 --- a/org.tizen.aurum-bootstrap/src/Runnable/LaunchAppRunnable.cc +++ b/org.tizen.aurum-bootstrap/src/Runnable/LaunchAppRunnable.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2023 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. -- 2.7.4