(Network) Add a custom_command option
[platform/core/uifw/dali-adaptor.git] / dali / internal / network / common / automation.h
1 #ifndef DALI_INTERNAL_ADAPTOR_AUTOMATION_H
2 #define DALI_INTERNAL_ADAPTOR_AUTOMATION_H
3
4 /*
5  * Copyright (c) 2022 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23
24 // INTERNAL INCLUDES
25 #include <dali/internal/network/common/client-send-data-interface.h>
26
27 namespace Dali
28 {
29 namespace Internal
30 {
31 namespace Adaptor
32 {
33 /**
34  * @brief The automation functions allow a way to control Dali via a network socket.
35  *
36  * The functions must be called from the event thread only.
37  *
38  * Any functions which require a response to be sent back to the network client
39  * use the ClientSendDataInterface interface.
40
41  * E.g.
42  * Dali network client thread            <---- "dump_scene" from network
43  * Dali main thread       "json data"    ----->   network
44  *
45  */
46 namespace Automation
47 {
48 /**
49  * @brief Sets properties on an Actor.
50  * No ClientSendDataInterface required, as no response is sent back
51  * @param[in] message set property message
52  */
53 void SetProperty(const std::string& message);
54
55 /**
56  * @brief Dumps the actor tree to the client
57  * @param[in] clientId unique network client id
58  * @param[in] sendData interface to transmit data to the client
59  */
60 void DumpScene(unsigned int clientId, ClientSendDataInterface* sendData);
61
62
63 /**
64  * @brief Sets a custom command.
65  * No ClientSendDataInterface required, as no response is sent back
66  * @param[in] message custom message
67  */
68 void SetCustomCommand(const std::string& message);
69
70
71 } // namespace Automation
72
73 } // namespace Adaptor
74
75 } // namespace Internal
76
77 } // namespace Dali
78
79 #endif