/*
- * 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.
*
*/
-#ifndef _AURUM_SERVICE_IMPL_H_
-#define _AURUM_SERVICE_IMPL_H_
+#pragma once
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include <aurum.grpc.pb.h>
+#include "bootstrap.h"
class aurumServiceImpl final : public aurum::Bootstrap::Service {
public:
public:
int WAIT_TIMEOUT_MS;
};
-
-#endif
-
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class ActionAndWaitEventCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class ClearCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class ClickCommand : public Command {
protected:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class CloseAppCommand : public Command {
private:
/*
- * 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.
*
*/
-#ifndef _COMMAND_H_
-#define _COMMAND_H_
+#pragma once
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-
-#include "config.h"
+#include "bootstrap.h"
class Command {
public:
virtual ::grpc::Status executePost();
virtual ::grpc::Status executePre();
};
-
-#endif
/*
- * 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.
#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"
#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"
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include "UiObject.h"
-
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class DumpObjectTreeCommand: public Command {
protected:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class EnableScreenAnalyzerCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class FindElementCommand : public Command {
protected:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class FindElementsCommand : public Command {
protected:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class FlickCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetActiveAppToolkitNameCommand : public Command {
private:
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetAngleCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetAppInfoCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetAttributeCommand : public Command {
protected:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetDeviceTimeCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetLocationCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetScreenSizeCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetSizeCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetTextMinBoundingRectCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class GetValueCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class InstallAppCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class KillServerCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class LaunchAppCommand : public Command {
private:
LaunchAppCommand(const ::aurum::ReqLaunchApp *request,
::aurum::RspLaunchApp *response);
::grpc::Status execute() override;
-};
\ No newline at end of file
+};
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class LongClickCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class PostCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class PreCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class RemoveAppCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class SendKeyCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class SetFocusCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class SetValueCommand : public Command {
private:
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class SetXMLSyncCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class TakeScreenshotCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class TouchDownCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class TouchMoveCommand : public Command {
private:
/*
- * 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.
*
*/
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
+#include "bootstrap.h"
class TouchUpCommand : public Command {
private:
/*
- * 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.
*
*/
-#ifndef _OBJECT_MAPPER_H_
-#define _OBJECT_MAPPER_H_
+#pragma once
#include <map>
#include <string>
+#include "bootstrap.h"
#include "UiObject.h"
using namespace Aurum;
class ObjectMapper {
private:
std::map<std::string, std::shared_ptr<UiObject>> mObjectMap;
- unsigned long long mObjCounter;
private:
ObjectMapper();
bool removeElement(const std::string& elementId);
void cleanUp();
};
-
-#endif
/*
- * 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.
/*
- * 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.
/*
- * 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.
*
*/
-#ifndef _BOOT_STRAP_H_
-#define _BOOT_STRAP_H_
+#pragma once
#include <dlog.h>
+#include <gio/gio.h>
+#include <grpcpp/grpcpp.h>
+#include <aurum.grpc.pb.h>
+
+#include "Commands/Command.h"
+#include "ObjectMapper.h"
#ifdef LOG_TAG
#undef LOG_TAG
__FILE__, __func__, __LINE__, ##arg); \
} while (0); })
#endif
-
-#endif
/*
- * 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.
*/
#include "AurumServiceImpl.h"
-
-#include <AccessibleWatcher.h>
+#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;
{
std::unique_ptr<PreCommand> proxyPreCmd = std::make_unique<PreCommand>(cmd);
std::unique_ptr<PostCommand> proxyPostCmd = std::make_unique<PostCommand>(proxyPreCmd.get());
- ::grpc::Status rst = proxyPostCmd->execute();
+ ::grpc::Status ret = proxyPostCmd->execute();
if (clean) ObjectMapper::getInstance()->cleanUp();
- return rst;
+ return ret;
}
aurumServiceImpl::~aurumServiceImpl()
/*
- * 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.
#include <iostream>
#include <service_app.h>
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include <aurum.grpc.pb.h>
#include <glib.h>
#include <vconf.h>
#include <system_info.h>
-#include "bootstrap.h"
#include "AurumServiceImpl.h"
#include "config.h"
}
static gpointer
-_grpc_thread_func (gpointer data)
+_grpc_thread_func(gpointer data)
{
ServiceContext *ctx = (ServiceContext *)data;
std::string binding("0.0.0.0:50051");
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());
/*
- * 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.
*
*/
-#include "bootstrap.h"
+#include <chrono>
+#include <thread>
+
#include "ActionAndWaitEventCommand.h"
#include "ActionAndWaitEventRunnable.h"
#include "UiDevice.h"
-#include <chrono>
-#include <thread>
ActionAndWaitEventCommand::ActionAndWaitEventCommand(const ::aurum::ReqActionAndWaitEvent *request,
::aurum::RspActionAndWaitEvent *response)
::grpc::Status ActionAndWaitEventCommand::execute()
{
LOGI("ActionAndWaitEvent --------------- ");
+
std::unique_ptr<ActionAndWaitEventRunnable> cmd = std::make_unique<ActionAndWaitEventRunnable>(
mRequest->type(), mRequest->elementid(), mRequest->xf86keycode());
std::shared_ptr<UiDevice> obj = UiDevice::getInstance();
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "ClearCommand.h"
#include <string>
+#include "ClearCommand.h"
+
ClearCommand::ClearCommand(const ::aurum::ReqClear *request,
::aurum::RspClear *response)
: mRequest{request}, mResponse{response}
::grpc::Status ClearCommand::execute()
{
LOGI("Clear --------------- ");
+
ObjectMapper *mObjMap = ObjectMapper::getInstance();
std::shared_ptr<UiObject> obj = mObjMap->getElement(mRequest->elementid());
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "ClickCommand.h"
#include "UiObject.h"
#include "UiDevice.h"
::grpc::Status ClickElementCommand::execute()
{
+ LOGI("ClickElement --------------- ");
+
ObjectMapper *mObjMap = ObjectMapper::getInstance();
std::shared_ptr<UiObject> obj = mObjMap->getElement(mRequest->elementid());
- LOGI("ClickElementCommand execute %p", obj.get());
if (obj) {
obj->click();
::grpc::Status ClickCoordCommand::execute()
{
+ LOGI("ClickCoord (%d, %d) --------------- ", point.x(), point.y());
+
std::shared_ptr<UiDevice> 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<UiObject> 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);
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "CloseAppCommand.h"
#include <chrono>
#include <thread>
+
+#include "CloseAppCommand.h"
#include <app_manager_extension.h>
CloseAppCommand::CloseAppCommand(const ::aurum::ReqCloseApp *request,
}
app_context_destroy(app_context);
+
return grpc::Status::OK;
}
{
LOGI("Wait for 1500ms");
std::this_thread::sleep_for(std::chrono::milliseconds{1500});
+
return grpc::Status::OK;
}
/*
- * 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.
/*
- * 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.
*
*/
-#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)
traverse(root, node, 0);
}
}
+
return grpc::Status::OK;
}
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "EnableScreenAnalyzerCommand.h"
#include "UiDevice.h"
+#include "config.h"
EnableScreenAnalyzerCommand::EnableScreenAnalyzerCommand(const ::aurum::ReqEnableScreenAnalyzer *request,
::aurum::RspEnableScreenAnalyzer *response)
::grpc::Status EnableScreenAnalyzerCommand::execute()
{
- LOGI("EnableScreenAnalyzer test --------------- ");
+ LOGI("EnableScreenAnalyzer --------------- ");
LOGI("Screen Analyzer enabled (%d) Server IP : (%s)", mRequest->enable(), mRequest->serverip().c_str());
std::shared_ptr<UiDevice> mDevice = UiDevice::getInstance();
/*
- * 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.
*
*/
-#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
::grpc::Status FindElementCommand::execute()
{
LOGI("findElement --------------- ");
+
auto searchableObj = getSearchableTop();
auto selector = getSelector();
std::shared_ptr<UiDevice> mDevice = UiDevice::getInstance();
/*
- * 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.
*
*/
-#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
::grpc::Status FindElementsCommand::execute()
{
+ LOGI("findElements --------------- ");
+
auto searchableObj = getSearchableTop();
auto selectors = getSelectors();
std::shared_ptr<UiDevice> mDevice = UiDevice::getInstance();
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "FlickCommand.h"
#include "UiDevice.h"
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetActiveAppToolkitNameCommand.h"
#include "UiDevice.h"
*
*/
-#include "bootstrap.h"
#include "GetAngleCommand.h"
-
#include "UiDevice.h"
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;
}
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "GetAppInfoCommand.h"
#include <app_manager_extension.h>
#include <package_manager.h>
+#include "GetAppInfoCommand.h"
+
GetAppInfoCommand::GetAppInfoCommand(const ::aurum::ReqGetAppInfo *request,
::aurum::RspGetAppInfo *response)
: mRequest{request}, mResponse{response}
::grpc::Status GetAppInfoCommand::execute()
{
- LOGI("GetAppInfo --------------- ");
+ LOGI("GetAppInfo (%s) --------------- ", mRequest->packagename().c_str());
std::string packageName = mRequest->packagename();
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetAttributeCommand.h"
#include "UiObject.h"
#include "UiDevice.h"
::aurum::RspGetAttribute*response)
{
LOGI("GetAttribute --------------- ");
+
::aurum::ReqGetAttribute_RequestType type = request->attribute();
LOGI("type : %d", type);
obj->updateStates();
mResponse->set_boolvalue(obj->isVisible());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isFocused());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isFocusable());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isCheckable());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isChecked());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isEnabled());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isClickable());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isScrollable());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isSelectable());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isSelected());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isShowing());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
obj->updateStates();
mResponse->set_boolvalue(obj->isActive());
mResponse->set_status(aurum::RspStatus::OK);
+
return grpc::Status::OK;
}
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "GetDeviceTimeCommand.h"
-
#include <system_settings.h>
#include <utils_i18n.h>
#include <string>
+
+#include "GetDeviceTimeCommand.h"
#include "UiDevice.h"
#define BUFSIZE 64
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetLocationCommand.h"
GetLocationCommand::GetLocationCommand(const ::aurum::ReqGetLocation *request,
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetScreenSizeCommand.h"
#include "UiDevice.h"
/*
- * 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.
*
*/
-#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
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetTextMinBoundingRectCommand.h"
#include "UiObject.h"
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "GetValueCommand.h"
#include "UiObject.h"
::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<UiObject> obj =
mObjMap->getElement(mRequest->elementid());
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<UiObject> obj =
mObjMap->getElement(mRequest->elementid());
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "InstallAppCommand.h"
#include <fstream>
#include <chrono>
#include <thread>
#include <package_manager.h>
+#include "InstallAppCommand.h"
+
InstallAppCommand::InstallAppCommand(
::grpc::ServerReader<::aurum::ReqInstallApp> *request,
::aurum::RspInstallApp * response)
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "KillServerCommand.h"
KillServerCommand::KillServerCommand(const ::aurum::ReqEmpty *request,
/*
- * 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.
*
*/
-#include "bootstrap.h"
+#include <chrono>
+#include <thread>
+
#include "LaunchAppCommand.h"
#include "LaunchAppRunnable.h"
#include "UiDevice.h"
-#include <chrono>
-#include <thread>
#define WAIT_APP_LAUNCH 10000
::grpc::Status LaunchAppCommand::execute()
{
+ LOGI("LaunchApp (%s) --------------- ", mRequest->packagename().c_str());
+
bool ret = false;
- LOGI("LaunchApp --------------- ");
+
std::unique_ptr<LaunchAppRunnable> cmd = std::make_unique<LaunchAppRunnable>(mRequest->packagename(), mRequest->data());
std::shared_ptr<UiDevice> obj = UiDevice::getInstance();
ret = obj->executeAndWaitForEvents(cmd.get(), A11yEvent::EVENT_WINDOW_ACTIVATE, WAIT_APP_LAUNCH, mRequest->packagename(), 0);
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "LongClickCommand.h"
#include "UiObject.h"
#include "UiDevice.h"
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "PostCommand.h"
-#include <atspi/atspi.h>
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()
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "PreCommand.h"
-#include <atspi/atspi.h>
-
-#include <thread>
-#include <chrono>
-
-#include <Ecore.h>
-#include <device/power.h>
-#include <device/display.h>
-#include <device/callback.h>
PreCommand::PreCommand() : PreCommand(nullptr) {}
PreCommand::PreCommand(Command *cmd) : mCommand{cmd} {}
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "RemoveAppCommand.h"
#include <chrono>
#include <thread>
#include <package_manager.h>
+#include "RemoveAppCommand.h"
+
RemoveAppCommand::RemoveAppCommand(const ::aurum::ReqRemoveApp* request,
::aurum::RspRemoveApp* response)
: mRequest{request}, mResponse{response}
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "SendKeyCommand.h"
#include "UiDevice.h"
::grpc::Status SendKeyCommand::execute()
{
LOGI("SendKey --------------- ");
+
std::shared_ptr<UiDevice> mDevice = UiDevice::getInstance();
::aurum::ReqKey_KeyType type = mRequest->type();
::aurum::ReqKey_KeyActionType action_type = mRequest->actiontype();
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "SetFocusCommand.h"
#include "UiObject.h"
::grpc::Status SetFocusCommand::execute()
{
- bool ret = false;
LOGI("SetFocus --------------- ");
+ bool ret = false;
+
ObjectMapper *mObjMap = ObjectMapper::getInstance();
std::shared_ptr<UiObject> obj = mObjMap->getElement(mRequest->elementid());
if (obj) ret = obj->setFocus();
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "SetValueCommand.h"
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());
*
*/
-#include "bootstrap.h"
#include "SetXMLSyncCommand.h"
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;
/*
- * 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.
*
*/
-#include "bootstrap.h"
-#include "TakeScreenshotCommand.h"
#include <fstream>
+
+#include "TakeScreenshotCommand.h"
#include "UiObject.h"
#include "UiDevice.h"
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "TouchDownCommand.h"
#include "UiDevice.h"
::grpc::Status TouchDownCommand::execute()
{
LOGI("TouchDown --------------- ");
+
const aurum::Point& point_ = mRequest->coordination();
int seq = UiDevice::getInstance()
->touchDown(point_.x(), point_.y());
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "TouchMoveCommand.h"
#include "UiDevice.h"
::grpc::Status TouchMoveCommand::execute()
{
LOGI("TouchMove --------------- ");
+
const aurum::Point& point = mRequest->coordination();
int seq = mRequest->seqid();
UiDevice::getInstance()->touchMove(point.x(), point.y(), seq);
/*
- * 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.
*
*/
-#include "bootstrap.h"
#include "TouchUpCommand.h"
#include "UiDevice.h"
::grpc::Status TouchUpCommand::execute()
{
LOGI("TouchUp --------------- ");
+
const aurum::Point& point = mRequest->coordination();
int seq = mRequest->seqid();
UiDevice::getInstance()->touchUp(point.x(), point.y(), seq);
/*
- * 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.
*
*/
-#include "ObjectMapper.h"
-#include <memory>
-#include "bootstrap.h"
#include <algorithm>
#include <sstream>
+#include <memory>
+
+#include "ObjectMapper.h"
-ObjectMapper::ObjectMapper() : mObjectMap{}, mObjCounter{0} {}
+ObjectMapper::ObjectMapper() : mObjectMap{} {}
ObjectMapper::~ObjectMapper() {}
/*
- * 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.
/*
- * 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.