SET(SRCS
src/main.cpp
+ src/sticker_data.cpp
src/ft.cpp
src/sticker_info.cpp
src/message.cpp
--- /dev/null
+/*
+ * Copyright (c) 2020 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 __STICKER_DATA_H__
+#define __STICKER_DATA_H__
+
+#include <string>
+
+using namespace std;
+
+struct sticker_info {
+ sticker_info();
+ ~sticker_info();
+
+ void reset();
+
+ string file_path;
+ string group;
+ string keyword;
+ string disp_type;
+ string description;
+};
+
+#endif /* __STICKER_DATA_H__ */
void destroy_sticker_provider_handle(void);
void delete_sticker_data(const char *fileName);
-#endif /* __STICKER_INF_H__ */
+#endif /* __STICKER_INFO_H__ */
#include "ft.h"
#include "log.h"
#include "sticker_info.h"
+#include "../inc/sticker_data.h"
#include "message.h"
#include "sync_alarm.h"
string type;
};
-static void _reset_sticker_data();
-
-struct sticker_info {
- string file_path;
- string group;
- string keyword;
- string disp_type;
- string description;
-
- sticker_info()
- {
- _reset_sticker_data();
- }
-};
-
static struct sap_info_s priv_data = { 0 };
static struct sticker_info sticker_data;
static struct request pending_request, current_request;
service_app_exit();
}
-static void _reset_sticker_data()
-{
- sticker_data.file_path.clear();
- sticker_data.group.clear();
- sticker_data.keyword.clear();
- sticker_data.disp_type.clear();
- sticker_data.description.clear();
-}
void
on_data_received(sap_socket_h socket, unsigned short int channel_id, unsigned int payload_length, void *buffer,
json_object_unref(j_object);
} else if (msg_id == STICKER_SEND_FACE_DATA) {
LOGD("msg : %s", msg_id.c_str());
- _reset_sticker_data();
+ sticker_data.reset();
const char *type_data = json_object_get_string_member(root_obj, "type");
if (type_data)
--- /dev/null
+/*
+ * Copyright (c) 2020 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 "../inc/sticker_data.h"
+
+sticker_info::sticker_info()
+{
+ reset();
+}
+
+sticker_info::~sticker_info()
+{
+
+}
+
+void sticker_info::reset()
+{
+ file_path.clear();
+ group.clear();
+ keyword.clear();
+ disp_type.clear();
+ description.clear();
+}
\ No newline at end of file