Add missing file 71/298771/1
authorwn.jang <wn.jang@samsung.com>
Wed, 13 Sep 2023 08:40:17 +0000 (17:40 +0900)
committerwn.jang <wn.jang@samsung.com>
Wed, 13 Sep 2023 08:40:37 +0000 (17:40 +0900)
Change-Id: I0504928a0c41ac0737957304d3e8fc5954dfd1a3

src/mmi/mmi-node-controller.cpp [new file with mode: 0644]

diff --git a/src/mmi/mmi-node-controller.cpp b/src/mmi/mmi-node-controller.cpp
new file mode 100644 (file)
index 0000000..a65db49
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ *  You may obtain a copy of the License at
+ *
+ *               http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+
+#include "mmi.h"
+#include "mmi-node-controller.h"
+
+#include "mmi-log.h"
+
+int mmi_standard_node_create_controller(mmi_standard_node_controller_type_e type, mmi_node_h *node) {
+    if (nullptr == node) {
+        return MMI_ERROR_INVALID_PARAMETER;
+    }
+    *node = new mmi_node_s;
+    (*node)->type = MMI_STANDARD_NODE_TYPE_CONTROLLER;
+    (*node)->sub_type = (int)type;
+    (*node)->ports = nullptr;
+    (*node)->port_count = 0;
+    memset(&(*node)->callbacks, 0, sizeof(mmi_node_callbacks));
+    return MMI_ERROR_NONE;
+}
+
+int mmi_standard_node_get_controller_type(mmi_node_h node, mmi_standard_node_controller_type_e *type) {
+    if (nullptr == node || nullptr == type) {
+        return MMI_ERROR_INVALID_PARAMETER;
+    }
+    *type = (mmi_standard_node_controller_type_e)node->sub_type;
+    return MMI_ERROR_NONE;
+}
+
+int mmi_standard_node_register_controller(mmi_standard_node_controller_type_e type, mmi_node_callbacks *callbacks, mmi_node_h node) {
+    if (nullptr == callbacks || nullptr == node) {
+        return MMI_ERROR_INVALID_PARAMETER;
+    }
+    return MMI_ERROR_NONE;
+}
+