merge with master 2.1b_release accepted/tizen_2.1/20130425.035147 submit/tizen_2.1/20130424.231603
authorJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:14:45 +0000 (01:14 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Fri, 15 Mar 2013 16:14:45 +0000 (01:14 +0900)
27 files changed:
AUTHORS
Makefile.am
configure.ac
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/libslp-lbs-plugin-replay.install.in [new file with mode: 0644]
debian/libslp-lbs-plugin-replay.postinst.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
libslp-lbs-plugin-replay.manifest [moved from libslp-lbsplugin-replay.manifest with 100% similarity]
libslp-xpsplugin-replay.manifest [deleted file]
packaging/libslp-lbs-plugin-replay.spec [new file with mode: 0644]
packaging/libslp-lbsplugin-replay.spec [deleted file]
replay-plugin/Makefile.am [moved from gps-plugin/Makefile.am with 100% similarity]
replay-plugin/include/gps_plugin_debug.h [moved from gps-plugin/include/gps_plugin_debug.h with 82% similarity]
replay-plugin/include/nmea_parser.h [moved from gps-plugin/include/nmea_parser.h with 74% similarity]
replay-plugin/include/setting.h [moved from gps-plugin/include/setting.h with 83% similarity]
replay-plugin/src/gps_plugin_replay.c [moved from gps-plugin/src/gps_plugin_replay.c with 93% similarity]
replay-plugin/src/nmea_parser.c [moved from gps-plugin/src/nmea_parser.c with 95% similarity]
replay-plugin/src/setting.c [moved from gps-plugin/src/setting.c with 86% similarity]
xps-plugin/Makefile.am [deleted file]
xps-plugin/include/geoclue_plugin_debug.h [deleted file]
xps-plugin/src/geoclue_xps_plugin_replay.c [deleted file]
xps-plugin/src/geoclue_xps_plugin_test.c [deleted file]

diff --git a/AUTHORS b/AUTHORS
index a879250..cc7be1c 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,3 +1,3 @@
 Youngae Kang <youngae.kang@samsung.com>
-Minjune Kim <sena06.kim@samsung.com>
+Yunhan Kim <yhan.kim@samsung.com>
 Genie Kim <daejins.kim@samsung.com>
index 9ca34b2..67c6e73 100644 (file)
@@ -1,4 +1,3 @@
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = . gps-plugin
-#SUBDIRS = . gps-plugin xps-plugin
+SUBDIRS = . replay-plugin
index 0f102e3..e6605ad 100644 (file)
@@ -23,10 +23,6 @@ PKG_CHECK_MODULES(GPS_MANAGER_PLUGIN, gps-manager-plugin)
 AC_SUBST(GPS_MANAGER_PLUGIN_CFLAGS)
 AC_SUBST(GPS_MANAGER_PLUGIN_LIBS)
 
-#PKG_CHECK_MODULES(GEOCLUE_XPS_PLUGIN, geoclue-xps-plugin)
-#AC_SUBST(GEOCLUE_XPS_PLUGIN_CFLAGS)
-#AC_SUBST(GEOCLUE_XPS_PLUGIN_LIBS)
-
 PKG_CHECK_MODULES(VCONF, vconf)
 AC_SUBST(VCONF_CFLAGS)
 AC_SUBST(VCONF_LIBS)
@@ -38,7 +34,7 @@ AC_SUBST(DLOG_LIBS)
 ####### Config files
 AC_CONFIG_FILES([
        Makefile
-       gps-plugin/Makefile
+       replay-plugin/Makefile
        ])
 
 AC_OUTPUT
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..9a4d643
--- /dev/null
@@ -0,0 +1,103 @@
+libslp-lbs-plugin-replay (0.1.3-10) unstable; urgency=low
+
+  * Reduce the size of the NMEA logging file
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-9
+
+ -- Minjune Kim <sena06.kim@samsung.com>  Tue, 17 Jul 2012 13:23:35 +0900
+
+libslp-lbs-plugin-replay (0.1.3-9) unstable; urgency=low
+
+  * strip
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-9
+
+ -- Minjune Kim <sena06.kim@samsung.com>  Wed, 11 Jul 2012 22:00:45 +0900
+
+libslp-lbs-plugin-replay (0.1.3-8) unstable; urgency=low
+
+  * change directory path of config files to /etc(for FOTA)
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-8
+
+ -- Genie Kim <daejins.kim@samsung.com>  Fri, 15 Jun 2012 14:35:18 +0900
+
+libslp-lbs-plugin-replay (0.1.3-7) unstable; urgency=low
+
+  * change to use vconf location internal keys
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-7
+
+ -- Genie Kim <daejins.kim@samsung.com>  Tue, 15 May 2012 19:53:25 +0900
+
+libslp-lbs-plugin-replay (0.1.3-6) unstable; urgency=low
+
+  * add gpgll nmea sentence
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-6
+
+ -- Genie Kim <daejins.kim@samsung.com>  Wed, 09 May 2012 17:01:41 +0900
+
+libslp-lbs-plugin-replay (0.1.3-5) unstable; urgency=low
+
+  * Bug fix : eof of nmea log
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-5
+
+ -- Genie Kim <daejins.kim@samsung.com>  Mon, 16 Apr 2012 16:29:00 +0900
+
+libslp-lbs-plugin-replay (0.1.3-4) unstable; urgency=low
+
+  * Bug fix: replay mode key
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-4
+
+ -- Genie Kim <daejins.kim@samsung.com>  Fri, 13 Apr 2012 16:41:43 +0900
+
+libslp-lbs-plugin-replay (0.1.3-3) unstable; urgency=low
+
+  * Bug fix: NMEA log file path
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-3
+
+ -- Youngae Kang <youngae.kang@samsung.com>  Sat, 07 Apr 2012 14:49:22 +0900
+
+libslp-lbs-plugin-replay (0.1.3-2) unstable; urgency=low
+
+  * change spec file
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-2
+
+ -- Genie Kim <daejins.kim@samsung.com>  Tue, 21 Feb 2012 20:04:52 +0900
+
+libslp-lbs-plugin-replay (0.1.3-1) unstable; urgency=low
+
+  * add position valid data in sv_data
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.3-1
+
+ -- Minjune Kim <sena06.kim@samsung.com>  Fri, 17 Feb 2012 17:12:01 +0900
+
+libslp-lbs-plugin-replay (0.1.2-1) unstable; urgency=low
+
+  * bug fix for fclose
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.2-1
+
+ -- Genie Kim <daejins.kim@samsung.com>  Wed, 15 Feb 2012 11:10:09 +0900
+
+libslp-lbs-plugin-replay (0.1.1-1) unstable; urgency=low
+
+  * Add manual replay mode for SDK
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.1-1
+
+ -- Genie Kim <daejins.kim@samsung.com>  Wed, 01 Feb 2012 16:18:43 +0900
+
+libslp-lbs-plugin-replay (0.1.0-1) unstable; urgency=low
+
+  * Initial Release.
+  * Git: framework/location/libslp-lbs-plugin-replay
+  * Tag: libslp-lbs-plugin-replay_0.1.0-1
+
+ -- Genie Kim <daejins.kim@samsung.com>  Mon, 26 Sep 2011 00:00:00 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..ce7b202
--- /dev/null
@@ -0,0 +1,19 @@
+Source: libslp-lbs-plugin-replay
+Section: devel
+Priority: extra
+Maintainer: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>, Genie Kim <daejins.kim@samsung.com>
+Uploaders: Genie Kim <daejins.kim@samsung.com>
+Build-Depends: debhelper (>= 4.0.0), autotools-dev, gps-manager-plugin-dev, libglib2.0-dev, libvconf-dev, vconf-internal-keys-dev, dlog-dev
+Standards-Version: 0.1.0
+
+Package: libslp-lbs-plugin-replay
+Section: libs
+Architecture: any
+Depends:  ${shlibs:Depends}, ${misc:Depends}, libglib2.0-0, libvconf-0, libdlog-0
+Description: GPS manager plugin library for replay mode
+
+Package: libslp-lbs-plugin-replay-dbg
+Section: debug
+Architecture: any
+Depends:  libslp-lbs-plugin-replay (= ${Source-Version})
+Description: GPS manager plugin library for replay mode (for debugging)
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/libslp-lbs-plugin-replay.install.in b/debian/libslp-lbs-plugin-replay.install.in
new file mode 100644 (file)
index 0000000..8be8875
--- /dev/null
@@ -0,0 +1,3 @@
+debian/tmp@PREFIX@/lib/libSLP-lbs-plugin-replay.so
+debian/tmp@PREFIX@/lib/libSLP-lbs-plugin-replay.so.*
+debian/tmp/etc/gps-manager/replay/*
diff --git a/debian/libslp-lbs-plugin-replay.postinst.in b/debian/libslp-lbs-plugin-replay.postinst.in
new file mode 100644 (file)
index 0000000..60c9f83
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+rm -rf /usr/lib/libSLP-lbs-plugin.so
+ln -sf /usr/lib/libSLP-lbs-plugin-replay.so /usr/lib/libSLP-lbs-plugin.so
+
+
+if [ "${USER}" = "root" ]
+then
+#Change File owner
+        chown root:root /etc/gps-manager/replay/nmea_replay.log
+
+#Change File Permission
+        chmod 666 /etc/gps-manager/replay/nmea_replay.log
+fi
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..795f28a
--- /dev/null
@@ -0,0 +1,128 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+
+CFLAGS ?= -Wall -g
+LDFLAGS ?=
+PREFIX ?= /usr
+DESTDIR ?= $(CURDIR)/debian/tmp
+DATADIR ?= $(DESTDIR)/etc/gps-manager
+
+#CFLAGS += -O0
+#CXXFLAGS += -O0
+CFLAGS += -fvisibility=hidden -Wall -fPIC
+CXXFLAGS +=  -fvisibility=hidden -Wall -fPIC
+LDFLAGS += -Wl,--as-needed -Wl,--hash-style=both
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       ./autogen.sh
+       mkdir -p build
+       cd build && CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ../configure --prefix=$(PREFIX) --datadir=$(DATADIR) 
+
+       touch $@
+
+build: build-stamp
+build-stamp:  configure-stamp
+       dh_testdir
+
+       # Add here commands to compile the package.
+       mkdir -p build
+       cd build && $(MAKE)
+       #docbook-to-man debian/ncurses.sgml > ncurses.1
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       mkdir -p build
+       cd build
+       -$(MAKE) clean
+       -$(MAKE) distclean
+       cd ..
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+       
+       find $(CURDIR) -name "Makefile.in" -exec rm -f {} \;
+       
+       dh_clean 
+       rm -rf build
+       rm -rf build-aux
+       rm -rf m4
+       rm -f aclocal.m4 config.h.in configure
+
+install: build
+       dh_testdir
+       dh_testroot
+#      dh_clean -k 
+       dh_installdirs
+
+       # Add here commands to install the package into debian/ncurses.
+       mkdir -p build
+       cd build && $(MAKE) DESTDIR=$(DESTDIR) install
+
+       mkdir -p $(DATADIR)/replay
+       cp -a nmea-log/*.log $(DATADIR)/replay
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+       dh_installchangelogs 
+       dh_installdocs
+       dh_installexamples
+       dh_install #--sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package=libslp-lbs-plugin-replay-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
diff --git a/libslp-xpsplugin-replay.manifest b/libslp-xpsplugin-replay.manifest
deleted file mode 100644 (file)
index a76fdba..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-       <request>
-               <domain name="_" />
-       </request>
-</manifest>
diff --git a/packaging/libslp-lbs-plugin-replay.spec b/packaging/libslp-lbs-plugin-replay.spec
new file mode 100644 (file)
index 0000000..c8ec68b
--- /dev/null
@@ -0,0 +1,45 @@
+Name:       libslp-lbs-plugin-replay
+Summary:    gps-manager plugin library for replay mode
+Version:    0.1.3
+Release:    1
+Group:      TO_BE/FILLED_IN
+License:    TO_BE/FILLED_IN
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(vconf)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(gps-manager-plugin)
+
+%description
+gps-manager plugin library for replay mode
+
+%define DATADIR /etc/gps-manager
+
+%prep
+%setup -q 
+
+./autogen.sh
+./configure --prefix=%{_prefix}  --datadir=%{DATADIR}
+
+
+%build
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+mkdir -p %{buildroot}%{DATADIR}/replay
+cp -a nmea-log/*.log %{buildroot}%{DATADIR}/replay
+
+%post
+rm -rf /usr/lib/libSLP-lbs-plugin.so
+ln -sf /usr/lib/libSLP-lbs-plugin-replay.so /usr/lib/libSLP-lbs-plugin.so
+
+%files
+%manifest libslp-lbs-plugin-replay.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libSLP-lbs-plugin-replay.so
+%{_libdir}/libSLP-lbs-plugin-replay.so.*
+%{DATADIR}/replay/*
diff --git a/packaging/libslp-lbsplugin-replay.spec b/packaging/libslp-lbsplugin-replay.spec
deleted file mode 100644 (file)
index 05c807a..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Name:       libslp-lbsplugin-replay
-Summary:    gps-manager plugin library for replay mode
-Version:    0.1.8
-Release:    1
-Group:      System/Libraries
-License:    Apache Licensc, Version 2.0
-Source0:    %{name}-%{version}.tar.gz
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(vconf)
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(gps-manager-plugin)
-#BuildRequires:  pkgconfig(geoclue-xps-plugin)
-
-%description
-gps-manager plugin library for replay mode
-
-%define DATADIR /etc/gps-manager
-
-#%package -n libslp-xpsplugin-replay
-#Summary: Position/Velocity server for GeoClue (XPS)
-#Group:   TO_BE/FILLED_IN
-
-#%description -n libslp-xpsplugin-replay
-#GeoClue provides applications access to various geographical information sources using a D-Bus API or a C library.-
-#This package provides a positioning backend for GeoClue.
-
-%prep
-%setup -q
-
-./autogen.sh
-./configure --prefix=%{_prefix}  --datadir=%{DATADIR}
-
-
-%build
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-%make_install
-
-mkdir -p %{buildroot}%{DATADIR}/replay
-cp -a nmea-log/*.log %{buildroot}%{DATADIR}/replay
-
-%post
-rm -rf /usr/lib/libSLP-lbs-plugin.so
-ln -sf /usr/lib/libSLP-lbs-plugin-replay.so /usr/lib/libSLP-lbs-plugin.so
-
-#%post -n libslp-xpsplugin-replay
-#rm -rf /usr/lib/libSLP-xps-plugin.so
-#ln -sf /usr/lib/libSLP-xps-plugin-replay.so /usr/lib/libSLP-xps-plugin.so
-
-%files
-%manifest libslp-lbsplugin-replay.manifest
-%defattr(-,root,root,-)
-%{_libdir}/libSLP-lbs-plugin-replay.so*
-%{DATADIR}/replay/*
-
-#%files -n libslp-xpsplugin-replay
-#%manifest libslp-xpsplugin-replay.manifest
-#%defattr(-,root,root,-)
-#%{_libdir}/libSLP-xps-plugin-replay.so*
similarity index 82%
rename from gps-plugin/include/gps_plugin_debug.h
rename to replay-plugin/include/gps_plugin_debug.h
index 4e38254..daef1c7 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
similarity index 74%
rename from gps-plugin/include/nmea_parser.h
rename to replay-plugin/include/nmea_parser.h
index 1726036..a86c533 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
similarity index 83%
rename from gps-plugin/include/setting.h
rename to replay-plugin/include/setting.h
index ba04ff5..257d99d 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
similarity index 93%
rename from gps-plugin/src/gps_plugin_replay.c
rename to replay-plugin/src/gps_plugin_replay.c
index 4672bc5..8f828d5 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -270,13 +270,8 @@ gboolean gps_plugin_replay_timeout_cb(gpointer data)
 {
        gboolean ret = FALSE;
        read_error_t err = READ_SUCCESS;
-       char nmea_data[REPLAY_NMEA_SET_SIZE] = { 0, };
        replay_timeout *timer = (replay_timeout *) data;
-
-       if (timer == NULL) {
-               LOG_PLUGIN(DBG_ERR, "replay handel[timer] is NULL");
-               return FALSE;
-       }
+       char nmea_data[REPLAY_NMEA_SET_SIZE] = { 0, };
 
        memset(timer->pos_data, 0, sizeof(pos_data_t));
        memset(timer->sv_data, 0, sizeof(sv_data_t));
@@ -310,13 +305,15 @@ gboolean gps_plugin_replay_timeout_cb(gpointer data)
                timer->sv_data->pos_valid = FALSE;
        }
 
-       if (g_gps_event_cb != NULL) {
-               if (err != READ_NOT_FIXED) {
-                       gps_plugin_replay_pos_event(timer->pos_data);
+       if (timer != NULL) {
+               if (g_gps_event_cb != NULL) {
+                       if (err != READ_NOT_FIXED) {
+                               gps_plugin_replay_pos_event(timer->pos_data);
+                       }
+                       gps_plugin_replay_sv_event(timer->sv_data);
                }
-               gps_plugin_replay_sv_event(timer->sv_data);
+               ret = TRUE;
        }
-       ret = TRUE;
        return ret;
 }
 
@@ -438,26 +435,11 @@ replay_timeout *gps_plugin_replay_timer_init()
        setting_notify_key_changed(VCONFKEY_LOCATION_REPLAY_MODE, replay_mode_changed_cb);
 
        timer->pos_data = (pos_data_t *) malloc(sizeof(pos_data_t));
-       if (timer->pos_data == NULL) {
-               LOG_PLUGIN(DBG_ERR, "pos_data allocation is failed.");
-               free(timer);
-               return NULL;
-       }
-
        timer->sv_data = (sv_data_t *) malloc(sizeof(sv_data_t));
-       if (timer->sv_data == NULL) {
-               LOG_PLUGIN(DBG_ERR, "sv_data allocation is failed.");
-               free(timer->pos_data);
-               free(timer);
-               return NULL;
-       }
-
        timer->nmea_data = (nmea_data_t *) malloc(sizeof(nmea_data_t));
-       if (timer->nmea_data == NULL) {
-               LOG_PLUGIN(DBG_ERR, "nmea_data allocation is failed.");
-               free(timer->pos_data);
-               free(timer->sv_data);
-               free(timer);
+
+       if (timer->pos_data == NULL || timer->sv_data == NULL || timer->nmea_data == NULL) {
+               LOG_PLUGIN(DBG_ERR, "pos_data or sv_data or nmea_data allocation is failed.");
                return NULL;
        }
 
similarity index 95%
rename from gps-plugin/src/nmea_parser.c
rename to replay-plugin/src/nmea_parser.c
index 63650dc..fc92c3c 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -104,6 +104,9 @@ int nmea_parser_tokenize(char input[], char *token[])
                                state = 0;
                        }
                        break;
+               default:
+                       state = 0;
+                       break;
                }
                s++;
        }
@@ -322,7 +325,7 @@ static int nmea_parser_gpgsv(char *token[], sv_data_t * sv)
 
 int nmea_parser_sentence(char *sentence, char *token[], pos_data_t * pos, sv_data_t * sv)
 {
-       int ret = READ_ERROR;
+       int ret;
        if (strcmp(sentence, "GPGGA") == 0) {
                ret = nmea_parser_gpgga(token, pos, sv);
        } else if (strcmp(sentence, "GPRMC") == 0) {
@@ -366,7 +369,7 @@ int nmea_parser(char *data, pos_data_t * pos, sv_data_t * sv)
                        if (err == READ_NOT_FIXED) {
                                LOG_PLUGIN(DBG_LOW, "NOT Fixed");
                                ret = err;
-                       } else if (err == READ_ERROR) {
+                       } else if (ret == READ_ERROR) {
                                ret = err;
                                break;
                        }
similarity index 86%
rename from gps-plugin/src/setting.c
rename to replay-plugin/src/setting.c
index 347b39f..32ed340 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * gps-manager replay plugin
+ * GPS manager replay plugin
  *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd. All rights reserved.
  *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
+ * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
+ *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/xps-plugin/Makefile.am b/xps-plugin/Makefile.am
deleted file mode 100755 (executable)
index 8f86db3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-################# Build library ################
-lib_LTLIBRARIES = libSLP-xps-plugin-replay.la
-
-libSLP_xps_plugin_replay_la_SOURCES = \
-                                               $(srcdir)/src/geoclue_xps_plugin_replay.c
-
-libSLP_xps_plugin_replay_la_CFLAGS = -Wall -fPIC -fvisibility=hidden -DEXPORT_API="__attribute__((visibility(\"default\")))" \
-                                               -I$(srcdir)/include \
-                                               $(GEOCLUE_XPS_PLUGIN_CFLAGS) \
-                                               $(VCONF_CFLAGS) \
-                                               $(DLOG_CFLAGS)
-
-libSLP_xps_plugin_replay_la_LDFLAGS = -Wl,--hash-style=both -Wl,--as-needed \
-                                               $(VCONF_LIBS) \
-                                               $(DLOG_LIBS)
diff --git a/xps-plugin/include/geoclue_plugin_debug.h b/xps-plugin/include/geoclue_plugin_debug.h
deleted file mode 100755 (executable)
index 3d9246d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * gps-manager replay plugin
- *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
- *
- * 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 __GPS_PLUGIN_DEBUG_H__
-#define __GPS_PLUGIN_DEBUG_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GPS_DLOG
-#define GPS_DLOG_DEBUG         // filename and line number will be shown
-
-#ifdef GPS_DLOG
-#include <dlog.h>
-#define TAG_GPS_PLUGIN      "xps-plugin"
-
-#define DBG_LOW        LOG_DEBUG
-#define DBG_INFO       LOG_INFO
-#define DBG_WARN       LOG_WARN
-#define DBG_ERR        LOG_ERROR
-
-#ifdef GPS_DLOG_DEBUG          // Debug mode
-#define LOG_PLUGIN(dbg_lvl,fmt,args...)  SLOG(dbg_lvl, TAG_GPS_PLUGIN, "[%-40s: %-4d] "fmt, __FILE__, __LINE__, ##args)
-#else                          // Release(commercial) mode
-#define LOG_PLUGIN(dbg_lvl,fmt,args...)  SLOG(dbg_lvl, TAG_GPS_PLUGIN, fmt, ##args)
-#endif
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/xps-plugin/src/geoclue_xps_plugin_replay.c b/xps-plugin/src/geoclue_xps_plugin_replay.c
deleted file mode 100755 (executable)
index 119a7b1..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * gps-manager replay plugin
- *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <errno.h>
-#include <sys/time.h>
-
-#include <geoclue_plugin_intf.h>
-
-#include "geoclue_plugin_debug.h"
-
-
-int geoclue_plugin_test_load(void);
-int geoclue_plugin_test_unload(void);
-int geoclue_plugin_test_location(unsigned long period, LocationCallback cb, void *arg, void **handle);
-int geoclue_plugin_test_cancel(void *handle, CancelCallback cb, void *arg);
-void geoclue_plugin_test_get_offline_token(const unsigned char *key,
-                       unsigned int keyLengh,
-                       OfflineTokenCallback cb,
-                       void *arg);
-int geoclue_plugin_test_offline_location(const unsigned char *key,
-                       unsigned int keyLength,
-                       const unsigned char *token,
-                       unsigned int tokenSize,
-                       LocationCallback cb,
-                       void *arg);
-
-static const geoclue_plugin_interface g_geoclue_plugin_interface_test_interface = {
-       geoclue_plugin_test_load,
-       geoclue_plugin_test_unload,
-       geoclue_plugin_test_location,
-       geoclue_plugin_test_cancel,
-       geoclue_plugin_test_get_offline_token,
-       geoclue_plugin_test_offline_location
-};
-
-typedef struct {
-       int index;  // used for handle
-       plugin_LocationInfo *location;
-       unsigned long period;
-       LocationCallback location_cb;  // save from location
-       void *arg; // save from location
-} GeoclueXpsPluginTest;
-
-static GeoclueXpsPluginTest *xps_plugint_test = NULL;
-
-static gboolean update_fake_position(gpointer data)
-{
-       GeoclueXpsPluginTest *xps_plugin = data;
-
-       if (xps_plugin) {
-               if (xps_plugin->location) \r{
-                       if (xps_plugin->location->latitude < 90) {
-                               xps_plugin->location->latitude++;
-                       } else {
-                               xps_plugin->location->latitude = 0;
-                       }
-                       if (xps_plugin->location->longitude< 180) {
-                               xps_plugin->location->longitude++;
-                       } else {
-                               xps_plugin->location->longitude = 0;
-                       }
-                       if (xps_plugin->location->age < 10000) {
-                               xps_plugin->location->age++;
-                       } else {
-                               xps_plugin->location->age = 0;
-                       }
-                       if (xps_plugin->location->altitude < 5000) \r{
-                               xps_plugin->location->altitude++;
-                       } else {
-                               xps_plugin->location->altitude = 0;
-                       }
-                       if (xps_plugin->location->bearing < 90) \r{
-                               xps_plugin->location->bearing++;
-                       } else {
-                               xps_plugin->location->bearing = 0;
-                       }
-                       if (xps_plugin->location->hpe < 100) \r{
-                               xps_plugin->location->hpe++;
-                       } else {
-                               xps_plugin->location->hpe = 0;
-                       }
-                       if (xps_plugin->location->speed < 250) \r{
-                               xps_plugin->location->speed++;
-                       } else {
-                               xps_plugin->location->speed = 0;
-                       }
-               }
-
-               // called intervals
-               if (xps_plugin->location_cb) {
-                       xps_plugin->location_cb(xps_plugin->arg, xps_plugin->location, NULL);
-               }
-       }
-
-       return TRUE;
-}
-
-int geoclue_plugin_test_load(void)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_load called");
-
-
-       // create plugin_LocationInfo *location
-       if (NULL == xps_plugint_test) {
-               xps_plugint_test = g_new0(GeoclueXpsPluginTest, 1);
-               if (NULL == xps_plugint_test) {
-                       LOG_PLUGIN(LOG_ERROR, "[ERROR] GeoclueXpsPluginTest create fail");
-                       return FALSE;
-               } else \r{
-                       xps_plugint_test->index = 0;
-                       xps_plugint_test->period = 5000;  // 5s
-                       xps_plugint_test->location = g_new0(plugin_LocationInfo, 1);
-                       if (NULL == xps_plugint_test->location) {
-                               LOG_PLUGIN(LOG_ERROR, "[ERROR] plugin_LocationInfo create fail");
-                               g_free(xps_plugint_test);
-                               return FALSE;
-                       }
-                       xps_plugint_test->location->latitude = 10;
-                       xps_plugint_test->location->longitude = 10;
-                       xps_plugint_test->location->hpe = 10;
-                       xps_plugint_test->location->altitude= 10;
-                       xps_plugint_test->location->age = 10;
-                       xps_plugint_test->location->speed = 10;
-                       xps_plugint_test->location->bearing = 10;
-               }
-       }
-
-       // create the timer
-       //g_timeout_add (xps_plugint_test->period, update_fake_position, xps_plugint_test);
-       g_timeout_add (5000, update_fake_position, xps_plugint_test);
-
-       return TRUE;
-}
-int geoclue_plugin_test_unload(void)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_unload called");
-
-       // free plugin_LocationInfo *location
-       if (xps_plugint_test) \r{
-               if (xps_plugint_test->location) \r{
-                       g_free(xps_plugint_test->location);
-                       xps_plugint_test->location = NULL;
-               }
-               g_free(xps_plugint_test);
-               xps_plugint_test = NULL;
-       }
-
-       // kill the timer
-       return TRUE;
-}
-int geoclue_plugin_test_location(unsigned long period, LocationCallback cb, void *arg, void **handle)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location called");
-
-       // update the plugin_LocationInfo *location in the timer
-
-       // update handle
-       if (xps_plugint_test) {
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location: before set handle");
-               xps_plugint_test->index++;
-               gchar *tmp = g_strdup_printf("%d", xps_plugint_test->index);
-               *handle = (void *)tmp;
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location: after set handle, set[%s], handle[%s]", tmp, *handle);
-
-               // call LocationCallback
-               if (cb) {
-                       cb(arg, xps_plugint_test->location, NULL);
-                       xps_plugint_test->location_cb = cb;
-                       xps_plugint_test->arg = arg;
-               }
-
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location after call callback");
-       }
-
-       return TRUE;   // to test online
-       //return FALSE;  // to test the offline
-}
-int geoclue_plugin_test_cancel(void *handle, CancelCallback cb, void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_cancel called");
-       // check handle
-       if (handle) {
-               LOG_PLUGIN(LOG_DEBUG, "canel handle %s", handle);
-               g_free(handle);
-               handle = NULL;
-       }
-
-       // call CancelCallback
-       if (cb) {
-               cb(arg);
-       }
-       return TRUE;
-}
-
-void geoclue_plugin_test_get_offline_token(const unsigned char *key,
-                       unsigned int keyLengh,
-                       OfflineTokenCallback cb,
-                       void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token called");
-
-       unsigned char *key_copied = NULL;
-       if (key && keyLengh > 0) {
-               key_copied = g_memdup(key, keyLengh);
-               key_copied[keyLengh - 1] = '\0';
-               if (key_copied) {
-                       LOG_PLUGIN(LOG_DEBUG, "key_copied [%s]", key_copied);
-
-                       // call OfflineTokenCallback
-                       if (cb) {
-                               char *token = g_strdup("samsung_token");
-                               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token: before callback");
-                               cb(arg, token, strlen(token));
-                               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token: after callback");
-                       }
-               } else {
-                       LOG_PLUGIN(LOG_ERROR, "[ERROR] key copy fail");
-               }
-       } else {
-               LOG_PLUGIN(LOG_ERROR, "[ERROR] key or keyLengh parameter error");
-       }
-
-}
-int geoclue_plugin_test_offline_location(const unsigned char *key,
-                       unsigned int keyLength,
-                       const unsigned char *token,
-                       unsigned int tokenSize,
-                       LocationCallback cb,
-                       void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location called");
-
-       if (cb) {
-               if (xps_plugint_test) {
-                       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location: before callback");
-                       cb(arg, xps_plugint_test->location, NULL);
-                       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location: before callback");
-                       xps_plugint_test->location_cb = cb;
-                       xps_plugint_test->arg = arg;
-               }
-       }
-       return TRUE;
-}
-
-EXPORT_API const geoclue_plugin_interface *get_geoclue_plugin_interface()
-{
-       LOG_PLUGIN(LOG_DEBUG, "get_geoclue_plugin_interface called");
-       return &g_geoclue_plugin_interface_test_interface;
-}
diff --git a/xps-plugin/src/geoclue_xps_plugin_test.c b/xps-plugin/src/geoclue_xps_plugin_test.c
deleted file mode 100755 (executable)
index 119a7b1..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * gps-manager replay plugin
- *
- * Copyright (c) 2011-2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Youngae Kang <youngae.kang@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
- *          Genie Kim <daejins.kim@samsung.com>
- *
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <errno.h>
-#include <sys/time.h>
-
-#include <geoclue_plugin_intf.h>
-
-#include "geoclue_plugin_debug.h"
-
-
-int geoclue_plugin_test_load(void);
-int geoclue_plugin_test_unload(void);
-int geoclue_plugin_test_location(unsigned long period, LocationCallback cb, void *arg, void **handle);
-int geoclue_plugin_test_cancel(void *handle, CancelCallback cb, void *arg);
-void geoclue_plugin_test_get_offline_token(const unsigned char *key,
-                       unsigned int keyLengh,
-                       OfflineTokenCallback cb,
-                       void *arg);
-int geoclue_plugin_test_offline_location(const unsigned char *key,
-                       unsigned int keyLength,
-                       const unsigned char *token,
-                       unsigned int tokenSize,
-                       LocationCallback cb,
-                       void *arg);
-
-static const geoclue_plugin_interface g_geoclue_plugin_interface_test_interface = {
-       geoclue_plugin_test_load,
-       geoclue_plugin_test_unload,
-       geoclue_plugin_test_location,
-       geoclue_plugin_test_cancel,
-       geoclue_plugin_test_get_offline_token,
-       geoclue_plugin_test_offline_location
-};
-
-typedef struct {
-       int index;  // used for handle
-       plugin_LocationInfo *location;
-       unsigned long period;
-       LocationCallback location_cb;  // save from location
-       void *arg; // save from location
-} GeoclueXpsPluginTest;
-
-static GeoclueXpsPluginTest *xps_plugint_test = NULL;
-
-static gboolean update_fake_position(gpointer data)
-{
-       GeoclueXpsPluginTest *xps_plugin = data;
-
-       if (xps_plugin) {
-               if (xps_plugin->location) \r{
-                       if (xps_plugin->location->latitude < 90) {
-                               xps_plugin->location->latitude++;
-                       } else {
-                               xps_plugin->location->latitude = 0;
-                       }
-                       if (xps_plugin->location->longitude< 180) {
-                               xps_plugin->location->longitude++;
-                       } else {
-                               xps_plugin->location->longitude = 0;
-                       }
-                       if (xps_plugin->location->age < 10000) {
-                               xps_plugin->location->age++;
-                       } else {
-                               xps_plugin->location->age = 0;
-                       }
-                       if (xps_plugin->location->altitude < 5000) \r{
-                               xps_plugin->location->altitude++;
-                       } else {
-                               xps_plugin->location->altitude = 0;
-                       }
-                       if (xps_plugin->location->bearing < 90) \r{
-                               xps_plugin->location->bearing++;
-                       } else {
-                               xps_plugin->location->bearing = 0;
-                       }
-                       if (xps_plugin->location->hpe < 100) \r{
-                               xps_plugin->location->hpe++;
-                       } else {
-                               xps_plugin->location->hpe = 0;
-                       }
-                       if (xps_plugin->location->speed < 250) \r{
-                               xps_plugin->location->speed++;
-                       } else {
-                               xps_plugin->location->speed = 0;
-                       }
-               }
-
-               // called intervals
-               if (xps_plugin->location_cb) {
-                       xps_plugin->location_cb(xps_plugin->arg, xps_plugin->location, NULL);
-               }
-       }
-
-       return TRUE;
-}
-
-int geoclue_plugin_test_load(void)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_load called");
-
-
-       // create plugin_LocationInfo *location
-       if (NULL == xps_plugint_test) {
-               xps_plugint_test = g_new0(GeoclueXpsPluginTest, 1);
-               if (NULL == xps_plugint_test) {
-                       LOG_PLUGIN(LOG_ERROR, "[ERROR] GeoclueXpsPluginTest create fail");
-                       return FALSE;
-               } else \r{
-                       xps_plugint_test->index = 0;
-                       xps_plugint_test->period = 5000;  // 5s
-                       xps_plugint_test->location = g_new0(plugin_LocationInfo, 1);
-                       if (NULL == xps_plugint_test->location) {
-                               LOG_PLUGIN(LOG_ERROR, "[ERROR] plugin_LocationInfo create fail");
-                               g_free(xps_plugint_test);
-                               return FALSE;
-                       }
-                       xps_plugint_test->location->latitude = 10;
-                       xps_plugint_test->location->longitude = 10;
-                       xps_plugint_test->location->hpe = 10;
-                       xps_plugint_test->location->altitude= 10;
-                       xps_plugint_test->location->age = 10;
-                       xps_plugint_test->location->speed = 10;
-                       xps_plugint_test->location->bearing = 10;
-               }
-       }
-
-       // create the timer
-       //g_timeout_add (xps_plugint_test->period, update_fake_position, xps_plugint_test);
-       g_timeout_add (5000, update_fake_position, xps_plugint_test);
-
-       return TRUE;
-}
-int geoclue_plugin_test_unload(void)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_unload called");
-
-       // free plugin_LocationInfo *location
-       if (xps_plugint_test) \r{
-               if (xps_plugint_test->location) \r{
-                       g_free(xps_plugint_test->location);
-                       xps_plugint_test->location = NULL;
-               }
-               g_free(xps_plugint_test);
-               xps_plugint_test = NULL;
-       }
-
-       // kill the timer
-       return TRUE;
-}
-int geoclue_plugin_test_location(unsigned long period, LocationCallback cb, void *arg, void **handle)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location called");
-
-       // update the plugin_LocationInfo *location in the timer
-
-       // update handle
-       if (xps_plugint_test) {
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location: before set handle");
-               xps_plugint_test->index++;
-               gchar *tmp = g_strdup_printf("%d", xps_plugint_test->index);
-               *handle = (void *)tmp;
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location: after set handle, set[%s], handle[%s]", tmp, *handle);
-
-               // call LocationCallback
-               if (cb) {
-                       cb(arg, xps_plugint_test->location, NULL);
-                       xps_plugint_test->location_cb = cb;
-                       xps_plugint_test->arg = arg;
-               }
-
-               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_location after call callback");
-       }
-
-       return TRUE;   // to test online
-       //return FALSE;  // to test the offline
-}
-int geoclue_plugin_test_cancel(void *handle, CancelCallback cb, void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_cancel called");
-       // check handle
-       if (handle) {
-               LOG_PLUGIN(LOG_DEBUG, "canel handle %s", handle);
-               g_free(handle);
-               handle = NULL;
-       }
-
-       // call CancelCallback
-       if (cb) {
-               cb(arg);
-       }
-       return TRUE;
-}
-
-void geoclue_plugin_test_get_offline_token(const unsigned char *key,
-                       unsigned int keyLengh,
-                       OfflineTokenCallback cb,
-                       void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token called");
-
-       unsigned char *key_copied = NULL;
-       if (key && keyLengh > 0) {
-               key_copied = g_memdup(key, keyLengh);
-               key_copied[keyLengh - 1] = '\0';
-               if (key_copied) {
-                       LOG_PLUGIN(LOG_DEBUG, "key_copied [%s]", key_copied);
-
-                       // call OfflineTokenCallback
-                       if (cb) {
-                               char *token = g_strdup("samsung_token");
-                               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token: before callback");
-                               cb(arg, token, strlen(token));
-                               LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_get_offline_token: after callback");
-                       }
-               } else {
-                       LOG_PLUGIN(LOG_ERROR, "[ERROR] key copy fail");
-               }
-       } else {
-               LOG_PLUGIN(LOG_ERROR, "[ERROR] key or keyLengh parameter error");
-       }
-
-}
-int geoclue_plugin_test_offline_location(const unsigned char *key,
-                       unsigned int keyLength,
-                       const unsigned char *token,
-                       unsigned int tokenSize,
-                       LocationCallback cb,
-                       void *arg)
-{
-       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location called");
-
-       if (cb) {
-               if (xps_plugint_test) {
-                       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location: before callback");
-                       cb(arg, xps_plugint_test->location, NULL);
-                       LOG_PLUGIN(LOG_DEBUG, "geoclue_plugin_test_offline_location: before callback");
-                       xps_plugint_test->location_cb = cb;
-                       xps_plugint_test->arg = arg;
-               }
-       }
-       return TRUE;
-}
-
-EXPORT_API const geoclue_plugin_interface *get_geoclue_plugin_interface()
-{
-       LOG_PLUGIN(LOG_DEBUG, "get_geoclue_plugin_interface called");
-       return &g_geoclue_plugin_interface_test_interface;
-}