From: wn.jang Date: Wed, 13 Sep 2023 08:40:17 +0000 (+0900) Subject: Add missing file X-Git-Tag: accepted/tizen/unified/20231219.041318~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4888d6636114faab7e78a61695b16c37e736bb79;p=platform%2Fcore%2Fuifw%2Fmmi-framework.git Add missing file Change-Id: I0504928a0c41ac0737957304d3e8fc5954dfd1a3 --- diff --git a/src/mmi/mmi-node-controller.cpp b/src/mmi/mmi-node-controller.cpp new file mode 100644 index 0000000..a65db49 --- /dev/null +++ b/src/mmi/mmi-node-controller.cpp @@ -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; +} +