2 * Copyright (c) 2020 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <app_event.h>
24 #define EVENT_NAME "event.org.tizen.sticker-receiver.user_event"
26 bool send_message(const char *cmd, const char *data)
31 bundle *b = bundle_create();
32 bundle_add_str(b, "command", cmd);
34 bundle_add_str(b, "data", data);
36 ret = event_publish_app_event(EVENT_NAME, b);
37 if (ret != EVENT_ERROR_NONE) {
39 STLOGE("Failed to send message by event publish. error : %d", ret);