aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2017-12-08 10:51:40 +0900
committerTadao Tanikawa <tanikawa.tadao@jp.panasonic.com>2017-12-08 10:51:40 +0900
commit325511abff423ffee62ce5df0b64b512d9346912 (patch)
treef8339697a245fbc840da659a649edb781b7dfefa
parentee5d60f9d169d959cca9dc24cfc3776ed06c163c (diff)
RunXDG
Change-Id: Id2e44c0638e2cab4b8ba986daea413b718d79433 Signed-off-by: Tadao Tanikawa <tanikawa.tadao@jp.panasonic.com>
-rw-r--r--xdg-launcher/CMakeLists.txt81
-rw-r--r--xdg-launcher/README.txt36
-rw-r--r--xdg-launcher/package/hvac/config.xml17
-rw-r--r--xdg-launcher/package/hvac/icon.svg279
-rw-r--r--xdg-launcher/package/navi/config.xml17
-rw-r--r--xdg-launcher/package/navi/icon.svg279
-rw-r--r--xdg-launcher/package/runxdg/config.xml17
-rw-r--r--xdg-launcher/package/runxdg/icon.svg279
-rw-r--r--xdg-launcher/src/runxdg.cpp429
-rw-r--r--xdg-launcher/src/runxdg.hpp120
10 files changed, 1554 insertions, 0 deletions
diff --git a/xdg-launcher/CMakeLists.txt b/xdg-launcher/CMakeLists.txt
new file mode 100644
index 0000000..2b75f51
--- /dev/null
+++ b/xdg-launcher/CMakeLists.txt
@@ -0,0 +1,81 @@
+project (runxdg)
+
+cmake_minimum_required(VERSION 3.0)
+
+set(PROJECT_NAME "runxdg")
+set(PROJECT_PRETTY_NAME "Run XDG Application")
+set(PROJECT_MAJOR_VERSION "1.0")
+set(PROJECT_MINOR_VERSION "1")
+set(PROJECT_VERSION "${PROJECT_MAJOR_VERSION}.${PROJECT_MINOR_VERSION}")
+
+add_definitions(-DTARGET_APP_ID=${TARGET_APP_ID})
+add_definitions(-DRUNXDG_NAME=${RUNXDG_NAME})
+
+set(CMAKE_CXX_FLAGS "-Wall -fpermissive")
+
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GLIB REQUIRED glib-2.0)
+pkg_check_modules(GIO REQUIRED gio-2.0)
+pkg_check_modules(GMODULE REQUIRED gmodule-2.0)
+
+INCLUDE(FindPkgConfig)
+
+INCLUDE_DIRECTORIES(
+ include
+ ${libsystemd_INCLUDE_DIRS}
+ ${GLIB_INCLUDE_DIRS}
+ ${GIO_INCLUDE_DIRS}
+ )
+
+LINK_DIRECTORIES(
+ ${GLIB_LIBRARY_DIRS}
+ ${GIO_LIBRARY_DIRS}
+ )
+
+PKG_CHECK_MODULES(libsystemd libsystemd>=222)
+
+SET(LIBRARIES
+ libwindowmanager.so
+ libhomescreen.so
+ libilmControl.so
+ libilmCommon.so
+ libafbwsc.so
+ libjson-c.so
+ libEGL.so
+ libGLESv2.so
+ libwayland-egl.so
+ libwayland-client.so
+ ${libsystemd_LDFLAGS}
+ libpthread.so
+ ${GLIB_LIBRARIES}
+ ${GIO_LIBRARIES}
+)
+
+SET(SRC_FILES
+ src/runxdg.cpp
+)
+
+add_executable(${PROJECT_NAME} ${SRC_FILES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBRARIES})
+
+add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
+ COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/package ${PROJECT_BINARY_DIR})
+
+add_custom_target(widget DEPENDS ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}/config.xml
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/${PROJECT_NAME} ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}/bin/${PROJECT_NAME}
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}.wgt ${PROJECT_BINARY_DIR}/package/${PROJECT_NAME}
+
+ # override hvac to test runxdg
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/hvac/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/${PROJECT_NAME} ${PROJECT_BINARY_DIR}/package/hvac/bin/hvac
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/hvac.wgt ${PROJECT_BINARY_DIR}/package/hvac
+
+ # override navigation to test runxdg
+ COMMAND mkdir -p ${PROJECT_BINARY_DIR}/package/navi/bin
+ COMMAND cp -rf ${PROJECT_BINARY_DIR}/${PROJECT_NAME} ${PROJECT_BINARY_DIR}/package/navi/bin/navi
+ COMMAND wgtpkg-pack -f -o ${PROJECT_BINARY_DIR}/package/navi.wgt ${PROJECT_BINARY_DIR}/package/navi
+)
+
+install (TARGETS ${PROJECT_NAME} DESTINATION bin)
diff --git a/xdg-launcher/README.txt b/xdg-launcher/README.txt
new file mode 100644
index 0000000..f7d9f56
--- /dev/null
+++ b/xdg-launcher/README.txt
@@ -0,0 +1,36 @@
+
+
+How to build
+
+
+1. make build directory
+ $ mkdir build
+ $ cd build
+
+2. do cmake
+ $ cmake -D TARGET_APP_ID='"<app id>"' -D RUNXDG_NAME='"<app name>"' ..
+
+ <app id> is id by appfw
+ <app name> is id by window manager
+
+ Example) Launching weston-simple-egl@0.1 with Navigaiton's layout
+ $ cmake -D TARGET_APP_ID='"weston-simple-egl@0.1"' -D RUNXDG_NAME='"Navigation"' ..
+
+ If you want own app name for layout, modify layout.json in windo manager and rebuild it.
+
+ You can confirm ids which you set by log like following:
+
+ Dec 08 01:33:59 qemux86-64 afbd-navigation@0.1[775]: DEBUG: runxdg: name(Navigation), target("weston-simple-egl@0.1")
+
+3. make
+ $ make && make widget
+
+ The following wgt would be made.
+ - runxdg.wgt XDG Launcher
+ - navi.wgt for test, XDG Launcher installed as Navigation
+ - hvac.wgt for test, XDG Lanncher installed as HVAC
+
+You can confirm by log like following:
+
+Dec 08 01:33:59 qemux86-64 afbd-navigation@0.1[775]: DEBUG: runxdg: name(Navigation), target("weston-simple-egl@0.1")
+
diff --git a/xdg-launcher/package/hvac/config.xml b/xdg-launcher/package/hvac/config.xml
new file mode 100644
index 0000000..c3b82b9
--- /dev/null
+++ b/xdg-launcher/package/hvac/config.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="hvac" version="0.1">
+ <name>HVAC</name>
+ <icon src="icon.svg"/>
+ <content src="bin/hvac" type="application/vnd.agl.native"/>
+ <description>Launcher for XDG application on AGL HomeScreen 2017</description>
+ <author>Panasonic Corporation</author>
+ <license>MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ <param name="http://tizen.org/privilege/internal/dbus" value="required" />
+ </feature>
+</widget>
diff --git a/xdg-launcher/package/hvac/icon.svg b/xdg-launcher/package/hvac/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/xdg-launcher/package/hvac/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/xdg-launcher/package/navi/config.xml b/xdg-launcher/package/navi/config.xml
new file mode 100644
index 0000000..1d47736
--- /dev/null
+++ b/xdg-launcher/package/navi/config.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="navigation" version="0.1">
+ <name>Navigation</name>
+ <icon src="icon.svg"/>
+ <content src="bin/navi" type="application/vnd.agl.native"/>
+ <description>Launcher for XDG application on AGL HomeScreen 2017</description>
+ <author>Panasonic Corporation</author>
+ <license>MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ <param name="http://tizen.org/privilege/internal/dbus" value="required" />
+ </feature>
+</widget>
diff --git a/xdg-launcher/package/navi/icon.svg b/xdg-launcher/package/navi/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/xdg-launcher/package/navi/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/xdg-launcher/package/runxdg/config.xml b/xdg-launcher/package/runxdg/config.xml
new file mode 100644
index 0000000..f435346
--- /dev/null
+++ b/xdg-launcher/package/runxdg/config.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<widget xmlns="http://www.w3.org/ns/widgets" id="runxdg" version="0.1">
+ <name>runxdg</name>
+ <icon src="icon.svg"/>
+ <content src="bin/runxdg" type="application/vnd.agl.native"/>
+ <description>Launcher for XDG application on AGL HomeScreen 2017</description>
+ <author>Panasonic Corporation</author>
+ <license>MIT</license>
+ <feature name="urn:AGL:widget:required-api">
+ <param name="homescreen" value="ws" />
+ <param name="windowmanager" value="ws" />
+ </feature>
+ <feature name="urn:AGL:widget:required-permission">
+ <param name="urn:AGL:permission::public:no-htdocs" value="required" />
+ <param name="http://tizen.org/privilege/internal/dbus" value="required" />
+ </feature>
+</widget>
diff --git a/xdg-launcher/package/runxdg/icon.svg b/xdg-launcher/package/runxdg/icon.svg
new file mode 100644
index 0000000..91661a7
--- /dev/null
+++ b/xdg-launcher/package/runxdg/icon.svg
@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+
+<svg
+ xmlns:i="&amp;ns_ai;"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ x="0px"
+ y="0px"
+ viewBox="0 0 320 320"
+ style="enable-background:new 0 0 320 320;"
+ xml:space="preserve"
+ id="svg2"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="icon.svg"><metadata
+ id="metadata1292"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs1290" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1464"
+ id="namedview1288"
+ showgrid="false"
+ inkscape:zoom="0.7375"
+ inkscape:cx="-572.20339"
+ inkscape:cy="160"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="svg2" /><style
+ type="text/css"
+ id="style4">
+ .st0{display:none;}
+ .st1{display:inline;}
+ .st2{opacity:0.4;fill:url(#SVGID_1_);}
+ .st3{fill:url(#SVGID_2_);}
+ .st4{fill:#FFFFFF;}
+ .st5{font-family:'Roboto-Regular';}
+ .st6{font-size:25px;}
+ .st7{letter-spacing:6;}
+ .st8{fill:url(#SVGID_3_);}
+ .st9{fill:url(#SVGID_4_);}
+ .st10{fill:url(#SVGID_5_);}
+ .st11{fill:url(#SVGID_6_);}
+ .st12{fill:url(#SVGID_7_);}
+ .st13{fill:url(#SVGID_8_);}
+ .st14{fill:url(#SVGID_9_);}
+ .st15{fill:url(#SVGID_10_);}
+ .st16{fill:url(#SVGID_11_);}
+ .st17{fill:url(#SVGID_12_);}
+ .st18{fill:url(#SVGID_13_);}
+ .st19{fill:url(#SVGID_14_);}
+ .st20{fill:url(#SVGID_15_);}
+ .st21{fill:url(#SVGID_16_);}
+ .st22{fill:url(#SVGID_17_);}
+ .st23{fill:url(#SVGID_18_);}
+ .st24{opacity:0.29;}
+ .st25{fill:url(#SVGID_19_);}
+ .st26{fill:url(#SVGID_20_);}
+ .st27{fill:url(#SVGID_21_);}
+ .st28{fill:url(#SVGID_22_);}
+ .st29{fill:url(#SVGID_23_);}
+ .st30{fill:url(#SVGID_24_);}
+ .st31{fill:url(#SVGID_25_);}
+ .st32{fill:url(#SVGID_26_);}
+ .st33{fill:url(#SVGID_27_);}
+ .st34{fill:url(#SVGID_28_);}
+ .st35{fill:url(#SVGID_29_);}
+ .st36{fill:url(#SVGID_30_);}
+ .st37{fill:url(#SVGID_31_);}
+ .st38{fill:url(#SVGID_32_);}
+ .st39{fill:url(#SVGID_33_);}
+ .st40{fill:url(#SVGID_34_);}
+ .st41{fill:url(#SVGID_35_);}
+ .st42{fill:url(#SVGID_36_);}
+ .st43{opacity:0.4;fill:url(#SVGID_37_);}
+ .st44{fill:url(#SVGID_38_);}
+ .st45{fill:url(#SVGID_39_);}
+ .st46{fill:url(#SVGID_40_);}
+ .st47{fill:url(#SVGID_41_);}
+ .st48{fill:url(#SVGID_42_);}
+ .st49{fill:url(#SVGID_43_);}
+ .st50{fill:url(#SVGID_44_);}
+ .st51{display:inline;opacity:0.29;}
+ .st52{display:inline;fill:url(#SVGID_45_);}
+ .st53{display:inline;fill:url(#SVGID_46_);}
+ .st54{display:inline;fill:#FFFFFF;}
+ .st55{display:inline;fill:url(#SVGID_47_);}
+ .st56{display:inline;fill:url(#SVGID_48_);}
+ .st57{display:inline;fill:url(#SVGID_49_);}
+ .st58{display:inline;fill:url(#SVGID_50_);}
+ .st59{display:inline;fill:url(#SVGID_51_);}
+ .st60{display:inline;fill:url(#SVGID_52_);}
+ .st61{opacity:0.4;fill:url(#SVGID_53_);}
+ .st62{fill:url(#SVGID_54_);}
+ .st63{fill:url(#SVGID_55_);}
+ .st64{fill:url(#SVGID_56_);}
+ .st65{fill:url(#SVGID_57_);}
+ .st66{fill:url(#SVGID_58_);}
+ .st67{opacity:0.4;fill:url(#SVGID_59_);}
+ .st68{fill:url(#SVGID_60_);}
+ .st69{fill:url(#SVGID_61_);}
+ .st70{fill:url(#SVGID_62_);}
+ .st71{fill:url(#SVGID_63_);}
+ .st72{fill:url(#SVGID_64_);}
+ .st73{fill:url(#SVGID_65_);}
+ .st74{fill:url(#SVGID_66_);}
+ .st75{fill:url(#SVGID_67_);}
+ .st76{fill:url(#SVGID_68_);}
+ .st77{fill:url(#SVGID_69_);}
+ .st78{fill:url(#SVGID_70_);}
+ .st79{fill:url(#SVGID_71_);}
+ .st80{fill:url(#SVGID_72_);}
+ .st81{fill:url(#SVGID_73_);}
+ .st82{fill:url(#SVGID_74_);}
+ .st83{fill:url(#SVGID_75_);}
+ .st84{fill:url(#SVGID_76_);}
+ .st85{fill:url(#SVGID_77_);}
+ .st86{fill:url(#SVGID_78_);}
+ .st87{fill:url(#SVGID_79_);}
+ .st88{fill:url(#SVGID_80_);}
+ .st89{fill:url(#SVGID_81_);}
+ .st90{fill:url(#SVGID_82_);}
+ .st91{fill:url(#SVGID_83_);}
+ .st92{fill:url(#SVGID_84_);}
+ .st93{fill:url(#SVGID_85_);}
+ .st94{fill:url(#SVGID_86_);}
+ .st95{opacity:0.4;fill:url(#SVGID_87_);}
+ .st96{fill:url(#SVGID_88_);}
+ .st97{fill:url(#SVGID_89_);}
+ .st98{fill:url(#SVGID_90_);}
+ .st99{fill:url(#SVGID_91_);}
+ .st100{fill:url(#SVGID_92_);}
+ .st101{fill:url(#SVGID_93_);}
+ .st102{fill:url(#SVGID_94_);}
+ .st103{opacity:0.4;fill:url(#SVGID_95_);}
+ .st104{fill:url(#SVGID_96_);}
+ .st105{fill:url(#SVGID_97_);}
+ .st106{fill:url(#SVGID_98_);}
+ .st107{fill:url(#SVGID_99_);}
+ .st108{fill:url(#SVGID_100_);}
+ .st109{fill:url(#SVGID_101_);}
+ .st110{display:inline;fill:url(#SVGID_102_);}
+ .st111{display:inline;fill:url(#SVGID_103_);}
+ .st112{fill:url(#SVGID_104_);}
+ .st113{fill:url(#SVGID_105_);}
+ .st114{fill:url(#SVGID_106_);}
+ .st115{fill:url(#SVGID_107_);}
+ .st116{fill:url(#SVGID_108_);}
+ .st117{opacity:0.4;fill:url(#SVGID_109_);}
+ .st118{fill:url(#SVGID_110_);}
+ .st119{fill:url(#SVGID_111_);}
+ .st120{fill:url(#SVGID_112_);}
+ .st121{fill:url(#SVGID_113_);}
+ .st122{fill:url(#SVGID_114_);}
+ .st123{opacity:0.4;fill:url(#SVGID_115_);}
+ .st124{fill:url(#SVGID_116_);}
+ .st125{fill:url(#SVGID_117_);}
+ .st126{fill:url(#SVGID_118_);}
+ .st127{display:inline;fill:url(#SVGID_119_);}
+ .st128{display:inline;fill:url(#SVGID_120_);}
+ .st129{fill:url(#SVGID_121_);}
+ .st130{fill:url(#SVGID_122_);}
+</style><switch
+ id="switch6"><g
+ i:extraneous="self"
+ id="g8"><g
+ id="Multimedia_Inactive_copy"><circle
+ class="st24"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle884" /><linearGradient
+ id="SVGID_91_"
+ gradientUnits="userSpaceOnUse"
+ x1="115.9317"
+ y1="254.1836"
+ x2="256.3852"
+ y2="-133.5267"><stop
+ offset="0"
+ style="stop-color:#8BC53F"
+ id="stop887" /><stop
+ offset="2.015080e-02"
+ style="stop-color:#7CCB56;stop-opacity:0.9678"
+ id="stop889" /><stop
+ offset="6.089833e-02"
+ style="stop-color:#62D67D;stop-opacity:0.9028"
+ id="stop891" /><stop
+ offset="0.1057"
+ style="stop-color:#4BDFA0;stop-opacity:0.8312"
+ id="stop893" /><stop
+ offset="0.1543"
+ style="stop-color:#38E7BE;stop-opacity:0.7537"
+ id="stop895" /><stop
+ offset="0.2077"
+ style="stop-color:#28EED6;stop-opacity:0.6684"
+ id="stop897" /><stop
+ offset="0.2681"
+ style="stop-color:#1CF3E8;stop-opacity:0.572"
+ id="stop899" /><stop
+ offset="0.3394"
+ style="stop-color:#13F6F5;stop-opacity:0.4581"
+ id="stop901" /><stop
+ offset="0.4323"
+ style="stop-color:#0EF8FD;stop-opacity:0.3098"
+ id="stop903" /><stop
+ offset="0.6264"
+ style="stop-color:#0DF9FF;stop-opacity:0"
+ id="stop905" /></linearGradient><circle
+ class="st99"
+ cx="159.7"
+ cy="133.4"
+ r="101.9"
+ id="circle907" /><linearGradient
+ id="SVGID_92_"
+ gradientUnits="userSpaceOnUse"
+ x1="4.0481"
+ y1="287.9492"
+ x2="320.4859"
+ y2="-15.4029"
+ gradientTransform="matrix(1 5.464556e-03 -5.464556e-03 1 -2.0192 -3.0212)"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop910" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop912" /></linearGradient><path
+ class="st100"
+ d="M160,238.8c-0.2,0-0.4,0-0.6,0c-58-0.3-104.9-47.7-104.6-105.7C55.2,75.3,102.3,28.5,160,28.5 c0.2,0,0.4,0,0.6,0c58,0.3,104.9,47.7,104.6,105.7l0,0C264.8,192,217.7,238.8,160,238.8z M160,32.2 c-55.7,0-101.2,45.2-101.5,100.9c-0.3,55.9,45,101.7,100.9,102c0.2,0,0.4,0,0.6,0c55.7,0,101.2-45.2,101.5-100.9 c0.3-55.9-45-101.7-100.9-102C160.4,32.2,160.2,32.2,160,32.2z"
+ id="path914" /><g
+ id="g916"><text
+ transform="matrix(1 0 0 1 53.5841 284.7119)"
+ class="st4 st5 st6 st7"
+ id="text918">MULTIMEDIA</text>
+<linearGradient
+ id="SVGID_93_"
+ gradientUnits="userSpaceOnUse"
+ x1="140.5445"
+ y1="202.2363"
+ x2="186.8444"
+ y2="68.7049"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop921" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop923" /></linearGradient><path
+ class="st101"
+ d="M114.5,190.9c-6.4,0-12-2.6-14.8-7.5c-2.9-4.9-5.4-14.5,9.6-23.2c4.8-2.8,17.1-3.9,20.8-4l0.1,3.6 c-4.6,0.1-15.5,1.4-19.1,3.5c-9.4,5.4-12.1,11.5-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2c6.6-3.8,10.6-10.5,10.7-17.9l-0.1-0.7V95.4 l71.9-14.2l0.1,71.3c0,6.7-3.3,16.4-12.5,21.8c-11.1,6.4-24.1,4.8-28.9-3.5c-2.9-4.9-5.4-14.5,9.6-23.2 c4.4-2.5,14.4-3.8,18.8-3.9l0.1,3.6c-4.2,0.1-13.5,1.4-17.1,3.5c-6.4,3.7-13.1,9.9-8.3,18.3c3.8,6.6,14.6,7.6,24,2.2 c7.9-4.5,10.7-12.8,10.7-18.5l-0.1-0.8V85.6l-64.7,12.7v66.8l0.1,0.7c0,8.7-4.7,16.6-12.5,21.1 C123.9,189.6,119,190.9,114.5,190.9z"
+ id="path925" /><linearGradient
+ id="SVGID_94_"
+ gradientUnits="userSpaceOnUse"
+ x1="145.3286"
+ y1="203.8951"
+ x2="191.6285"
+ y2="70.3637"><stop
+ offset="0"
+ style="stop-color:#59FF7F"
+ id="stop928" /><stop
+ offset="1"
+ style="stop-color:#6BFBFF"
+ id="stop930" /></linearGradient><polygon
+ class="st102"
+ points="155.6,123.3 154.8,119.8 195.5,110.2 196.3,113.7 "
+ id="polygon932" /></g></g></g></switch></svg> \ No newline at end of file
diff --git a/xdg-launcher/src/runxdg.cpp b/xdg-launcher/src/runxdg.cpp
new file mode 100644
index 0000000..7fca08c
--- /dev/null
+++ b/xdg-launcher/src/runxdg.cpp
@@ -0,0 +1,429 @@
+/*
+ * Copyright (c) 2017 Panasonic Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+
+#include <cstdio>
+
+#include "runxdg.hpp"
+
+#define AFM_DBUS_SERVICE "org.AGL.afm.user"
+#define AFM_DBUS_PATH "/org/AGL/afm/user"
+#define AFM_DBUS_INTERFACE "org.AGL.afm.user"
+
+#ifdef TARGET_APP_ID
+std::string target_app_id("\"" TARGET_APP_ID "\"");
+#else
+// for test
+std::string target_app_id("\"" weston-simple-egl@0.1 "\"");
+#endif
+
+#ifdef RUNXDG_NAME
+std::string app_name(RUNXDG_NAME);
+#else
+// for test
+std::string app_name("Navigation");
+#endif
+
+void fatal(const char* format, ...)
+{
+ va_list va_args;
+ va_start(va_args, format);
+ vfprintf(stderr, format, va_args);
+ va_end(va_args);
+
+ exit(EXIT_FAILURE);
+}
+
+void warn(const char* format, ...)
+{
+ va_list va_args;
+ va_start(va_args, format);
+ vfprintf(stderr, format, va_args);
+ va_end(va_args);
+}
+
+void debug(const char* format, ...)
+{
+ va_list va_args;
+ va_start(va_args, format);
+ vfprintf(stderr, format, va_args);
+ va_end(va_args);
+}
+
+void RunXDG::notify_ivi_control_cb (ilmObjectType object, t_ilm_uint id,
+ t_ilm_bool created)
+{
+ if (object == ILM_SURFACE) {
+ struct ilmSurfaceProperties surf_props;
+
+ ilm_getPropertiesOfSurface(id, &surf_props);
+ pid_t surf_pid = surf_props.creatorPid;
+
+ if (!created) {
+ AGL_DEBUG("ivi surface (id=%d, pid=%d) destroyed.", id, surf_pid);
+ m_surfaces.erase(surf_pid);
+ return;
+ }
+
+ if (m_afm->m_rid == surf_pid) {
+ setup_surface(id);
+ }
+
+ m_surfaces[surf_pid] = id;
+ AGL_DEBUG("ivi surface (id=%d, pid=%d) is created.", id, surf_pid);
+ } else if (object == ILM_LAYER) {
+ if (created)
+ AGL_DEBUG("ivi layer: %d created.", id);
+ else
+ AGL_DEBUG("ivi layer: %d destroyed.", id);
+ }
+}
+
+void RunXDG::notify_ivi_control_cb_static (ilmObjectType object, t_ilm_uint id,
+ t_ilm_bool created, void *user_data)
+{
+ RunXDG *runxdg = static_cast<RunXDG*>(user_data);
+ runxdg->notify_ivi_control_cb(object, id, created);
+}
+
+int AFMDBus::get_dbus_message_bus (GBusType bus_type, GDBusConnection * &conn)
+{
+ GError* err = NULL;
+
+ conn = g_bus_get_sync(bus_type, NULL, &err);
+ if (err) {
+ AGL_WARN("Failed to get session bus: %s", err->message);
+ g_clear_error (&err);
+ return -1;
+ }
+
+ return 0;
+}
+
+int AFMDBus::launch (std::string &name)
+{
+ GDBusMessage* msg;
+ GDBusMessage* re;
+ GDBusConnection* conn;
+ GError* err = NULL;
+ GVariant* body;
+ char* val;
+ const char* xdg_app = name.c_str();
+
+ if (get_dbus_message_bus(G_BUS_TYPE_SESSION, conn)) {
+ return -1;
+ }
+
+ msg = g_dbus_message_new_method_call (
+ AFM_DBUS_SERVICE,
+ AFM_DBUS_PATH,
+ AFM_DBUS_INTERFACE,
+ "start");
+
+ if (msg == NULL) {
+ AGL_WARN("Failed to allocate the dbus message");
+ g_object_unref(conn);
+ return -1;
+ }
+
+ g_dbus_message_set_body(msg, g_variant_new("(s)", xdg_app));
+
+ re = g_dbus_connection_send_message_with_reply_sync (
+ conn, msg, G_DBUS_SEND_MESSAGE_FLAGS_NONE, -1, NULL, NULL, &err);
+
+ if (err != NULL) {
+ AGL_WARN("unable to send message: %s", err->message);
+ g_clear_error(&err);
+ g_object_unref(conn);
+ g_object_unref(msg);
+ return -1;
+ }
+
+ g_dbus_connection_flush_sync(conn, NULL, &err);
+ if (err != NULL) {
+ AGL_WARN("unable to flush message queue: %s", err->message);
+ g_object_unref(conn);
+ g_object_unref(msg);
+ g_object_unref(re);
+ return -1;
+ }
+
+ body = g_dbus_message_get_body(re);
+ g_variant_get(body, "(&s)", &val);
+
+ AGL_DEBUG("dbus message get (%s)", val);
+
+ m_rid = std::stol(std::string(val));
+ AGL_DEBUG("RID = %d", m_rid);
+
+ g_object_unref(conn);
+ g_object_unref(msg);
+ g_object_unref(re);
+
+ return 0;
+}
+
+volatile sig_atomic_t e_flag = 0;
+
+static void sigterm_handler (int signum)
+{
+ e_flag = 1;
+}
+
+static void init_signal (void)
+{
+ struct sigaction act, info;
+
+ /* Setup signal for SIGTERM */
+ if (!sigaction(SIGTERM, NULL, &info)) {
+ if (info.sa_handler == SIG_IGN) {
+ AGL_DEBUG("SIGTERM being ignored.");
+ } else if (info.sa_handler == SIG_DFL) {
+ AGL_DEBUG("SIGTERM being defaulted.");
+ }
+ }
+
+ act.sa_handler = &sigterm_handler;
+ if (sigemptyset(&act.sa_mask) != 0) {
+ AGL_FATAL("Cannot initialize sigaction");
+ }
+ act.sa_flags = 0;
+
+ if (sigaction(SIGTERM, &act, &info) != 0) {
+ AGL_FATAL("Cannot register signal handler for SIGTERM");
+ }
+}
+
+int RunXDG::init_wm (void)
+{
+ m_wm = new LibWindowmanager();
+ if (m_wm->init(m_port, m_token.c_str())) {
+ AGL_DEBUG("cannot initialize windowmanager");
+ return -1;
+ }
+
+ std::function< void(json_object*) > h_active= [](json_object* object) {
+ AGL_DEBUG("Got Event_Active");
+ };
+
+ std::function< void(json_object*) > h_inactive= [](json_object* object) {
+ AGL_DEBUG("Got Event_Inactive");
+ };
+
+ std::function< void(json_object*) > h_visible= [](json_object* object) {
+ AGL_DEBUG("Got Event_Visible");
+ };
+
+ std::function< void(json_object*) > h_invisible= [](json_object* object) {
+ AGL_DEBUG("Got Event_Invisible");
+ };
+
+ std::function< void(json_object*) > h_syncdraw = [this](json_object* object) {
+ AGL_DEBUG("Got Event_SyncDraw");
+ json_object* obj = json_object_new_object();
+ json_object_object_add(obj, this->m_wm->kKeyDrawingName,
+ json_object_new_string(app_name.c_str()));
+ this->m_wm->endDraw(obj);
+ };
+
+ std::function< void(json_object*) > h_flushdraw= [](json_object* object) {
+ AGL_DEBUG("Got Event_FlushDraw");
+ };
+
+ m_wm->set_event_handler(LibWindowmanager::Event_Active, h_active);
+ m_wm->set_event_handler(LibWindowmanager::Event_Inactive, h_inactive);
+ m_wm->set_event_handler(LibWindowmanager::Event_Visible, h_visible);
+ m_wm->set_event_handler(LibWindowmanager::Event_Invisible, h_invisible);
+ m_wm->set_event_handler(LibWindowmanager::Event_SyncDraw, h_syncdraw);
+ m_wm->set_event_handler(LibWindowmanager::Event_FlushDraw, h_flushdraw);
+
+ return 0;
+}
+
+int RunXDG::init_hs (void)
+{
+ m_hs = new LibHomeScreen();
+ if (m_hs->init(m_port, m_token.c_str())) {
+ AGL_DEBUG("cannot initialize homescreen");
+ return -1;
+ }
+
+ std::function< void(json_object*) > handler = [this] (json_object* object) {
+ json_object *val;
+
+ if (json_object_object_get_ex(object, "application_name", &val)) {
+ const char *name = json_object_get_string(val);
+
+ AGL_DEBUG("Event_TapShortcut <%s>", name);
+
+ if (strcmp(name, app_name.c_str()) == 0) {
+ AGL_DEBUG("Activesurface %s ", app_name.c_str());
+
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, this->m_wm->kKeyDrawingName,
+ json_object_new_string(app_name.c_str()));
+ json_object_object_add(obj, this->m_wm->kKeyDrawingArea,
+ json_object_new_string("normal.full"));
+
+ this->m_wm->activateSurface(obj);
+ }
+ }
+ };
+ m_hs->set_event_handler(LibHomeScreen::Event_TapShortcut, handler);
+
+ std::function< void(json_object*) > h_default= [](json_object* object) {
+ const char *j_str = json_object_to_json_string(object);
+ AGL_DEBUG("Got event [%s]", j_str);
+ };
+ m_hs->set_event_handler(LibHomeScreen::Event_OnScreenMessage, h_default);
+
+ return 0;
+}
+
+RunXDG::RunXDG (int bus_type, int port, const char* &token)
+{
+ m_port = port;
+ m_token = std::string(token);
+
+ /* Setup API of AFM */
+ if (bus_type == AFM_DBUS)
+ m_afm = new AFMDBus();
+ else
+ m_afm = new AFMWebSocket();
+
+ // Setup HomeScreen/WindowManager API
+ if (init_wm())
+ AGL_FATAL("cannot setup wm API");
+
+ if (init_hs())
+ AGL_FATAL("cannot setup hs API");
+
+ // Setup ilmController API
+ m_ic = new ILMControl(notify_ivi_control_cb_static, this);
+
+ AGL_DEBUG("RunXDG created.");
+}
+
+void RunXDG::setup_surface (int id)
+{
+ std::string sid = std::to_string(id);
+
+ // This surface is mine, register pair app_name and ivi id.
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, m_wm->kKeyDrawingName,
+ json_object_new_string(app_name.c_str()));
+ json_object_object_add(obj, m_wm->kKeyIviId,
+ json_object_new_string(sid.c_str()));
+ AGL_DEBUG("reqestSurfaceXDG(%s,%s)", app_name.c_str(), sid.c_str());
+ m_wm->requestSurfaceXDG(obj);
+
+ if (m_pending_create) {
+ // Recovering 1st time tap_shortcut is dropped because
+ // the application has not been run yet (1st time launch)
+ m_pending_create = false;
+
+ json_object *obj = json_object_new_object();
+ json_object_object_add(obj, m_wm->kKeyDrawingName,
+ json_object_new_string(app_name.c_str()));
+ json_object_object_add(obj, m_wm->kKeyDrawingArea,
+ json_object_new_string("normal.full"));
+ m_wm->activateSurface(obj);
+ }
+}
+
+void RunXDG::start (void)
+{
+ // Initialize SIGTERM handler
+ init_signal();
+
+ /* Launch XDG application */
+ int ret;
+
+ ret = m_afm->launch(target_app_id);
+ if (ret < 0) {
+ AGL_FATAL("cannot launch XDG app (%s)", target_app_id);
+ }
+
+ // take care 1st time launch
+ m_pending_create = true;
+ AGL_DEBUG("waiting for notification: surafce created");
+
+ // in case, target app has already run
+ auto itr = m_surfaces.find(m_afm->m_rid);
+ if (itr != m_surfaces.end()) {
+ int id = itr->second;
+ AGL_DEBUG("surface %d for <%s> already exists", id, app_name.c_str());
+ setup_surface(id);
+ }
+
+ /* sleep until terminate */
+ while (!e_flag) {
+ sleep(60*60*24);
+ }
+
+ if (e_flag) {
+ AGL_DEBUG("recieved SIGTERM");
+ }
+}
+
+int main (int argc, const char* argv[])
+{
+ AGL_DEBUG("runxdg: name(%s), target(%s)", app_name.c_str(),
+ target_app_id.c_str());
+
+ // Set debug flags
+ setenv("USE_HMI_DEBUG", "5", 1);
+ // setenv("WAYLAND_DEBUG", "1", 1);
+
+ // Parse args
+ long port;
+ const char* token;
+
+ if (argc < 3) {
+ AGL_FATAL("Missing port and token");
+ }
+
+ try {
+ port = std::stol(argv[1]);
+ token = argv[2];
+ } catch (const std::invalid_argument& e) {
+ AGL_FATAL("Invalid argument");
+ } catch (const std::out_of_range& e) {
+ AGL_FATAL("Out of range");
+ }
+
+ AGL_DEBUG("port=%lu, token=[%s]", port, token);
+ RunXDG runxdg(AFM_DBUS, port, token);
+
+ runxdg.start();
+
+ AGL_DEBUG("terminated.\n");
+
+ return 0;
+}
+
diff --git a/xdg-launcher/src/runxdg.hpp b/xdg-launcher/src/runxdg.hpp
new file mode 100644
index 0000000..df8f51c
--- /dev/null
+++ b/xdg-launcher/src/runxdg.hpp
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2017 Panasonic Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all
+ * copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+#ifndef RUNXDG_HPP
+#define RUNXDG_HPP
+
+#include <string>
+#include <map>
+
+#include <gio/gio.h>
+
+#include <ilm/ilm_control.h>
+
+#include <libwindowmanager.h>
+#include <libhomescreen.hpp>
+
+#define AGL_FATAL(fmt, ...) fatal("ERROR: " fmt "\n", ##__VA_ARGS__)
+#define AGL_WARN(fmt, ...) warn("WARNING: " fmt "\n", ##__VA_ARGS__)
+#define AGL_DEBUG(fmt, ...) debug("DEBUG: " fmt "\n", ##__VA_ARGS__)
+#define AGL_TRACE(file,line) debug("%s:%d\n", file,line);
+
+void fatal (const char* format, ...);
+void warn (const char* format, ...);
+void debug (const char* format, ...);
+
+class ILMControl
+{
+ public:
+ ILMControl(notificationFunc callback, void *user_data) {
+ ilm_init();
+ ilm_registerNotification(callback, user_data);
+ }
+
+ ~ILMControl(void) {
+ ilm_unregisterNotification();
+ ilm_destroy();
+ AGL_DEBUG("ilm_destory().\n");
+ }
+};
+
+class AFM
+{
+ public:
+ virtual int launch(std::string &name) = 0;
+
+ int m_rid;
+};
+
+class AFMDBus : public AFM
+{
+ public:
+ int launch(std::string &name);
+ private:
+ int get_dbus_message_bus(GBusType bus_type, GDBusConnection* &conn);
+};
+
+class AFMWebSocket : public AFM
+{
+ // not implemented yet
+ public:
+ int launch(std::string &name) { return 0; }
+};
+
+enum {
+ AFM_DBUS,
+ AFM_WEBSOCKET,
+};
+
+class RunXDG
+{
+ public:
+ RunXDG(int bus_type, int port, const char* &token);
+
+ void start(void);
+ void notify_ivi_control_cb(ilmObjectType object, t_ilm_uint id,
+ t_ilm_bool created);
+ static void notify_ivi_control_cb_static (ilmObjectType object,
+ t_ilm_uint id,
+ t_ilm_bool created,
+ void *user_data);
+ private:
+ std::string m_name;
+ int m_port;
+ std::string m_token;
+
+ AFM *m_afm;
+
+ LibWindowmanager *m_wm;
+ LibHomeScreen *m_hs;
+ ILMControl *m_ic;
+
+ std::map<int, int> m_surfaces; // pair of <afm:rid, ivi:id>
+
+ bool m_pending_create = false;
+
+ int init_wm(void);
+ int init_hs(void);
+
+ void setup_surface(int id);
+};
+
+#endif // RUNXDG_HPP