22e19fe2d72c332dd3bb70a2266284c0baa03f12
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-console-message.h
1 #ifndef DALI_WEB_ENGINE_CONSOLE_MESSAGE_H
2 #define DALI_WEB_ENGINE_CONSOLE_MESSAGE_H
3
4 /*
5  * Copyright (c) 2021 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 namespace Dali
25 {
26 /**
27  * @brief A class WebEngineConsoleMessage for console message of web engine.
28  */
29 class WebEngineConsoleMessage
30 {
31 public:
32   /**
33    * @brief Enumeration that provides level of log severity.
34    */
35   enum class SeverityLevel
36   {
37     EMPTY,
38     LOG,
39     WARNING,
40     ERROR,
41     DEBUG,
42     INFO,
43   };
44
45   /**
46    * @brief Constructor.
47    */
48   WebEngineConsoleMessage() = default;
49
50   /**
51    * @brief Destructor.
52    */
53   virtual ~WebEngineConsoleMessage() = default;
54
55   /**
56    * @brief Return the source of the console message.
57    * @return source of the console message if succeded or empty string if failed
58    */
59   virtual std::string GetSource() const = 0;
60
61   /**
62    * @brief Return line no of the console message.
63    * @return the line number of the message if succeded or 0 if failed
64    */
65   virtual uint32_t GetLine() const = 0;
66
67   /**
68    * @brief Return the log severity of the console message.
69    * @return SeverityLevel indicating the console message level
70    */
71   virtual SeverityLevel GetSeverityLevel() const = 0;
72
73   /**
74    * @brief Return the console message text.
75    * @return console message text if succeded or empty string if failed
76    */
77   virtual std::string GetText() const = 0;
78 };
79
80 } // namespace Dali
81
82 #endif // DALI_WEB_ENGINE_CONSOLE_MESSAGE_H