summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Wieclaw <k.wieclaw@samsung.com>2018-10-09 14:30:38 +0200
committerKrzysztof Wieclaw <k.wieclaw@samsung.com>2018-10-23 14:13:14 +0200
commitd2de1965e22f64cb9c7939c3f5df9c74d551e78b (patch)
tree639f2668f8bbd9dd578436909980a6a6a50a1e1b /src
parenta26e3b199ba0b8aef41c353e810d0191f1c0cb3b (diff)
downloadgear-racing-car-d2de1965e22f64cb9c7939c3f5df9c74d551e78b.tar.gz
gear-racing-car-d2de1965e22f64cb9c7939c3f5df9c74d551e78b.tar.bz2
gear-racing-car-d2de1965e22f64cb9c7939c3f5df9c74d551e78b.zip
Added lap counter module stub
Change-Id: I692981cd4caa08fdd196433358caa52919bea6a2 Signed-off-by: Krzysztof Wieclaw <k.wieclaw@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lap_counter/lap_counter.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/lap_counter/lap_counter.c b/src/lap_counter/lap_counter.c
new file mode 100644
index 0000000..800e193
--- /dev/null
+++ b/src/lap_counter/lap_counter.c
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 "lap_counter/lap_counter.h"
+#include <stdlib.h>
+#include <string.h>
+#include "log.h"
+
+typedef struct lap_counter_data {
+ const char *user_name;
+} lap_counter_data_t;
+
+static lap_counter_data_t s_info = {0, };
+
+int lap_counter_init()
+{
+ s_info.user_name = NULL;
+ return 0;
+}
+
+int lap_counter_set_user_name(const char *user_name)
+{
+ free((void*)s_info.user_name);
+ s_info.user_name = strdup(user_name);
+ if(!s_info.user_name) {
+ return -1;
+ }
+ _D("User name set to %s", s_info.user_name);
+ return 0;
+}
+
+int lap_counter_shutdown()
+{
+ free((void*)s_info.user_name);
+ return 0;
+}