--- /dev/null
+/*
+ * Copyright (c) 2018 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.
+ */
+
+#ifndef __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_INTERNAL_H__
+#define __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_INTERNAL_H__
+
+#include <tizen.h>
+#include <bundle.h>
+#include <watchface-complication-provider.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Sets shared data type.
+ * @details Developer can set different set of data for shared data depends on data type.
+ * WATCHFACE_COMPLICATION_TYPE_SHORT_TEXT : short text, icon, title, extra
+ * WATCHFACE_COMPLICATION_TYPE_LONG_TEXT : long text, icon, title, extra
+ * WATCHFACE_COMPLICATION_TYPE_RANGED_VALUE : short text, icon, title, current, min, max, extra
+ * WATCHFACE_COMPLICATION_TYPE_TIME : time, short text, icon, extra
+ * WATCHFACE_COMPLICATION_TYPE_ICON : icon_path, extra
+ * WATCHFACE_COMPLICATION_TYPE_IMAGE : image_path, extra
+ * @since_tizen 5.0
+ * @param[in] shared_data The data which will be shared with watch application
+ * @param[in] type The data type of shared_data
+ * @return #WATCHFACE_COMPLICATION_ERROR_NONE on success,
+ * otherwise an error code (see #watchface_complication_error_e) on failure
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NONE Successful
+ * @retval #WATCHFACE_COMPLICATION_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #WATCHFACE_COMPLICATION_ERROR_IO_ERROR I/O error
+ * @retval #WATCHFACE_COMPLICATION_ERROR_NOT_SUPPORTED Not supported
+ * @see watchface_complication_type_e
+ *
+ */
+int watchface_complication_provider_data_set_type(bundle *shared_data,
+ watchface_complication_type_e type);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __TIZEN_APPFW_WATCHFACE_COMPLICATION_PROVIDER_INTERNAL_H__ */
\ No newline at end of file
return WATCHFACE_COMPLICATION_ERROR_NONE;
}
+extern "C" EXPORT_API int watchface_complication_provider_data_set_type(
+ bundle* shared_data, watchface_complication_type_e type) {
+ char num_str[32] = {0, };
+
+ if (shared_data == NULL ||
+ !util::CheckComplicationType(static_cast<int>(type))) {
+ LOGE("Invalid param");
+ return WATCHFACE_COMPLICATION_ERROR_INVALID_PARAMETER;
+ }
+
+ snprintf(num_str, sizeof(num_str), "%d", type);
+ return _add_bundle_data(shared_data, DATA_TYPE_KEY, num_str);
+}
+
extern "C" EXPORT_API int watchface_complication_provider_data_set_title(
bundle* shared_data, const char* title) {
int ret;