summaryrefslogtreecommitdiff
path: root/SDL_Core/src/components/qt_hmi/References/Work
diff options
context:
space:
mode:
Diffstat (limited to 'SDL_Core/src/components/qt_hmi/References/Work')
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore11
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/BananaSnacks.pro21
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas.desktop11
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas64.pngbin0 -> 3400 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.pngbin0 -> 4945 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas_harmattan.desktop11
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/README.md37
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/bananas.qmlproject19
-rwxr-xr-xSDL_Core/src/components/qt_hmi/References/Work/bananasnacks/fetch_plugins.sh8
-rwxr-xr-xSDL_Core/src/components/qt_hmi/References/Work/bananasnacks/load_env.sh1
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/main.cpp17
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/mediacore/qmldir2
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/navcore/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/phonecore/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/sdlcore/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/AddIcon.pngbin0 -> 4369 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.pngbin0 -> 2975 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.pngbin0 -> 6876 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.pngbin0 -> 10475 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.pngbin0 -> 16926 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.pngbin0 -> 13849 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.pngbin0 -> 4471 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.pngbin0 -> 3848 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.pngbin0 -> 49513 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.pngbin0 -> 1035032 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.pngbin0 -> 16044 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.pngbin0 -> 5932 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.pngbin0 -> 2890 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.pngbin0 -> 8217 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.pngbin0 -> 7355 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.pngbin0 -> 6218 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.pngbin0 -> 3072 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.pngbin0 -> 5305 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.pngbin0 -> 4473 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.pngbin0 -> 5374 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.pngbin0 -> 5073 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.pngbin0 -> 6456 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.pngbin0 -> 3115 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.pngbin0 -> 3992 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.pngbin0 -> 4974 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.pngbin0 -> 55017 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.pngbin0 -> 4821 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.pngbin0 -> 6918 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.pngbin0 -> 2826 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.pngbin0 -> 4156 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.pngbin0 -> 7277 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.pngbin0 -> 4759 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.pngbin0 -> 5748 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.pngbin0 -> 3020 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.pngbin0 -> 4517 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.pngbin0 -> 9198 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.pngbin0 -> 5831 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.pngbin0 -> 5807 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.pngbin0 -> 3092 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.pngbin0 -> 8684 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.pngbin0 -> 6611 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.pngbin0 -> 395 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.pngbin0 -> 7897 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.pngbin0 -> 5832 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.pngbin0 -> 3149 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.pngbin0 -> 6570 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.pngbin0 -> 5976 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.pngbin0 -> 3592 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.pngbin0 -> 31003 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.pngbin0 -> 4741 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.pngbin0 -> 7070 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.pngbin0 -> 7500 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.pngbin0 -> 4767 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.pngbin0 -> 8214 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.pngbin0 -> 4698 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/BackButton.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Button.qml32
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/CheckButton.qml36
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Clickable.qml24
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/GraphicalButton.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H1.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H2.qml9
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/ImageButton.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Key.qml7
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keyboard.qml129
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keypad.qml43
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/MediaBrowser.qml40
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/OverflowableText.qml46
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButton.qml30
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButtonGroup.qml5
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Section.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextBox.qml29
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextEntry.qml72
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Weather.qml34
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/EmptyLayout.qml16
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/LeftThirdSection.qml16
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaLayout.qml59
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaPlayerLayout.qml34
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/TitledLayout.qml14
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/.usb.qml.swpbin0 -> 12288 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/Browse/artists.qml6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/applink.qml29
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/bluetooth.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/fm.qml46
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/menu.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/sirius.qml13
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/usb.qml59
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/.menu.qml.swpbin0 -> 12288 bytes
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/favorites.qml70
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/keyboard_search.qml64
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/map.qml63
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/menu.qml57
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/poi.qml205
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/recent_destinations.qml70
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/video_moving_map.qml20
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/device_info.qml21
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/discovery.qml23
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/keypad.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/manage_devices.qml16
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/menu.qml54
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/recent_calls.qml62
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Vehicle/menu.qml60
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/alert.qml68
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/chrome.qml144
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home.qml51
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml133
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/media.qml55
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/navigation.qml49
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/phone.qml37
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/vehicle.qml17
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/main.qml79
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.cpp70
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h33
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/.gitignore5
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/FordSdlCore.pro48
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.cpp470
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.h87
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.cpp792
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.h170
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.pro21
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.vcproj328
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.cpp31
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.h16
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/qmldir3
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.cpp6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.h18
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.cpp6
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.h47
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.cpp263
-rw-r--r--SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.h75
145 files changed, 5078 insertions, 0 deletions
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore
new file mode 100644
index 000000000..ba926494c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/.gitignore
@@ -0,0 +1,11 @@
+*.o
+*.pri
+*.so
+*.dll
+.DS_Store
+
+/BananaSnacks.app
+/BananaSnacks
+/BananaSnacks.pro.user
+Makefile
+moc_*.cpp
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/BananaSnacks.pro b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/BananaSnacks.pro
new file mode 100644
index 000000000..c20d41ede
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/BananaSnacks.pro
@@ -0,0 +1,21 @@
+# Add more folders to ship with the application, here
+folder_01.source = qml/Bananas
+folder_01.target = qml
+
+folder_02.source = plugins/com
+folder_02.target = plugins
+DEPLOYMENTFOLDERS = folder_01 folder_02
+
+SOURCES += main.cpp
+
+linux-g++* {
+ QMAKE_CXXFLAGS += -m32
+ QMAKE_LFLAGS += -m32 -L/usr/lib/i386-linux-gnu/mesa
+}
+
+# Please do not modify the following two lines. Required for deployment.
+include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
+qtcAddDeployment()
+
+OTHER_FILES += \
+ qml/Bananas/Layouts/TitledLayout.qml
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas.desktop b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas.desktop
new file mode 100644
index 000000000..a7bfa0111
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Bananas
+Exec=/opt/Bananas/bin/Bananas
+Icon=Bananas64
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas64.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas64.png
new file mode 100644
index 000000000..707d5c4e8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas64.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.png
new file mode 100644
index 000000000..6ad8096c4
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas80.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas_harmattan.desktop b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas_harmattan.desktop
new file mode 100644
index 000000000..5ced151d0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/Bananas_harmattan.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Bananas
+Exec=/usr/bin/single-instance /opt/Bananas/bin/Bananas
+Icon=/usr/share/icons/hicolor/80x80/apps/Bananas80.png
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/README.md b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/README.md
new file mode 100644
index 000000000..993a4bf59
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/README.md
@@ -0,0 +1,37 @@
+#### sudo vi /etc/apt/apt.conf
+
+``ruby
+Acquire::http::proxy "http://proxyvipecc.nb.ford.com:83";
+Acquire::https::proxy "https://proxyvipecc.nb.ford.com:83";
+``
+
+``bash
+sudo apt-get update
+sudo apt-get install git vim build-essential mesa-common-dev libgl1-mesa-dev # for 64bit: libc6-dev-i386 lib32stdc++6 lib32stdc++6-4.7-dev libgl1-mesa-dev:i386
+
+ssh-keygen
+<enter x3>
+cat ~/.ssh/id_rsa.pub # Save this as a public ssh key on your Gitlab account
+
+git clone git@devbox.pd8.ford.com:zchurch/bananasnacks.git # Type 'yes' to trust the remote host
+
+wget http://releases.qt-project.org/qt5/5.0.1/qt-linux-opensource-5.0.1-x86-offline.run
+chmod +x qt-linux-opensource-5.0.1-x86-offline.run
+./qt-linux-opensource-5.0.1-x86-offline.run # Press next, accept, etc... Do install the Tools. This includes Creator.
+
+echo "export PATH=\$PATH:~/Qt5.0.1/5.0.1/gcc/bin" >> ~/.bashrc
+
+cd ~/bananasnacks
+./fetch_plugins.sh
+qmake
+make
+./Bananas
+
+``
+
+
+### Troubleshooting
+
+#### bash: ./qt-linux-opensource-5.0.1-x86-offline.run: No such file or directory
+You didn't install all your apt-get things. You're missing ia32-libs. Or the file isn't there.
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/bananas.qmlproject b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/bananas.qmlproject
new file mode 100644
index 000000000..f9502d2a9
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/bananas.qmlproject
@@ -0,0 +1,19 @@
+import QmlProject 1.1
+
+Project {
+ mainFile: "qml/Bananas/main.qml"
+
+ QmlFiles {
+ directory: "."
+ }
+
+ JavaScriptFiles {
+ directory: "."
+ }
+
+ ImageFiles {
+ directory: "."
+ }
+
+ importPaths: [ "plugins" ]
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/fetch_plugins.sh b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/fetch_plugins.sh
new file mode 100755
index 000000000..0f90baeb5
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/fetch_plugins.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+wget http://19.7.95.92/uploads/note/attachment/12/libFordMediaCore.so
+chmod 775 libFordMediaCore.so
+mv libFordMediaCore.so plugins/com/ford/mediacore
+
+wget http://19.7.95.92/uploads/note/attachment/11/libFordPhoneCore.so
+chmod 775 libFordPhoneCore.so
+mv libFordPhoneCore.so plugins/com/ford/phonecore
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/load_env.sh b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/load_env.sh
new file mode 100755
index 000000000..0f094b527
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/load_env.sh
@@ -0,0 +1 @@
+# source ./load_env.sh
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/main.cpp b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/main.cpp
new file mode 100644
index 000000000..faa3f175b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/main.cpp
@@ -0,0 +1,17 @@
+#include <QtGui/QGuiApplication>
+#include <QQmlContext>
+#include "qtquick2applicationviewer.h"
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QtQuick2ApplicationViewer viewer;
+
+ viewer.addImportPath(QStringLiteral("plugins"));
+
+ viewer.setMainQmlFile(QStringLiteral("qml/Bananas/main.qml"));
+ viewer.showExpanded();
+
+ return app.exec();
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/mediacore/qmldir b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/mediacore/qmldir
new file mode 100644
index 000000000..bb93f4093
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/mediacore/qmldir
@@ -0,0 +1,2 @@
+module com.ford.mediacore
+plugin FordMediaCore
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/navcore/qmldir b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/navcore/qmldir
new file mode 100644
index 000000000..aaacfe020
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/navcore/qmldir
@@ -0,0 +1,3 @@
+module com.ford.navcore
+plugin FordNavCore
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/phonecore/qmldir b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/phonecore/qmldir
new file mode 100644
index 000000000..861f2e223
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/phonecore/qmldir
@@ -0,0 +1,3 @@
+module com.ford.phonecore
+plugin FordPhoneCore
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/sdlcore/qmldir b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/sdlcore/qmldir
new file mode 100644
index 000000000..da1a7b7f9
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/plugins/com/ford/sdlcore/qmldir
@@ -0,0 +1,3 @@
+module com.ford.sdlcore
+plugin FordSdlCore
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/AddIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/AddIcon.png
new file mode 100644
index 000000000..7111c7c93
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/AddIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.png
new file mode 100644
index 000000000..d8e607968
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BackIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.png
new file mode 100644
index 000000000..1a65f0751
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/BluetoothIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.png
new file mode 100644
index 000000000..cfb6d6d59
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CMaxCal.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.png
new file mode 100644
index 000000000..91ed3ef6e
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeBottom.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.png
new file mode 100644
index 000000000..d7ba38ab8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ChromeTop.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.png
new file mode 100644
index 000000000..4555d71df
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Cloud.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.png
new file mode 100644
index 000000000..c21373f22
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/CloudNight.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.png
new file mode 100644
index 000000000..251db8a7a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/FunArtwork.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.png
new file mode 100644
index 000000000..2f8dc5130
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/MapMich.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.png
new file mode 100644
index 000000000..49a01feea
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Content/SiriusArtwork.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.png
new file mode 100644
index 000000000..52430d8c5
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Crosshairs.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.png
new file mode 100644
index 000000000..f47954968
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DeleteIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.png
new file mode 100644
index 000000000..caa648915
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/DndIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.png
new file mode 100644
index 000000000..6c5838989
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/EvIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.png
new file mode 100644
index 000000000..0871c5150
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/FavoritesIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.png
new file mode 100644
index 000000000..02548e946
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Forward.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.png
new file mode 100644
index 000000000..2bdd652e0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/HomeIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.png
new file mode 100644
index 000000000..c6797a440
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeyboardIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.png
new file mode 100644
index 000000000..b9ca08ad0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadEntryIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.png
new file mode 100644
index 000000000..a70ee397f
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/KeypadIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.png
new file mode 100644
index 000000000..3847da93c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/LightingIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.png
new file mode 100644
index 000000000..4405a629c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Loop.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.png
new file mode 100644
index 000000000..482b6821e
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MediaTab.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.png
new file mode 100644
index 000000000..5e86d80c7
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MessagesIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.png
new file mode 100644
index 000000000..525e4b915
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/MissingArtwork.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.png
new file mode 100644
index 000000000..4bce72138
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/NavigationTab.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.png
new file mode 100644
index 000000000..55498b913
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PandoraIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.png
new file mode 100644
index 000000000..bbede1990
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Pause.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.png
new file mode 100644
index 000000000..281e20a1f
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneCornerIcons.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.png
new file mode 100644
index 000000000..e4071e093
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneIcons.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.png
new file mode 100644
index 000000000..9b36907b3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhoneTab.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.png
new file mode 100644
index 000000000..6af9c1046
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PhonebookIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.png
new file mode 100644
index 000000000..1b665e363
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Play.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.png
new file mode 100644
index 000000000..b7b532db7
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/PoiIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.png
new file mode 100644
index 000000000..f66061020
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RadioIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.png
new file mode 100644
index 000000000..16a31b29b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentCallsIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.png
new file mode 100644
index 000000000..4351243d4
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RecentDestinationsIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.png
new file mode 100644
index 000000000..798f75480
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Rewind.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.png
new file mode 100644
index 000000000..b1d03d24a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/RightTurn.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.png
new file mode 100644
index 000000000..2c8e7cb2d
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ScoutIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.png
new file mode 100644
index 000000000..571d06c97
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SearchIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.png
new file mode 100644
index 000000000..caff60c58
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SeatsIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.png
new file mode 100644
index 000000000..63a5a6a9d
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/ServicesIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.png
new file mode 100644
index 000000000..4b3fc65c6
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/Shuffle.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.png
new file mode 100644
index 000000000..0ea120992
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SiriusIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.png
new file mode 100644
index 000000000..f871a9654
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/SpeedDialIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.png
new file mode 100644
index 000000000..8f0c759ed
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/UsbIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.png
new file mode 100644
index 000000000..79a277b18
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleCornerIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.png
new file mode 100644
index 000000000..b6fb90276
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VehicleTab.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.png
new file mode 100644
index 000000000..c27ac4a87
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VhrIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.png
new file mode 100644
index 000000000..c3f91de70
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/VoicemailIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.png
new file mode 100644
index 000000000..e3277af0a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WallpaperIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.png
new file mode 100644
index 000000000..97ce15688
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WifiIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.png b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.png
new file mode 100644
index 000000000..69e50caa3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Assets/WorkIcon.png
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/BackButton.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/BackButton.qml
new file mode 100644
index 000000000..61f031181
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/BackButton.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+ImageButton {
+ icon: "../Assets/BackIcon.png"
+ height: 42
+ width: 60
+ anchors.top: parent.top
+ anchors.left: parent.left
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Button.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Button.qml
new file mode 100644
index 000000000..7f3c30126
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Button.qml
@@ -0,0 +1,32 @@
+import QtQuick 2.0
+
+Rectangle {
+ signal press
+ property alias text: clickable.text
+ property alias textAnchors: clickable.textAnchors
+ property alias clickable: clickable
+ id: container
+ border.color: "#333"
+ border.width: 1
+ height: 45
+ width: 150
+ radius: 3
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: clickable.pressed ? "#3C1414" : Qt.rgba(0.18, 0.18, 0.18, 1)
+ }
+ GradientStop {
+ position: 1.0
+ color: clickable.pressed ? "#9C3335" : "black"
+ }
+ }
+ Clickable {
+ anchors.fill: parent
+ id: clickable
+ onPress: container.press()
+
+ textAnchors.horizontalCenter: horizontalCenter
+ textAnchors.verticalCenter: verticalCenter
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/CheckButton.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/CheckButton.qml
new file mode 100644
index 000000000..713d00d1b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/CheckButton.qml
@@ -0,0 +1,36 @@
+import QtQuick 2.0
+
+Rectangle {
+ signal press
+ property alias text: clickable.text
+
+ states: [
+ State {
+ name: 'pressed'
+ }
+ ]
+ id: container
+ border.color: "#333"
+ border.width: 1
+ height: 45
+ width: 150
+ radius: 3
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: (state === 'pressed' || clickable.pressed) ? "#3C1414" : Qt.rgba(0.18, 0.18, 0.18, 1)
+ }
+ GradientStop {
+ position: 1.0
+ color: (state === 'pressed' || clickable.pressed) ? "#9C3335" : "black"
+ }
+ }
+ Clickable {
+ anchors.fill: parent
+ id: clickable
+ onPress: { container.press(); container.state = (container.state === '') ? 'pressed' : '' }
+
+ textAnchors.horizontalCenter: horizontalCenter
+ textAnchors.verticalCenter: verticalCenter
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Clickable.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Clickable.qml
new file mode 100644
index 000000000..2fdc97d7c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Clickable.qml
@@ -0,0 +1,24 @@
+import QtQuick 2.0
+
+Item {
+ property alias text: text.text
+ property alias pressed: mousearea.pressed
+ property alias textAnchors: text.anchors
+ signal press
+
+ id: container
+
+ Text {
+ id: text
+ color: "white"
+ font.pixelSize: 16
+ }
+
+ MouseArea {
+ id: mousearea
+ width: parent.width
+ height: parent.height
+
+ onClicked: container.press()
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/GraphicalButton.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/GraphicalButton.qml
new file mode 100644
index 000000000..2e670682e
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/GraphicalButton.qml
@@ -0,0 +1,40 @@
+import QtQuick 2.0
+
+Rectangle {
+ signal press
+ property alias text: clickable.text
+ property alias image: image.source
+
+ id: container
+ border.color: "#333"
+ border.width: 1
+ height: 110
+ width: 150
+ radius: 3
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: clickable.pressed ? "#3C1414" : Qt.rgba(0.18, 0.18, 0.18, 1)
+ }
+ GradientStop {
+ position: 1.0
+ color: clickable.pressed ? "#9C3335" : "black"
+ }
+ }
+ Clickable {
+ anchors.fill: parent
+ id: clickable
+ onPress: container.press()
+
+ textAnchors.horizontalCenter: horizontalCenter
+ textAnchors.bottom: bottom
+ textAnchors.bottomMargin: 10
+
+ Image {
+ id: image
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H1.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H1.qml
new file mode 100644
index 000000000..b68c7f0f1
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H1.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+
+Text {
+ color: "#fff"
+ font.pixelSize: 32
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H2.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H2.qml
new file mode 100644
index 000000000..775838be0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/H2.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Text {
+ color: "#fff"
+ font.pixelSize: 24
+ anchors.margins: 20
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/ImageButton.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/ImageButton.qml
new file mode 100644
index 000000000..81c18a431
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/ImageButton.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+
+Button {
+ property alias icon: icon.source
+
+ width: icon.width + 30
+
+ Image {
+ id: icon
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Key.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Key.qml
new file mode 100644
index 000000000..7fe5dbab8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Key.qml
@@ -0,0 +1,7 @@
+import QtQuick 2.0
+
+Button {
+ width: 60
+
+ onPress: keyboard.letterClicked(text)
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keyboard.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keyboard.qml
new file mode 100644
index 000000000..fc5d26aa8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keyboard.qml
@@ -0,0 +1,129 @@
+import QtQuick 2.0
+
+Item {
+ signal letterClicked(string letter)
+ signal go()
+ id: keyboard
+
+ states: [
+ State {
+ name: 'numpad'
+ PropertyChanges {
+ target: qwerty
+ visible: false
+ }
+ PropertyChanges {
+ target: numpad
+ visible: true
+ }
+ }
+
+ ]
+
+ Column {
+ id: qwerty
+ anchors.fill: parent
+ spacing: 10
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "Q" }
+ Key { text: "W" }
+ Key { text: "E" }
+ Key { text: "R" }
+ Key { text: "T" }
+ Key { text: "Y" }
+ Key { text: "U" }
+ Key { text: "I" }
+ Key { text: "O" }
+ Key { text: "P" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "A" }
+ Key { text: "S" }
+ Key { text: "D" }
+ Key { text: "F" }
+ Key { text: "G" }
+ Key { text: "H" }
+ Key { text: "J" }
+ Key { text: "K" }
+ Key { text: "L" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "Z" }
+ Key { text: "X" }
+ Key { text: "C" }
+ Key { text: "V" }
+ Key { text: "B" }
+ Key { text: "N" }
+ Key { text: "M" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+ Button { text: "123"; width: 60
+ onPress: keyboard.state = 'numpad'
+ }
+ Button { text: "!@#"; width: 60 }
+ Key { text: " "; width: 300 }
+ Key { text: "." }
+ Key { text: "&" }
+ }
+ }
+
+ Column {
+ id: numpad
+ visible: false
+ anchors.fill: parent
+ spacing: 10
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "1" }
+ Key { text: "2" }
+ Key { text: "3" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "4" }
+ Key { text: "5" }
+ Key { text: "6" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "7" }
+ Key { text: "8" }
+ Key { text: "9" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Button {
+ text: "ABC"
+ width: 60
+ onPress: keyboard.state = ''
+ }
+ Key { text: "*" }
+ Key { text: "0" }
+ Key { text: "#" }
+ Button {
+ text: "Go"
+ width: 60
+ onPress: keyboard.go()
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keypad.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keypad.qml
new file mode 100644
index 000000000..0dc0115ac
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Keypad.qml
@@ -0,0 +1,43 @@
+import QtQuick 2.0
+
+Item {
+ signal letterClicked(string letter)
+ id: keyboard
+
+ Column {
+ anchors.fill: parent
+ spacing: 10
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "1" }
+ Key { text: "2" }
+ Key { text: "3" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "4" }
+ Key { text: "5" }
+ Key { text: "6" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "7" }
+ Key { text: "8" }
+ Key { text: "9" }
+ }
+ Row {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ Key { text: "*" }
+ Key { text: "0" }
+ Key { text: "#" }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/MediaBrowser.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/MediaBrowser.qml
new file mode 100644
index 000000000..f0ef3ed2a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/MediaBrowser.qml
@@ -0,0 +1,40 @@
+import QtQuick 2.0
+
+ListView {
+ id: listView
+ anchors.fill: parent
+ anchors.topMargin: 120
+ spacing: 10
+ clip: true
+ model: MediaModel
+
+ delegate: Button {
+ width: 500
+ anchors.horizontalCenter: parent.horizontalCenter
+ OverflowableText {
+ text: name
+ fontColor: "#fff"
+ font.pixelSize: 20
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ width: parent.width - 40
+ }
+ Text {
+ text: (model.count === 0) ? "" : model.count
+ anchors.right: parent.right
+ anchors.rightMargin: 20
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#fff"
+ }
+
+ onPress: {
+ if (model.is_file) {
+ MediaPlayer.setPlaylist(model.pid, model.index);
+ usb.state = '';
+ } else {
+ MediaModel.browseToChild(model.id)
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/OverflowableText.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/OverflowableText.qml
new file mode 100644
index 000000000..314994361
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/OverflowableText.qml
@@ -0,0 +1,46 @@
+import QtQuick 2.0
+import QtGraphicalEffects 1.0
+
+Rectangle {
+ id: oflow_text
+ property alias text: text.text
+ property alias font: text.font
+ property alias fontColor: text.color
+ property string textAlign
+ color: Qt.rgba(0,0,0,0)
+ height: text.font.pixelSize * 1.2
+ clip: true
+ Text {
+ id: text
+ Component.onCompleted: {
+ if (oflow_text.width < width) {
+ anchors.left = parent.left
+ }
+ else if (oflow_text.textAlign == 'center') {
+ anchors.horizontalCenter = parent.horizontalCenter
+ }
+ }
+
+ NumberAnimation on anchors.leftMargin {
+ id: scroll_animation
+ to: oflow_text.width - text.width
+ duration: ((oflow_text.width - text.width) < 0) ? (text.width - oflow_text.width) * 15 : 0
+ running: false
+ onStopped: {
+ restart_timer.start()
+ }
+ }
+ }
+
+ Timer {
+ id: scroll_timer
+ running: true
+ interval: 3000
+ onTriggered: { if (oflow_text.width < text.width) scroll_animation.start();}
+ }
+ Timer {
+ id: restart_timer
+ interval: 3000
+ onTriggered: text.anchors.leftMargin = 0
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButton.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButton.qml
new file mode 100644
index 000000000..676d65be3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButton.qml
@@ -0,0 +1,30 @@
+import QtQuick 2.0
+
+Rectangle {
+ signal press
+ property alias text: clickable.text
+ id: container
+ border.color: "#333"
+ border.width: 1
+ height: 45
+ width: 150
+ radius: 3
+ gradient: Gradient {
+ GradientStop {
+ position: 0.0
+ color: (container.focus || clickable.pressed) ? "#3C1414" : Qt.rgba(0.18, 0.18, 0.18, 1)
+ }
+ GradientStop {
+ position: 1.0
+ color: (container.focus || clickable.pressed) ? "#9C3335" : "black"
+ }
+ }
+ Clickable {
+ anchors.fill: parent
+ id: clickable
+ onPress: { container.forceActiveFocus(); container.press(); }
+
+ textAnchors.horizontalCenter: horizontalCenter
+ textAnchors.verticalCenter: verticalCenter
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButtonGroup.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButtonGroup.qml
new file mode 100644
index 000000000..d4266d149
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/RadioButtonGroup.qml
@@ -0,0 +1,5 @@
+import QtQuick 2.0
+
+FocusScope {
+
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Section.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Section.qml
new file mode 100644
index 000000000..18b5c22f7
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Section.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+
+Loader {
+ anchors.fill: parent
+ asynchronous: true
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextBox.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextBox.qml
new file mode 100644
index 000000000..4c52e05b2
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextBox.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+Rectangle {
+ property alias text: text.text
+ property alias icon: icon.source
+
+ border.width: 2
+ color: 'black'
+ height: 42
+ radius: 3
+
+ Image {
+ id: icon
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ }
+
+ TextInput {
+ id: text
+ color: "white"
+ font.pixelSize: 24
+ anchors.left: icon.right
+ anchors.right: parent.right
+ anchors.leftMargin: 20
+ anchors.rightMargin: 10
+ anchors.verticalCenter: parent.verticalCenter
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextEntry.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextEntry.qml
new file mode 100644
index 000000000..774894c13
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/TextEntry.qml
@@ -0,0 +1,72 @@
+import QtQuick 2.0
+
+Item {
+ id: textentry
+ property alias input_border: search_text_box.border
+ property alias autocompleteModel: autocomplete.model
+ property alias text: search_text_box.text
+ signal selected
+ anchors.fill: parent
+
+ TextBox {
+ id: search_text_box
+ icon: "../Assets/SearchIcon.png"
+ anchors.top: parent.top
+ width: parent.width - 160
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ onTextChanged: if (autocomplete.model) autocomplete.model.setSearchString(text)
+ }
+
+ BackButton {
+ anchors.top: search_text_box.top
+ anchors.topMargin: 1
+ anchors.right: search_text_box.left
+ anchors.rightMargin: 10
+ onPress: section.state = 'menu'
+ }
+
+ ImageButton {
+ anchors.top: search_text_box.top
+ anchors.topMargin: 1
+ icon: "../Assets/DeleteIcon.png"
+ anchors.left: search_text_box.right
+ anchors.leftMargin: 10
+ height: 42
+
+ onPress: search_text_box.text = search_text_box.text.replace(/.$/, '')
+ }
+
+ Keyboard {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.topMargin: 40
+ anchors.top: search_text_box.bottom
+
+ onLetterClicked: search_text_box.text += letter
+ onGo: textentry.selected()
+ }
+
+ ListView {
+ id: autocomplete
+ anchors.top: search_text_box.bottom
+ anchors.bottom: parent.bottom
+ anchors.right: search_text_box.right
+ anchors.left: search_text_box.left
+ clip: true
+ visible: (count > 0 && count <= 5)
+
+ delegate: Button {
+ text: model.text
+ width: parent.width
+ textAnchors.horizontalCenter: undefined
+ textAnchors.left: clickable.left
+ textAnchors.leftMargin: 70
+
+ onPress: {
+ autocomplete.model.selected = model.text;
+ textentry.selected()
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Weather.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Weather.qml
new file mode 100644
index 000000000..0bcaf7720
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Components/Weather.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.0
+
+Item {
+ property alias text: text.text
+ property alias temp: temp.text
+ property alias image: image.source
+
+ width: 150
+ height: 75
+
+ Text {
+ id: text
+ text: "Today"
+ anchors.top: parent.top
+ color: "#ffffff"
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ Text {
+ id: temp
+ text: "72"
+ font.pixelSize: 36
+ anchors.bottom: parent.bottom
+ anchors.right: parent.right
+ color: "#ffffff"
+ }
+
+ Image {
+ id: image
+ source: "../Assets/Cloud.png"
+ anchors.left: parent.left
+ anchors.bottom: parent.bottom
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/EmptyLayout.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/EmptyLayout.qml
new file mode 100644
index 000000000..8fe6fcfd7
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/EmptyLayout.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import "../Components"
+
+Item {
+ anchors.fill: parent
+ anchors.topMargin: 70
+ anchors.leftMargin: 20
+ anchors.rightMargin: 20
+ anchors.bottomMargin: 70
+ property bool back_button: false
+
+ BackButton {
+ onPress: section.state = ''
+ visible: parent.back_button
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/LeftThirdSection.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/LeftThirdSection.qml
new file mode 100644
index 000000000..b0a7c2f6a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/LeftThirdSection.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import "../Components"
+
+FocusScope {
+ anchors.fill: parent
+ property alias header: header.text
+
+ Text {
+ id: header
+ font.pixelSize: 24
+ color: "#ffffff"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 70
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaLayout.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaLayout.qml
new file mode 100644
index 000000000..767184de3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaLayout.qml
@@ -0,0 +1,59 @@
+import QtQuick 2.0
+import "../Components"
+
+FocusScope {
+ anchors.fill: parent
+ property alias header: header.text
+ property alias artwork: artwork.source
+ property alias title: title.text
+ property alias artist: artist.text
+
+ Text {
+ id: title
+ text: ""
+ color: "#ffffff"
+ anchors.top: source_select.bottom
+ anchors.topMargin: 20
+ font.pixelSize: 28
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ }
+ Text {
+ id: artist
+ text: ""
+ color: "#ffffff"
+ anchors.top: title.bottom
+ anchors.topMargin: 10
+ font.pixelSize: 18
+ anchors.left: title.left
+ }
+
+ Text {
+ id: header
+ font.pixelSize: 24
+ color: "#ffffff"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: parent.height / 20 + 60
+ }
+
+ Button {
+ id: source_select
+ text: "Select source"
+ x: 20
+ y: 75
+ onPress: section.state = 'menu'
+ }
+
+ Image {
+ id: artwork
+ anchors.right: parent.right
+ anchors.rightMargin: 40
+ anchors.top: parent.top
+ width: 230
+ height: 230
+ anchors.topMargin: 140
+ source: ""
+ }
+
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaPlayerLayout.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaPlayerLayout.qml
new file mode 100644
index 000000000..797815d05
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/MediaPlayerLayout.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.0
+import "../Components"
+
+MediaLayout {
+
+ Row {
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 100
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ spacing: 10
+
+ ImageButton {
+ icon: "../Assets/Rewind.png"
+ onPress: MediaPlayer.previous()
+ }
+
+ ImageButton {
+ icon: "../Assets/Pause.png"
+ visible: MediaPlayer.playing
+ onPress: MediaPlayer.pause()
+ }
+ ImageButton {
+ icon: "../Assets/Play.png"
+ visible: ! MediaPlayer.playing
+ onPress: MediaPlayer.play()
+ }
+ ImageButton {
+ icon: "../Assets/Forward.png"
+ onPress: MediaPlayer.next()
+ }
+
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/TitledLayout.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/TitledLayout.qml
new file mode 100644
index 000000000..2ef47fa10
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Layouts/TitledLayout.qml
@@ -0,0 +1,14 @@
+import QtQuick 2.0
+import "../Components"
+
+EmptyLayout {
+ property alias title: title.text
+ anchors.topMargin: 120
+
+ H1 {
+ id: title
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.top
+ anchors.bottomMargin: 10
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/.usb.qml.swp b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/.usb.qml.swp
new file mode 100644
index 000000000..a88c240c3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/.usb.qml.swp
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/Browse/artists.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/Browse/artists.qml
new file mode 100644
index 000000000..af5804e72
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/Browse/artists.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 100
+ height: 62
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/applink.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/applink.qml
new file mode 100644
index 000000000..4f9d28196
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/applink.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+import com.ford.sdlcore 1.0
+import "../../Components"
+import "../../Layouts"
+
+MediaPlayerLayout {
+ header: "AppLink"
+ id: applink
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+
+ Text {
+ id: title
+ text: AppLink.show1
+ color: "#ffffff"
+ font.pixelSize: 28
+ anchors.leftMargin: 20
+ }
+ Text {
+ id: artist
+ text: AppLink.show2
+ color: "#ffffff"
+ font.pixelSize: 18
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/bluetooth.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/bluetooth.qml
new file mode 100644
index 000000000..397b84469
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/bluetooth.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+MediaLayout {
+ header: "Bluetooth"
+
+ Image {
+ source: "../../Assets/Content/SiriusArtwork.png"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/fm.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/fm.qml
new file mode 100644
index 000000000..b5f3ad1c8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/fm.qml
@@ -0,0 +1,46 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+MediaLayout {
+ header: "FM"
+
+ Flickable {
+ width: 700
+ height: 50
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 80
+ contentHeight: height
+ contentWidth: row.width
+ clip: true
+
+ RadioButtonGroup {
+ width: row.width
+ height: row.height
+ Row {
+ id: row
+ spacing: 8
+
+ RadioButton {
+ text: "Button"
+ }
+ RadioButton {
+ text: "Button"
+ }
+ RadioButton {
+ text: "Button"
+ }
+ RadioButton {
+ text: "Button"
+ }
+ RadioButton {
+ text: "Button"
+ }
+ RadioButton {
+ text: "Button"
+ }
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/menu.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/menu.qml
new file mode 100644
index 000000000..d9d951ef3
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/menu.qml
@@ -0,0 +1,54 @@
+import QtQuick 2.0
+import com.ford.sdlcore 1.0
+import "../../Components"
+import "../../Layouts"
+
+LeftThirdSection {
+ header: "Select a source"
+
+ Grid {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ GraphicalButton {
+ text: "Radio"
+ image: "../../Assets/RadioIcon.png"
+ onPress: section.state = 'fm'
+ }
+
+ GraphicalButton {
+ text: "Pandora"
+ image: "../../Assets/PandoraIcon.png"
+ onPress: section.state = 'fm'
+ }
+
+ GraphicalButton {
+ text: "Sirius"
+ image: "../../Assets/SiriusIcon.png"
+ onPress: section.state = 'sirius'
+ }
+
+ GraphicalButton {
+ text: "Bluetooth"
+ image: "../../Assets/BluetoothIcon.png"
+ onPress: section.state = 'bluetooth'
+ }
+
+ GraphicalButton {
+ text: "USB"
+ image: "../../Assets/UsbIcon.png"
+ onPress: section.state = 'usb'
+ }
+
+ Repeater {
+ model: MediaApps
+
+ delegate: GraphicalButton {
+ text: modelData
+ image: "../../Assets/UsbIcon.png"
+ onPress: section.state = 'applink'
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/sirius.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/sirius.qml
new file mode 100644
index 000000000..dfe9fc4d5
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/sirius.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+MediaLayout {
+ header: "Sirius"
+
+ Image {
+ source: "../../Assets/Content/SiriusArtwork.png"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/usb.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/usb.qml
new file mode 100644
index 000000000..7236e98cb
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Media/usb.qml
@@ -0,0 +1,59 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+MediaPlayerLayout {
+ header: "USB"
+ id: usb
+
+ Button {
+ text: "Browse Media"
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.rightMargin: 40
+ anchors.topMargin: 75
+
+ onPress: parent.state = 'browse'
+ }
+
+ states: [
+ State {
+ name: 'browse'
+ PropertyChanges { target: browse_interface; visible: true; opacity: 0.9 }
+ }
+
+ ]
+
+ Rectangle {
+ color: "#000000"
+ opacity: 0
+ anchors.fill: parent
+ radius: 10
+ visible: false
+ id: browse_interface
+
+ BackButton {
+ id: back_button
+ anchors.topMargin: 80
+ anchors.leftMargin: 20
+ }
+
+
+ H2 {
+ id: header
+ text: "Browse Media"
+ anchors.topMargin: 80
+ }
+
+ Item {
+ anchors.fill: parent
+ id: browse_container
+ }
+
+ Button {
+ anchors.top: back_button.bottom
+ anchors.left: parent.left
+ text: "Jump"
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/.menu.qml.swp b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/.menu.qml.swp
new file mode 100644
index 000000000..183438e03
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/.menu.qml.swp
Binary files differ
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/favorites.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/favorites.qml
new file mode 100644
index 000000000..db16b994b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/favorites.qml
@@ -0,0 +1,70 @@
+import QtQuick 2.0
+import com.ford.navcore 1.0
+import "../../Components"
+import "../../Layouts"
+
+Item {
+ BackButton { onPress: section.state = 'menu' }
+ NavController {
+ id: navController
+ }
+
+ Flickable {
+ height: 300
+ width: 400
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ clip: true
+ contentWidth: content.width
+ contentHeight: content.height
+
+ Column {
+ id: content
+ width: parent.width
+ spacing: 10
+
+ Button {
+ text: "Barry Church's home"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Davison", "Victoria Sta", "3465");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Subway"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn Heights", "Pelham St", "3929");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Ford World Headquarters"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn", "American Rd", "1");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Qdoba"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Allen Park", "Fairlane Dr", "48101");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Levagood Park"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn", "Denwood St", "1100");
+ section.state = 'map';
+ }
+ }
+
+ }
+ }
+}
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/keyboard_search.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/keyboard_search.qml
new file mode 100644
index 000000000..011c76164
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/keyboard_search.qml
@@ -0,0 +1,64 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+Item {
+ anchors.fill: parent
+ id: keyboard_search
+
+ states: [
+ State {
+ name: 'city'
+ PropertyChanges {target: text_entry; autocompleteModel: citySuggestions}
+ },
+ State {
+ name: 'street'
+ PropertyChanges {target: text_entry; autocompleteModel: streetSuggestions}
+ },
+ State {
+ name: 'door'
+ PropertyChanges {target: text_entry; autocompleteModel: undefined}
+ },
+ State {
+ name: 'review'
+ PropertyChanges {target: text_entry; visible: false}
+ PropertyChanges {target: review; visible: true}
+ }
+ ]
+
+ Column {
+ id: review
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 500
+
+ visible: false
+ Button {
+ text: stateSuggestions.selected
+ width: parent.width
+ onPress: keyboard_search.state = ""
+ }
+ Button {
+ text: citySuggestions.selected
+ width: parent.width
+ onPress: keyboard_search.state = "city"
+ }
+ Button {
+ text: streetSuggestions.selected
+ width: parent.width
+ onPress: keyboard_search.state = "city"
+ }
+ Button {
+ id: doornumber
+ width: parent.width
+ onPress: keyboard_search.state = "door"
+ }
+ Button {
+ text: "Begin navigation"
+ anchors.horizontalCenter: parent.horizontalCenter
+ onPress: {
+ section.state = 'map';
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/map.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/map.qml
new file mode 100644
index 000000000..8b48efe78
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/map.qml
@@ -0,0 +1,63 @@
+import QtQuick 2.0
+import "../../Components"
+
+Item {
+ Column {
+ anchors.left: parent.left;
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 10
+
+ Button {
+ text: "Zoom in"
+ }
+
+ Button {
+ text: "Zoom out"
+ }
+
+ Button {
+ text: "3D"
+ }
+
+ Button {
+ text: "2D"
+ }
+
+ Button {
+ text: "North up"
+ }
+ }
+
+ Rectangle {
+ width: next_turn.width + 20
+ height: 30
+ anchors.top: parent.top
+ anchors.topMargin: 65
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "black"
+ opacity: 0.6
+
+ }
+
+ Rectangle {
+ width: current_street.width + 20
+ height: 30
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 65
+ anchors.horizontalCenter: parent.horizontalCenter
+ color: "black"
+ opacity: 0.6
+ visible: navController.current_street.length > 0
+
+ }
+
+
+ Button {
+ text: "Go"
+ anchors.top: parent.top
+ anchors.topMargin: 3
+ anchors.right: parent.right
+ anchors.rightMargin: 20
+ onPress: section.state = 'menu'
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/menu.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/menu.qml
new file mode 100644
index 000000000..fdcae3f58
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/menu.qml
@@ -0,0 +1,57 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+EmptyLayout {
+ back_button: true
+
+ Grid {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ GraphicalButton {
+ text: "Home"
+ image: "../../Assets/HomeIcon.png"
+ onPress: {
+ section.state = 'map';
+ }
+ }
+ GraphicalButton {
+ text: "Work"
+ image: "../../Assets/WorkIcon.png"
+ onPress: {
+ section.state = 'map';
+ }
+ }
+ GraphicalButton {
+ text: "Recent Destination"
+ image: "../../Assets/RecentDestinationsIcon.png"
+ onPress: section.state = 'recent_destinations'
+ }
+ GraphicalButton {
+ text: "Keyboard"
+ image: "../../Assets/KeyboardIcon.png"
+ onPress: section.state = 'keyboard_search'
+ }
+ GraphicalButton {
+ text: "Favorites"
+ image: "../../Assets/FavoritesIcon.png"
+ onPress: section.state = 'favorites'
+ }
+ GraphicalButton {
+ text: "Point of Interest"
+ image: "../../Assets/PoiIcon.png"
+ onPress: section.state = 'poi'
+ }
+ GraphicalButton {
+ text: "Scout"
+ image: "../../Assets/ScoutIcon.png"
+ }
+ GraphicalButton {
+ text: "SYNC Services"
+ image: "../../Assets/ServicesIcon.png"
+ onPress: section.state = "video_moving_map"
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/poi.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/poi.qml
new file mode 100644
index 000000000..0ecea8a11
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/poi.qml
@@ -0,0 +1,205 @@
+import QtQuick 2.0
+import com.ford.navcore 1.0
+import "../../Components"
+import "../../Layouts"
+
+EmptyLayout {
+ anchors.fill: parent
+ back_button: true
+ id: poi_search
+
+ Component.onCompleted: state = "search_type"
+
+ states: [
+ State {
+ name: 'search_type'
+ PropertyChanges {
+ target: search_type
+ visible: true
+ }
+ },
+ State {
+ name: 'categories'
+ PropertyChanges {
+ target: category_select
+ visible: true
+ }
+ },
+ State {
+ name: 'select_state'
+ PropertyChanges {
+ target: text_entry
+ visible: true
+ }
+ },
+ State {
+ name: 'results'
+ PropertyChanges {
+ target: results
+ visible: true
+ }
+ },
+ State {
+ name: 'result'
+ PropertyChanges {
+ target: result
+ visible: true
+ }
+ }
+ ]
+
+ NavController {
+ id: navController
+ }
+
+ Grid {
+ id: search_type
+ property string type
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+ visible: false
+
+ GraphicalButton {
+ text: "Near me"
+ image: "../../Assets/HomeIcon.png"
+ onPress: {
+ search_type.type = "nearby"
+ poi_search.state = "categories"
+ }
+ }
+
+ GraphicalButton {
+ text: "Along route"
+ image: "../../Assets/HomeIcon.png"
+ onPress: {
+ search_type.type = "route"
+ poi_search.state = "categories"
+ }
+ }
+
+ GraphicalButton {
+ text: "In city"
+ image: "../../Assets/HomeIcon.png"
+ onPress: {
+ search_type.type = "city"
+ poi_search.state = "select_state"
+ }
+ }
+ }
+
+ ListView {
+ id: category_select
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: parent.height - 120
+ width: parent.width
+ spacing: 10
+ clip: true
+
+ GraphicalButton {
+ text: "Search by name"
+ image: "../../Assets/HomeIcon.png"
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 20
+ }
+
+ visible: false
+ model: NavPoiCategoryListModel { id: poi_categories }
+
+ delegate: Button {
+ property int category_id: id
+ text: name
+ width: 400
+ anchors.horizontalCenter: parent.horizontalCenter
+ onPress: {
+ navController.poiSearch(search_type.type, category_id, "USA", state_suggestions.getSelected(), city_suggestions.getSelected());
+ poi_search.state = "results"
+ }
+ }
+ }
+
+ ListView {
+ id: results
+ visible: false
+ anchors.topMargin: 80
+ anchors.top: parent.top
+ anchors.bottomMargin: 80
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 400
+ height: parent.height - 120
+ spacing: 10
+ clip: true
+
+ model: NavPoiSuggestionListModel {
+ id: poi_suggestions
+ }
+
+ delegate: Button {
+ text: name
+ width: parent.width
+ onPress: {
+ results.currentIndex = index
+ poi_search.state = "result"
+ }
+ }
+ }
+
+ Item {
+ anchors.fill: parent
+ anchors.topMargin: 80
+ anchors.bottomMargin: 80
+ id: result
+ visible: false
+
+ H1 {
+ id: poi_name
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: (results.currentItem ? results.currentItem.text : "")
+ }
+
+ Button {
+ text: "Begin navigation"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: poi_name.bottom
+ onPress: {
+ poi_suggestions.navigateToResult(results.currentIndex);
+ section.state = 'map'
+ }
+ }
+ }
+
+ TextEntry {
+ id: text_entry
+ anchors.topMargin: 80
+ input_border.color: "#3C7855"
+
+ states: [
+ State {
+ name: "city_select"
+ PropertyChanges {
+ target: text_entry
+ autocompleteModel: city_suggestions
+ }
+ }
+
+ ]
+
+ NavStateSuggestionListModel { id: state_suggestions }
+ NavCitySuggestionListModel { id: city_suggestions; stateListModel: state_suggestions }
+ autocompleteModel: state_suggestions
+ visible: false
+
+ onSelected: {
+ if (text_entry.state === '') {
+ text = "";
+ text_entry.state = 'city_select';
+ }
+ else {
+ poi_search.state = 'categories'
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/recent_destinations.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/recent_destinations.qml
new file mode 100644
index 000000000..db16b994b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/recent_destinations.qml
@@ -0,0 +1,70 @@
+import QtQuick 2.0
+import com.ford.navcore 1.0
+import "../../Components"
+import "../../Layouts"
+
+Item {
+ BackButton { onPress: section.state = 'menu' }
+ NavController {
+ id: navController
+ }
+
+ Flickable {
+ height: 300
+ width: 400
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ clip: true
+ contentWidth: content.width
+ contentHeight: content.height
+
+ Column {
+ id: content
+ width: parent.width
+ spacing: 10
+
+ Button {
+ text: "Barry Church's home"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Davison", "Victoria Sta", "3465");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Subway"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn Heights", "Pelham St", "3929");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Ford World Headquarters"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn", "American Rd", "1");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Qdoba"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Allen Park", "Fairlane Dr", "48101");
+ section.state = 'map';
+ }
+ }
+ Button {
+ text: "Levagood Park"
+ width: parent.width
+ onPress: {
+ navController.beginNavigation("USA", "MI", "Dearborn", "Denwood St", "1100");
+ section.state = 'map';
+ }
+ }
+
+ }
+ }
+}
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/video_moving_map.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/video_moving_map.qml
new file mode 100644
index 000000000..2f6b798d1
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Navigation/video_moving_map.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.0
+import "../../Components"
+import QtMultimedia 5.0
+
+Item {
+ Video {
+ anchors.fill: parent
+ source: "rtsp://172.20.10.7:8086"
+ autoPlay: true
+ }
+
+ Button {
+ text: "Go"
+ anchors.top: parent.top
+ anchors.topMargin: 3
+ anchors.right: parent.right
+ anchors.rightMargin: 20
+ onPress: section.state = 'menu'
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/device_info.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/device_info.qml
new file mode 100644
index 000000000..1f409f58e
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/device_info.qml
@@ -0,0 +1,21 @@
+import QtQuick 2.0
+import "../../Components"
+import com.ford.phonecore 1.0
+
+Item {
+ anchors.fill: parent
+
+ H2 {
+ id: h2
+ text: PhoneCore.device_name
+
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Button {
+ text: "Forget device"
+ onPress: PhoneCore.unpairDevice()
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: h2.bottom
+ anchors.topMargin: 20
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/discovery.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/discovery.qml
new file mode 100644
index 000000000..5d7c51be6
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/discovery.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import com.ford.phonecore 1.0
+import "../../Components"
+
+Item {
+ ListView {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: 300
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ spacing: 10
+
+ delegate: Button {
+ text: name
+ width: parent.width
+ onPress: bluetooth_devices.createPairedDevice(mac)
+ }
+
+ model: BluetoothDiscoveredDevices {
+ id: bluetooth_devices
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/keypad.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/keypad.qml
new file mode 100644
index 000000000..fd5ed4ff0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/keypad.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.0
+import com.ford.phonecore 1.0
+import "../../Components"
+import "../../Layouts"
+
+Item {
+ anchors.top: parent.top
+ anchors.topMargin: 80
+
+ TextBox {
+ id: phone_number
+ border.color: Qt.rgba(0.454901961,0.37254902,0.203921569,1)
+ anchors.top: parent.top
+ width: parent.width - 160
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ BackButton {
+ anchors.top: phone_number.top
+ anchors.topMargin: 1
+ anchors.right: phone_number.left
+ anchors.rightMargin: 10
+ onPress: section.state = ''
+ }
+
+ ImageButton {
+ anchors.top: phone_number.top
+ anchors.topMargin: 1
+ icon: "../../Assets/DeleteIcon.png"
+ anchors.left: phone_number.right
+ anchors.leftMargin: 10
+ height: 42
+
+ onPress: phone_number.text = phone_number.text.replace(/.$/, '')
+ }
+
+ Keypad {
+ anchors.topMargin: 40
+ anchors.top: phone_number.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ onLetterClicked: phone_number.text += letter
+ }
+
+ Button {
+ text: "Call"
+ onPress: PhoneCore.dial(phone_number.text);
+ y: 100
+ }
+ Button {
+ text: "End call"
+ onPress: PhoneCore.hangup();
+ y: 160
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/manage_devices.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/manage_devices.qml
new file mode 100644
index 000000000..cf62a9c28
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/manage_devices.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+import com.ford.phonecore 1.0
+import "../../Components"
+import "../../Layouts"
+
+TitledLayout {
+ title: "Manage Bluetooth devices"
+ back_button: true
+
+ Loader {
+ id: view
+
+ anchors.fill: parent
+ source: (PhoneCore.device_name === "") ? "discovery.qml" : "device_info.qml"
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/menu.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/menu.qml
new file mode 100644
index 000000000..2d53656ba
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/menu.qml
@@ -0,0 +1,54 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+LeftThirdSection {
+ Grid {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ GraphicalButton {
+ text: "Do Not Disturb"
+ image: "../../Assets/DndIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Phonebook"
+ image: "../../Assets/PhonebookIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Voicemail"
+ image: "../../Assets/VoicemailIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Messages"
+ image: "../../Assets/MessagesIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Recent Calls"
+ image: "../../Assets/RecentCallsIcon.png"
+ onPress: section.state = 'recent_calls'
+ }
+
+ GraphicalButton {
+ text: "Keypad"
+ image: "../../Assets/KeypadIcon.png"
+ onPress: section.state = 'keypad'
+ }
+
+ GraphicalButton {
+ text: "Speed Dial"
+ image: "../../Assets/SpeedDialIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Devices"
+ image: "../../Assets/SpeedDialIcon.png"
+ onPress: section.state = 'manage_devices'
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/recent_calls.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/recent_calls.qml
new file mode 100644
index 000000000..1873ed438
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Phone/recent_calls.qml
@@ -0,0 +1,62 @@
+import QtQuick 2.0
+import com.ford.phonecore 1.0
+import "../../Components"
+import "../../Layouts"
+
+TitledLayout {
+ title: "Recent calls"
+ Component.onCompleted: PhoneCore.hangup()
+ back_button: true
+
+ Flickable {
+ height: 300
+ width: 400
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ clip: true
+ contentWidth: content.width
+ contentHeight: content.height
+
+ Column {
+ id: content
+ width: parent.width
+ spacing: 10
+
+ Button {
+ text: "Chris Church: Mobile"
+ onPress: PhoneCore.dial("8106567195")
+ width: parent.width
+ }
+ Button {
+ text: "Barry Church: Mobile"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ Button {
+ text: "Barry Church: Work"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ Button {
+ text: "Aaron Church: Mobile"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ Button {
+ text: "Aaron Church: Mobile"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ Button {
+ text: "Aaron Church: Mobile"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ Button {
+ text: "Aaron Church: Mobile"
+ onPress: PhoneCore.dial("3134074522")
+ width: parent.width
+ }
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Vehicle/menu.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Vehicle/menu.qml
new file mode 100644
index 000000000..b95bc52da
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/Vehicle/menu.qml
@@ -0,0 +1,60 @@
+import QtQuick 2.0
+import "../../Components"
+import "../../Layouts"
+
+LeftThirdSection {
+ MultiPointTouchArea {
+ anchors.fill: parent
+ }
+
+ Grid {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 10
+
+ GraphicalButton {
+ text: "HEV"
+ image: "../../Assets/EvIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Ambient Lighting"
+ image: "../../Assets/LightingIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Wallpaper"
+ image: "../../Assets/WallpaperIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Wi-Fi"
+ image: "../../Assets/WifiIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Health Report"
+ image: "../../Assets/VhrIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Seats"
+ image: "../../Assets/SeatsIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Keypad Entry"
+ image: "../../Assets/KeypadEntryIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Sync Services"
+ image: "../../Assets/ServicesIcon.png"
+ }
+
+ GraphicalButton {
+ text: "Add Shortcut"
+ image: "../../Assets/AddIcon.png"
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/alert.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/alert.qml
new file mode 100644
index 000000000..f19539b9b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/alert.qml
@@ -0,0 +1,68 @@
+import QtQuick 2.0
+
+Item {
+ property alias text: alert_text.text
+ id: alert_item
+ opacity: 0
+
+ transitions: Transition {
+ NumberAnimation {
+ properties: "opacity"
+ }
+ }
+
+ function alert(message) {
+ text = message;
+ state = 'alerting';
+ alert_timer.start();
+ }
+
+ states: [
+ State {
+ name: 'alerting'
+ PropertyChanges {
+ target: alert_item
+ opacity: 1
+ }
+ }
+ ]
+
+ Timer {
+ id: alert_timer
+ running: false
+ interval: 4000
+ onTriggered: alert_item.state = '';
+ }
+
+
+ Rectangle {
+ id: background
+ anchors.fill: parent
+ color: "#000"
+ opacity: 0.8
+ }
+
+ Rectangle {
+ color: "#111"
+ width: 500
+ height: alert_text.height + 40
+ radius: 8
+ border.color: "#666"
+ border.width: 2
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+
+ Text {
+ id: alert_text
+ text: "This is a really really long long really really long longreally really long longreally really long longreally really long long alert"
+ color: "#fff"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ horizontalAlignment: Text.AlignHCenter
+ font.pixelSize: 24
+ width: parent.width
+ wrapMode: Text.WordWrap
+ }
+ }
+
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/chrome.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/chrome.qml
new file mode 100644
index 000000000..b8f4f09d5
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/chrome.qml
@@ -0,0 +1,144 @@
+import QtQuick 2.0
+import "../Components"
+
+Item {
+ id: container
+ anchors.fill: parent
+
+ property int horizontalLabelMargin: 20
+
+ Image {
+ id: phonetab
+ source: "../Assets/PhoneTab.png"
+ anchors.top: parent.top
+ anchors.topMargin: (root.state === "phone") ? -height : 0
+ Behavior on anchors.topMargin { PropertyAnimation {} }
+ width: parent.width / 2 - 145
+ height: parent.height / 20 + 25
+
+ Clickable {
+ anchors.fill: parent
+ text: "Phone"
+ onPress: go("phone")
+ textAnchors.verticalCenter: verticalCenter
+ textAnchors.leftMargin: horizontalLabelMargin
+ textAnchors.left: left
+ }
+ }
+ Row {
+ anchors.right: phonetab.right
+ anchors.rightMargin: phonetab.width / 4
+ anchors.top: parent.top
+ height: phonetab.height
+ spacing: 10
+
+ Image {
+ source: "../Assets/PhoneCornerIcons.png"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+
+
+ Image {
+ source: "../Assets/NavigationTab.png"
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: (root.state === "navigation") ? -height : 0
+ Behavior on anchors.topMargin { PropertyAnimation {} }
+ width: parent.width / 2 - 145
+ height: parent.height / 20 + 25
+
+ Clickable {
+ anchors.fill: parent
+ text: "Navigation"
+ onPress: go("navigation")
+ textAnchors.verticalCenter: verticalCenter
+ textAnchors.rightMargin: horizontalLabelMargin
+ textAnchors.right: right
+ }
+ }
+
+ Image {
+ id: test1
+ source: "../Assets/MediaTab.png"
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: (root.state === "media") ? -height : 0
+ anchors.left: parent.left
+ Behavior on anchors.bottomMargin { PropertyAnimation {} }
+ width: parent.width / 2 - 145
+ height: parent.height / 20 + 25
+
+ Clickable {
+ anchors.fill: parent
+ text: "Media"
+ onPress: go("media")
+ textAnchors.verticalCenter: verticalCenter
+ textAnchors.leftMargin: horizontalLabelMargin
+ textAnchors.left: left
+ }
+ }
+
+ Image {
+ source: "../Assets/VehicleTab.png"
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: (root.state === "vehicle") ? -height : 0
+ Behavior on anchors.bottomMargin { PropertyAnimation {} }
+ width: parent.width / 2 - 145
+ height: parent.height / 20 + 25
+
+ Clickable {
+ anchors.fill: parent
+ text: "Vehicle"
+ onPress: go("vehicle")
+ textAnchors.verticalCenter: verticalCenter
+ textAnchors.rightMargin: horizontalLabelMargin
+ textAnchors.right: right
+ }
+ }
+
+ Image {
+ id: chrometop
+ source: "../Assets/ChromeTop.png"
+ anchors.top: parent.top
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: parent.height / 18 + 35
+ width: parent.width / 2 + 40
+ fillMode: Image.PreserveAspectFit
+ Clickable {
+ onPress: go((root.state === 'home_corners') ? 'home' : 'home_corners')
+ width: parent.width / 5
+ height: parent.height
+ anchors.left: parent.left
+ anchors.leftMargin: (parent.width - parent.paintedWidth)/2 + 20
+ }
+
+ Text {
+ id: clock
+ text: "12:00"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ color: "#ffffff"
+ font.pixelSize: 28
+ }
+ }
+ Image {
+ source: "../Assets/ChromeBottom.png"
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: parent.height / 18 + 35
+ width: parent.width / 2
+ fillMode: Image.PreserveAspectFit
+
+ Text {
+ id: exterior_temp
+ text: "72F Outside"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.bottom: parent.bottom
+ color: "#ffffff"
+ anchors.bottomMargin: 15
+ font.pixelSize: 18
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home.qml
new file mode 100644
index 000000000..c45f66782
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home.qml
@@ -0,0 +1,51 @@
+import QtQuick 2.0
+import "../Components"
+import "../Layouts"
+import com.ford.phonecore 1.0
+
+LeftThirdSection {
+ header: "Good Morning, Jen"
+
+ Column {
+ anchors.left: parent.left
+ anchors.leftMargin: 60
+ spacing: 40
+ anchors.verticalCenter: parent.verticalCenter
+
+ Weather {}
+ Weather {
+ text: "Tonight"
+ temp: "55"
+ image: "../Assets/CloudNight.png"
+ }
+ }
+
+
+ Image {
+ id: schedule
+ source: "../Assets/CMaxCal.png"
+ anchors.right: parent.right
+ anchors.rightMargin: 70
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Column {
+ anchors.right: schedule.left
+ anchors.rightMargin: 20
+ anchors.top: schedule.top
+ anchors.topMargin: 5
+ spacing: 40
+
+ Button {
+ text: "Dial"
+ }
+ Button {
+ text: "Navigate"
+ }
+ Button {
+ text: "Siri"
+ onPress: PhoneCore.siriEyesFree()
+ visible: PhoneCore.device_state === "connected" || PhoneCore.device_state === "playing"
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml
new file mode 100644
index 000000000..432e978b8
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml
@@ -0,0 +1,133 @@
+import QtQuick 2.0
+import com.ford.phonecore 1.0
+import "../Components"
+import "../Layouts"
+
+Item {
+
+ Image {
+ source: "../Assets/Crosshairs.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Item {
+ width: parent.width / 2
+ height: parent.height / 2
+
+ Image {
+ id: phone_corner_icon
+ visible: (PhoneCore.device_state === "connected")
+ source: "../Assets/PhoneIcons.png"
+ anchors.top: parent.top
+ anchors.topMargin: 80
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ OverflowableText {
+ id: phone_name
+ text: PhoneCore.device_name
+ anchors.top: phone_corner_icon.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ textAlign: 'center'
+ anchors.topMargin: 10
+ width: 350
+ fontColor: (PhoneCore.device_state === "connected") ? "#ffffff" : "#333"
+ font.pixelSize: 24
+ }
+
+ Text {
+ text: "Connecting..."
+ anchors.top: phone_name.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: 10
+ color: "#333"
+ visible: (PhoneCore.device_state === "connecting")
+ font.pixelSize: 24
+ }
+
+ CheckButton {
+ text: "Do Not Disturb"
+ visible: (PhoneCore.device_state === "connected")
+ anchors.top: phone_name.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: 10
+ }
+
+
+
+ Row {
+ anchors.top: phone_name.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.topMargin: 10
+ visible: (PhoneCore.device_state === "disconnected")
+ spacing: 10
+
+ Button {
+ text: "Connect"
+ onPress: {
+ PhoneCore.initializeDevice()
+ }
+ }
+
+ Button {
+ text: "Manage Phones"
+ onPress: {
+ go("phone");
+ }
+ }
+ }
+
+ }
+
+ Item {
+ width: parent.width / 2
+ height: parent.height / 2
+ anchors.right: parent.right
+ }
+
+ Item {
+ width: parent.width / 2
+ height: parent.height / 2
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ Image {
+ source: "../Assets/VehicleCornerIcon.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ }
+
+ Item {
+ width: parent.width / 2
+ height: parent.height / 2
+ anchors.bottom: parent.bottom
+
+ Image {
+ id: media_corner_icon
+ source: "../Assets/UsbIcon.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: parent.top
+ anchors.topMargin: 40
+ }
+
+ Text {
+ id: media_artist
+ text: ""
+ font.pixelSize: 18
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: media_corner_icon.bottom
+ color: "#ffffff"
+ anchors.topMargin: 10
+ }
+
+ Text {
+ id: media_title
+ text: ""
+ font.pixelSize: 24
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.top: media_artist.bottom
+ color: "#ffffff"
+ }
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/media.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/media.qml
new file mode 100644
index 000000000..af33ddaff
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/media.qml
@@ -0,0 +1,55 @@
+import QtQuick 2.0
+import "../Components"
+import "../Layouts"
+
+Rectangle {
+ anchors.fill: parent
+ id: section
+
+ gradient: Gradient {
+ GradientStop { position: 0.8; color: "#000000" }
+ GradientStop { position: 1.0; color: "#7C3232" }
+ }
+
+ states: [
+ State {
+ name: 'menu'
+ PropertyChanges { target: page; source: "Media/menu.qml" }
+ },
+ State {
+ name: 'fm'
+ PropertyChanges { target: page; source: "Media/fm.qml" }
+ },
+ State {
+ name: 'sirius'
+ PropertyChanges { target: page; source: "Media/sirius.qml" }
+ },
+ State {
+ name: 'usb'
+ PropertyChanges { target: page; source: "Media/usb.qml" }
+ },
+ State {
+ name: 'bluetooth'
+ PropertyChanges { target: page; source: "Media/bluetooth.qml" }
+ },
+ State {
+ name: 'applink'
+ PropertyChanges { target: page; source: "Media/applink.qml" }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "bluetooth"
+ },
+ Transition {
+ to: "usb"
+ }
+
+ ]
+
+ Section {
+ id: page
+ source: "Media/usb.qml"
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/navigation.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/navigation.qml
new file mode 100644
index 000000000..e26326b45
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/navigation.qml
@@ -0,0 +1,49 @@
+import QtQuick 2.0
+import "../Components"
+import "../Layouts"
+
+Rectangle {
+ id: section
+ anchors.fill: parent
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "#3C7855" }
+ GradientStop { position: 0.4; color: "#000000" }
+ }
+
+ Section {
+ id: page
+ source: "Navigation/map.qml"
+ }
+
+ states: [
+ State {
+ name: ''
+ PropertyChanges { target: page; source: "Navigation/map.qml" }
+ },
+ State {
+ name: 'menu'
+ PropertyChanges { target: page; source: "Navigation/menu.qml" }
+ },
+ State {
+ name: 'keyboard_search'
+ PropertyChanges { target: page; source: "Navigation/keyboard_search.qml" }
+ },
+ State {
+ name: 'favorites'
+ PropertyChanges { target: page; source: "Navigation/favorites.qml" }
+ },
+ State {
+ name: 'recent_destinations'
+ PropertyChanges { target: page; source: "Navigation/recent_destinations.qml" }
+ },
+ State {
+ name: 'poi'
+ PropertyChanges { target: page; source: "Navigation/poi.qml" }
+ },
+ State {
+ name: 'video_moving_map'
+ PropertyChanges { target: page; source: "Navigation/video_moving_map.qml" }
+ }
+ ]
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/phone.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/phone.qml
new file mode 100644
index 000000000..8c2987f2f
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/phone.qml
@@ -0,0 +1,37 @@
+import QtQuick 2.0
+import "../Components"
+import "../Layouts"
+
+Rectangle {
+ id: section
+ anchors.fill: parent
+
+ states: [
+ State {
+ name: ''
+ PropertyChanges { target: page; source: "Phone/menu.qml" }
+ },
+ State {
+ name: 'recent_calls'
+ PropertyChanges { target: page; source: "Phone/recent_calls.qml" }
+ },
+ State {
+ name: 'keypad'
+ PropertyChanges { target: page; source: "Phone/keypad.qml" }
+ },
+ State {
+ name: 'manage_devices'
+ PropertyChanges { target: page; source: "Phone/manage_devices.qml" }
+ }
+ ]
+
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Qt.rgba(0.454901961,0.37254902,0.203921569,1) }
+ GradientStop { position: 0.4; color: "#000000" }
+ }
+
+ Section {
+ id: page
+ source: "Phone/menu.qml"
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/vehicle.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/vehicle.qml
new file mode 100644
index 000000000..9687e7c46
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/vehicle.qml
@@ -0,0 +1,17 @@
+import QtQuick 2.0
+import "../Components"
+import "../Layouts"
+
+Rectangle {
+ anchors.fill: parent
+
+ gradient: Gradient {
+ GradientStop { position: 0.4; color: "#000000" }
+ GradientStop { position: 1.0; color: "#104369" }
+ }
+
+ Section {
+ id: section
+ source: "Vehicle/menu.qml"
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/main.qml b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/main.qml
new file mode 100644
index 000000000..c6f0b0e76
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/main.qml
@@ -0,0 +1,79 @@
+import QtQuick 2.0
+import "Components"
+import com.ford.sdlcore 1.0
+import com.ford.phonecore 1.0
+
+Rectangle {
+ id: root
+ width: 800
+ height: 470
+ color: "#000"
+
+ states: [
+ State {
+ name: "home"
+ PropertyChanges { target: maincontent; source: "Sections/home.qml" }
+ },
+ State {
+ name: "home_corners"
+ PropertyChanges { target: maincontent; source: "Sections/home_corners.qml" }
+ },
+ State {
+ name: "phone"
+ PropertyChanges { target: maincontent; source: "Sections/phone.qml" }
+ },
+ State {
+ name: "navigation"
+ PropertyChanges { target: maincontent; source: "Sections/navigation.qml" }
+ },
+ State {
+ name: "media"
+ PropertyChanges { target: maincontent; source: "Sections/media.qml" }
+ },
+ State {
+ name: "vehicle"
+ PropertyChanges { target: maincontent; source: "Sections/vehicle.qml" }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: '*'
+ PropertyAnimation { target: maincontent; property: 'opacity'; from: 0; to: 1}
+ }
+ ]
+
+ function go(string) {
+ state = string
+ }
+
+ Connections {
+ target: AppLink
+ onAlert: root.alert(message);
+ }
+
+ Connections {
+ target: PhoneCore
+ onCallAdded: root.alert("Incoming call: \n" + name + "\n" + number)
+ onCallRemoved: root.alert("Call ended")
+ }
+
+ function alert(message) {
+ alert_loader.item.alert(message)
+ }
+
+ Section {
+ id: maincontent
+ source: "Sections/home.qml"
+ }
+
+ Section {
+ id: alert_loader
+ source: "Sections/alert.qml"
+ }
+
+ Section {
+ id: chrome
+ source: "Sections/chrome.qml"
+ }
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.cpp
new file mode 100644
index 000000000..547602d83
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.cpp
@@ -0,0 +1,70 @@
+// checksum 0x56a9 version 0x80001
+/*
+ This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
+ QtQuick2ApplicationViewer is a convenience class containing mobile device specific
+ code such as screen orientation handling. Also QML paths and debugging are
+ handled here.
+ It is recommended not to modify this file, since newer versions of Qt Creator
+ may offer an updated version of it.
+*/
+
+#include "qtquick2applicationviewer.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtQml/QQmlEngine>
+
+class QtQuick2ApplicationViewerPrivate
+{
+ QString mainQmlFile;
+ friend class QtQuick2ApplicationViewer;
+ static QString adjustPath(const QString &path);
+};
+
+QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
+{
+#if defined(Q_OS_MAC)
+ if (!QDir::isAbsolutePath(path))
+ return QString::fromLatin1("%1/../Resources/%2")
+ .arg(QCoreApplication::applicationDirPath(), path);
+#elif defined(Q_OS_UNIX)
+ const QString pathInInstallDir =
+ QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
+ if (QFileInfo(pathInInstallDir).exists())
+ return pathInInstallDir;
+#endif
+ return path;
+}
+
+QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
+ : QQuickView(parent)
+ , d(new QtQuick2ApplicationViewerPrivate())
+{
+ connect(engine(), SIGNAL(quit()), SLOT(close()));
+ setResizeMode(QQuickView::SizeRootObjectToView);
+}
+
+QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
+{
+ delete d;
+}
+
+void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
+{
+ d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
+ setSource(QUrl::fromLocalFile(d->mainQmlFile));
+}
+
+void QtQuick2ApplicationViewer::addImportPath(const QString &path)
+{
+ engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
+}
+
+void QtQuick2ApplicationViewer::showExpanded()
+{
+#if defined(Q_WS_SIMULATOR)
+ showFullScreen();
+#else
+ show();
+#endif
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
new file mode 100644
index 000000000..baf67f247
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/bananasnacks/qtquick2applicationviewer/qtquick2applicationviewer.h
@@ -0,0 +1,33 @@
+// checksum 0xfde6 version 0x80001
+/*
+ This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
+ QtQuick2ApplicationViewer is a convenience class containing mobile device specific
+ code such as screen orientation handling. Also QML paths and debugging are
+ handled here.
+ It is recommended not to modify this file, since newer versions of Qt Creator
+ may offer an updated version of it.
+*/
+
+#ifndef QTQUICK2APPLICATIONVIEWER_H
+#define QTQUICK2APPLICATIONVIEWER_H
+
+#include <QtQuick/QQuickView>
+
+class QtQuick2ApplicationViewer : public QQuickView
+{
+ Q_OBJECT
+
+public:
+ explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
+ virtual ~QtQuick2ApplicationViewer();
+
+ void setMainQmlFile(const QString &file);
+ void addImportPath(const QString &path);
+
+ void showExpanded();
+
+private:
+ class QtQuick2ApplicationViewerPrivate *d;
+};
+
+#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/.gitignore b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/.gitignore
new file mode 100644
index 000000000..47f0e1ba0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/.gitignore
@@ -0,0 +1,5 @@
+*.pro.user
+*.o
+moc_*.cpp
+Makefile
+*.so
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/FordSdlCore.pro b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/FordSdlCore.pro
new file mode 100644
index 000000000..ea541b24c
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/FordSdlCore.pro
@@ -0,0 +1,48 @@
+TEMPLATE = lib
+TARGET = FordSdlCore
+QT += qml quick
+CONFIG += qt plugin
+
+TARGET = $$qtLibraryTarget($$TARGET)
+uri = com.ford.sdlcore
+
+# Input
+SOURCES += \
+ fordsdlcore_plugin.cpp \
+ smartdevicelink.cpp \
+ sdlalert.cpp \
+ QtWebsocket/QWsSocket.cpp \
+ QtWebsocket/QWsServer.cpp \
+ sdlappslistmodel.cpp
+
+HEADERS += \
+ fordsdlcore_plugin.h \
+ smartdevicelink.h \
+ sdlalert.h \
+ QtWebsocket/QWsSocket.h \
+ QtWebsocket/QWsServer.h \
+ sdlappslistmodel.h
+
+OTHER_FILES = qmldir
+
+!equals(_PRO_FILE_PWD_, $$OUT_PWD) {
+ copy_qmldir.target = $$OUT_PWD/qmldir
+ copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
+ copy_qmldir.commands = $(COPY_FILE) \"$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)\" \"$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)\"
+ QMAKE_EXTRA_TARGETS += copy_qmldir
+ PRE_TARGETDEPS += $$copy_qmldir.target
+}
+
+qmldir.files = qmldir
+unix {
+ installPath = ../BananaSnacks/plugins/com/ford/sdlcore
+ qmldir.path = $$installPath
+ target.path = $$installPath
+ INSTALLS += target qmldir
+}
+
+linux-g++* {
+ QMAKE_CXXFLAGS += -m32
+ QMAKE_LFLAGS += -m32
+}
+QMAKE_LIBDIR += /usr/lib/i386-linux-gnu/mesa
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.cpp
new file mode 100644
index 000000000..5e86daa2f
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.cpp
@@ -0,0 +1,470 @@
+#include "QWsServer.h"
+
+#include <QRegExp>
+#include <QStringList>
+#include <QByteArray>
+#include <QCryptographicHash>
+#include <QDateTime>
+
+const QString QWsServer::regExpResourceNameStr( QLatin1String("^GET\\s(.*)\\sHTTP/1.1\r\n") );
+const QString QWsServer::regExpHostStr( QLatin1String("\r\nHost:\\s(.+(:\\d+)?)\r\n") );
+const QString QWsServer::regExpKeyStr( QLatin1String("\r\nSec-WebSocket-Key:\\s(.{24})\r\n") );
+const QString QWsServer::regExpKey1Str( QLatin1String("\r\nSec-WebSocket-Key1:\\s(.+)\r\n") );
+const QString QWsServer::regExpKey2Str( QLatin1String("\r\nSec-WebSocket-Key2:\\s(.+)\r\n") );
+const QString QWsServer::regExpKey3Str( QLatin1String("\r\n(.{8})$") );
+const QString QWsServer::regExpVersionStr( QLatin1String("\r\nSec-WebSocket-Version:\\s(\\d+)\r\n") );
+const QString QWsServer::regExpOriginStr( QLatin1String("\r\nSec-WebSocket-Origin:\\s(.+)\r\n") );
+const QString QWsServer::regExpOrigin2Str( QLatin1String("\r\nOrigin:\\s(.+)\r\n") );
+const QString QWsServer::regExpProtocolStr( QLatin1String("\r\nSec-WebSocket-Protocol:\\s(.+)\r\n") );
+const QString QWsServer::regExpExtensionsStr( QLatin1String("\r\nSec-WebSocket-Extensions:\\s(.+)\r\n") );
+
+QWsServer::QWsServer(QObject * parent)
+ : QObject(parent)
+{
+ tcpServer = new QTcpServer(this);
+ connect( tcpServer, SIGNAL(newConnection()), this, SLOT(newTcpConnection()) );
+ qsrand( QDateTime::currentMSecsSinceEpoch() );
+}
+
+QWsServer::~QWsServer()
+{
+ tcpServer->deleteLater();
+}
+
+bool QWsServer::listen(const QHostAddress & address, quint16 port)
+{
+ return tcpServer->listen(address, port);
+}
+
+void QWsServer::close()
+{
+ tcpServer->close();
+}
+
+QAbstractSocket::SocketError QWsServer::serverError()
+{
+ return tcpServer->serverError();
+}
+
+QString QWsServer::errorString()
+{
+ return tcpServer->errorString();
+}
+
+void QWsServer::newTcpConnection()
+{
+ QTcpSocket * tcpSocket = tcpServer->nextPendingConnection();
+ connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(dataReceived()) );
+ headerBuffer.insert( tcpSocket, QStringList() );
+}
+
+void QWsServer::closeTcpConnection()
+{
+ QTcpSocket * tcpSocket = qobject_cast<QTcpSocket*>( sender() );
+ if (tcpSocket == 0)
+ return;
+
+ tcpSocket->close();
+}
+
+void QWsServer::dataReceived()
+{
+ QTcpSocket * tcpSocket = qobject_cast<QTcpSocket*>( sender() );
+ if (tcpSocket == 0)
+ return;
+
+ bool allHeadersFetched = false;
+
+ const QLatin1String emptyLine("\r\n");
+
+ while ( tcpSocket->canReadLine() )
+ {
+ QString line = tcpSocket->readLine();
+
+ if (line == emptyLine)
+ {
+ allHeadersFetched = true;
+ break;
+ }
+
+ headerBuffer[ tcpSocket ].append(line);
+ }
+
+ if (!allHeadersFetched)
+ return;
+
+ QString request( headerBuffer[ tcpSocket ].join("") );
+
+ QRegExp regExp;
+ regExp.setMinimal( true );
+
+ // Extract mandatory datas
+ // Version
+ regExp.setPattern( QWsServer::regExpVersionStr );
+ regExp.indexIn(request);
+ QString versionStr = regExp.cap(1);
+ EWebsocketVersion version;
+ if ( ! versionStr.isEmpty() )
+ {
+ version = (EWebsocketVersion)versionStr.toInt();
+ }
+ else if ( tcpSocket->bytesAvailable() >= 8 )
+ {
+ version = WS_V0;
+ request.append( tcpSocket->read(8) );
+ }
+ else
+ {
+ version = WS_VUnknow;
+ }
+
+ // Resource name
+ regExp.setPattern( QWsServer::regExpResourceNameStr );
+ regExp.indexIn(request);
+ QString resourceName = regExp.cap(1);
+
+ // Host (address & port)
+ regExp.setPattern( QWsServer::regExpHostStr );
+ regExp.indexIn(request);
+ QString host = regExp.cap(1);
+ QStringList hostTmp = host.split(':');
+ QString hostAddress = hostTmp[0];
+ QString hostPort;
+ if ( hostTmp.size() > 1 )
+ hostPort = hostTmp.last(); // fix for IPv6
+
+ // Key
+ QString key, key1, key2, key3;
+ if ( version >= WS_V4 )
+ {
+ regExp.setPattern( QWsServer::regExpKeyStr );
+ regExp.indexIn(request);
+ key = regExp.cap(1);
+ }
+ else
+ {
+ regExp.setPattern( QWsServer::regExpKey1Str );
+ regExp.indexIn(request);
+ key1 = regExp.cap(1);
+ regExp.setPattern( QWsServer::regExpKey2Str );
+ regExp.indexIn(request);
+ key2 = regExp.cap(1);
+ regExp.setPattern( QWsServer::regExpKey3Str );
+ regExp.indexIn(request);
+ key3 = regExp.cap(1);
+ }
+
+ ////////////////////////////////////////////////////////////////////
+
+ // If the mandatory fields are not specified, we abord the connection to the Websocket server
+ if ( version == WS_VUnknow || resourceName.isEmpty() || hostAddress.isEmpty() || ( key.isEmpty() && ( key1.isEmpty() || key2.isEmpty() || key3.isEmpty() ) ) )
+ {
+ // Send bad request response
+ QString response = QWsServer::composeBadRequestResponse( QList<EWebsocketVersion>() << WS_V6 << WS_V7 << WS_V8 << WS_V13 );
+ tcpSocket->write( response.toUtf8() );
+ tcpSocket->flush();
+ return;
+ }
+
+ ////////////////////////////////////////////////////////////////////
+
+ // Extract optional datas
+
+ // Origin
+ regExp.setPattern( QWsServer::regExpOriginStr );
+ if ( regExp.indexIn(request) == -1 )
+ {
+ regExp.setPattern( QWsServer::regExpOrigin2Str );
+ regExp.indexIn(request);
+ }
+ QString origin = regExp.cap(1);
+
+ // Protocol
+ regExp.setPattern( QWsServer::regExpProtocolStr );
+ regExp.indexIn(request);
+ QString protocol = regExp.cap(1);
+
+ // Extensions
+ regExp.setPattern( QWsServer::regExpExtensionsStr );
+ regExp.indexIn(request);
+ QString extensions = regExp.cap(1);
+
+ ////////////////////////////////////////////////////////////////////
+
+ // Compose opening handshake response
+ QString response;
+
+ if ( version >= WS_V6 )
+ {
+ QString accept = computeAcceptV4( key );
+ response = QWsServer::composeOpeningHandshakeResponseV6( accept, protocol );
+ }
+ else if ( version >= WS_V4 )
+ {
+ QString accept = computeAcceptV4( key );
+ QString nonce = generateNonce();
+ response = QWsServer::composeOpeningHandshakeResponseV4( accept, nonce, protocol );
+ }
+ else
+ {
+ QString accept = computeAcceptV0( key1, key2, key3 );
+ response = QWsServer::composeOpeningHandshakeResponseV0( accept, origin, hostAddress, hostPort, resourceName , protocol );
+ }
+
+ // Handshake OK, disconnect readyRead
+ disconnect( tcpSocket, SIGNAL(readyRead()), this, SLOT(dataReceived()) );
+
+ // Send opening handshake response
+ if ( version == WS_V0 )
+ tcpSocket->write( response.toLatin1() );
+ else
+ tcpSocket->write( response.toUtf8() );
+ tcpSocket->flush();
+
+ QWsSocket * wsSocket = new QWsSocket( this, tcpSocket, version );
+ wsSocket->setResourceName( resourceName );
+ wsSocket->setHost( host );
+ wsSocket->setHostAddress( hostAddress );
+ wsSocket->setHostPort( hostPort.toInt() );
+ wsSocket->setOrigin( origin );
+ wsSocket->setProtocol( protocol );
+ wsSocket->setExtensions( extensions );
+ wsSocket->serverSideSocket = true;
+
+ // ORIGINAL CODE
+ //int socketDescriptor = tcpSocket->socketDescriptor();
+ //incomingConnection( socketDescriptor );
+
+ // CHANGED CODE FOR LINUX COMPATIBILITY
+ addPendingConnection( wsSocket );
+ emit newConnection();
+}
+
+void QWsServer::incomingConnection( int socketDescriptor )
+{
+ QTcpSocket * tcpSocket = new QTcpSocket( tcpServer );
+ tcpSocket->setSocketDescriptor( socketDescriptor, QAbstractSocket::ConnectedState );
+ QWsSocket * wsSocket = new QWsSocket( this, tcpSocket );
+
+ addPendingConnection( wsSocket );
+ emit newConnection();
+}
+
+void QWsServer::addPendingConnection( QWsSocket * socket )
+{
+ if ( pendingConnections.size() < maxPendingConnections() )
+ pendingConnections.enqueue( socket );
+}
+
+QWsSocket * QWsServer::nextPendingConnection()
+{
+ return pendingConnections.dequeue();
+}
+
+bool QWsServer::hasPendingConnections()
+{
+ if ( pendingConnections.size() > 0 )
+ return true;
+ return false;
+}
+
+int QWsServer::maxPendingConnections()
+{
+ return tcpServer->maxPendingConnections();
+}
+
+bool QWsServer::isListening()
+{
+ return tcpServer->isListening();
+}
+
+QNetworkProxy QWsServer::proxy()
+{
+ return tcpServer->proxy();
+}
+
+QHostAddress QWsServer::serverAddress()
+{
+ return tcpServer->serverAddress();
+}
+
+quint16 QWsServer::serverPort()
+{
+ return tcpServer->serverPort();
+}
+
+void QWsServer::setMaxPendingConnections( int numConnections )
+{
+ tcpServer->setMaxPendingConnections( numConnections );
+}
+
+void QWsServer::setProxy( const QNetworkProxy & networkProxy )
+{
+ tcpServer->setProxy( networkProxy );
+}
+
+bool QWsServer::setSocketDescriptor( int socketDescriptor )
+{
+ return tcpServer->setSocketDescriptor( socketDescriptor );
+}
+
+int QWsServer::socketDescriptor()
+{
+ return tcpServer->socketDescriptor();
+}
+
+bool QWsServer::waitForNewConnection( int msec, bool * timedOut )
+{
+ return tcpServer->waitForNewConnection( msec, timedOut );
+}
+
+QString QWsServer::computeAcceptV0( QString key1, QString key2, QString key3 )
+{
+ QString numStr1;
+ QString numStr2;
+
+ QChar carac;
+ for ( int i=0 ; i<key1.size() ; i++ )
+ {
+ carac = key1[ i ];
+ if ( carac.isDigit() )
+ numStr1.append( carac );
+ }
+ for ( int i=0 ; i<key2.size() ; i++ )
+ {
+ carac = key2[ i ];
+ if ( carac.isDigit() )
+ numStr2.append( carac );
+ }
+
+ quint32 num1 = numStr1.toUInt();
+ quint32 num2 = numStr2.toUInt();
+
+ int numSpaces1 = key1.count( ' ' );
+ int numSpaces2 = key2.count( ' ' );
+
+ num1 /= numSpaces1;
+ num2 /= numSpaces2;
+
+ QString concat = serializeInt( num1 ) + serializeInt( num2 ) + key3;
+
+ QByteArray md5 = QCryptographicHash::hash( concat.toLatin1(), QCryptographicHash::Md5 );
+
+ return QString( md5 );
+}
+
+QString QWsServer::computeAcceptV4(QString key)
+{
+ key += QLatin1String("258EAFA5-E914-47DA-95CA-C5AB0DC85B11");
+ QByteArray hash = QCryptographicHash::hash ( key.toUtf8(), QCryptographicHash::Sha1 );
+ return hash.toBase64();
+}
+
+QString QWsServer::generateNonce()
+{
+ qsrand( QDateTime::currentDateTime().toTime_t() );
+
+ QByteArray nonce;
+ int i = 16;
+
+ while( i-- )
+ {
+ nonce.append( qrand() % 0x100 );
+ }
+
+ return QString( nonce.toBase64() );
+}
+
+QByteArray QWsServer::serializeInt( quint32 number, quint8 nbBytes )
+{
+ QByteArray ba;
+ quint8 currentNbBytes = 0;
+ while (number > 0 && currentNbBytes < nbBytes)
+ {
+ char car = static_cast<char>(number & 0xFF);
+ ba.prepend( car );
+ number = number >> 8;
+ currentNbBytes++;
+ }
+ char car = 0x00;
+ while (currentNbBytes < nbBytes)
+ {
+ ba.prepend( car );
+ currentNbBytes++;
+ }
+ return ba;
+}
+
+QString QWsServer::composeOpeningHandshakeResponseV0( QString accept, QString origin, QString hostAddress, QString hostPort, QString resourceName, QString protocol )
+{
+ QString response;
+
+ response.append( QLatin1String("HTTP/1.1 101 WebSocket Protocol Handshake\r\n") );
+ response.append( QLatin1String("Upgrade: Websocket\r\n") );
+ response.append( QLatin1String("Connection: Upgrade\r\n") );
+ response.append( QLatin1String("Sec-WebSocket-Origin: ") + origin + QLatin1String("\r\n") );
+ response.append( QLatin1String("Sec-WebSocket-Location: ws://") + hostAddress);
+ if (!hostPort.isEmpty())
+ response.append(QLatin1String(":") + hostPort);
+ response.append(resourceName + QLatin1String("\r\n"));
+ if ( ! protocol.isEmpty() )
+ response.append( QLatin1String("Sec-WebSocket-Protocol: ") + protocol + QLatin1String("\r\n") );
+ response.append( QLatin1String("\r\n") );
+ response.append( accept );
+
+ return response;
+}
+
+QString QWsServer::composeOpeningHandshakeResponseV4( QString accept, QString nonce, QString protocol, QString extensions )
+{
+ QString response;
+
+ response.append( QLatin1String("HTTP/1.1 101 Switching Protocols\r\n") );
+ response.append( QLatin1String("Upgrade: websocket\r\n") );
+ response.append( QLatin1String("Connection: Upgrade\r\n") );
+ response.append( QLatin1String("Sec-WebSocket-Accept: ") + accept + QLatin1String("\r\n") );
+ response.append( QLatin1String("Sec-WebSocket-Nonce: ") + nonce + QLatin1String("\r\n") );
+ if ( ! protocol.isEmpty() )
+ response.append( QLatin1String("Sec-WebSocket-Protocol: ") + protocol + QLatin1String("\r\n") );
+ if ( ! extensions.isEmpty() )
+ response.append( QLatin1String("Sec-WebSocket-Extensions: ") + extensions + QLatin1String("\r\n") );
+ response.append( QLatin1String("\r\n") );
+
+ return response;
+}
+
+QString QWsServer::composeOpeningHandshakeResponseV6( QString accept, QString protocol, QString extensions )
+{
+ QString response;
+
+ response.append( QLatin1String("HTTP/1.1 101 Switching Protocols\r\n") );
+ response.append( QLatin1String("Upgrade: websocket\r\n") );
+ response.append( QLatin1String("Connection: Upgrade\r\n") );
+ response.append( QLatin1String("Sec-WebSocket-Accept: ") + accept + QLatin1String("\r\n") );
+ if ( ! protocol.isEmpty() )
+ response.append( QLatin1String("Sec-WebSocket-Protocol: ") + protocol + QLatin1String("\r\n") );
+ if ( ! extensions.isEmpty() )
+ response.append( QLatin1String("Sec-WebSocket-Extensions: ") + extensions + QLatin1String("\r\n") );
+ response.append( QLatin1String("\r\n") );
+
+ return response;
+}
+
+QString QWsServer::composeBadRequestResponse( QList<EWebsocketVersion> versions )
+{
+ QString response;
+
+ response.append( QLatin1String("HTTP/1.1 400 Bad Request\r\n") );
+ if ( ! versions.isEmpty() )
+ {
+ QString versionsStr = QString::number( (int)versions.takeLast() );
+ int i = versions.size();
+ while ( i-- )
+ {
+ versionsStr.append( QLatin1String(", ") + QString::number( (int)versions.takeLast() ) );
+ }
+ response.append( QLatin1String("Sec-WebSocket-Version: ") + versionsStr + QLatin1String("\r\n") );
+ }
+
+ return response;
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.h
new file mode 100644
index 000000000..c526c747a
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsServer.h
@@ -0,0 +1,87 @@
+#ifndef QWSSERVER_H
+#define QWSSERVER_H
+
+#include <QTcpServer>
+#include <QTcpSocket>
+#include <QNetworkProxy>
+#include <QString>
+#include <QStringList>
+#include <QMap>
+#include <QQueue>
+
+#include "QWsSocket.h"
+
+class QWsServer : public QObject
+{
+ Q_OBJECT
+
+public:
+ // ctor
+ QWsServer(QObject * parent = 0);
+ // dtor
+ virtual ~QWsServer();
+
+ // public functions
+ void close();
+ QString errorString();
+ bool hasPendingConnections();
+ bool isListening();
+ bool listen(const QHostAddress & address = QHostAddress::Any, quint16 port = 0);
+ int maxPendingConnections();
+ virtual QWsSocket * nextPendingConnection();
+ QNetworkProxy proxy();
+ QHostAddress serverAddress();
+ QAbstractSocket::SocketError serverError();
+ quint16 serverPort();
+ void setMaxPendingConnections( int numConnections );
+ void setProxy( const QNetworkProxy & networkProxy );
+ bool setSocketDescriptor( int socketDescriptor );
+ int socketDescriptor();
+ bool waitForNewConnection( int msec = 0, bool * timedOut = 0 );
+
+signals:
+ void newConnection();
+
+protected:
+ // protected functions
+ void addPendingConnection( QWsSocket * socket );
+ virtual void incomingConnection( int socketDescriptor );
+
+private slots:
+ // private slots
+ void newTcpConnection();
+ void closeTcpConnection();
+ void dataReceived();
+
+private:
+ // private attributes
+ QTcpServer * tcpServer;
+ QQueue<QWsSocket*> pendingConnections;
+ QMap<const QTcpSocket*, QStringList> headerBuffer;
+
+public:
+ // public static functions
+ static QByteArray serializeInt( quint32 number, quint8 nbBytes = 4 );
+ static QString computeAcceptV0( QString key1, QString key2, QString thirdPart );
+ static QString computeAcceptV4( QString key );
+ static QString generateNonce();
+ static QString composeOpeningHandshakeResponseV0( QString accept, QString origin, QString hostAddress, QString hostPort, QString resourceName, QString protocol = "" );
+ static QString composeOpeningHandshakeResponseV4( QString accept, QString nonce, QString protocol = "", QString extensions = "" );
+ static QString composeOpeningHandshakeResponseV6( QString accept, QString protocol = "", QString extensions = "" );
+ static QString composeBadRequestResponse( QList<EWebsocketVersion> versions = QList<EWebsocketVersion>() );
+
+ // public static vars
+ static const QString regExpResourceNameStr;
+ static const QString regExpHostStr;
+ static const QString regExpKeyStr;
+ static const QString regExpKey1Str;
+ static const QString regExpKey2Str;
+ static const QString regExpKey3Str;
+ static const QString regExpVersionStr;
+ static const QString regExpOriginStr;
+ static const QString regExpOrigin2Str;
+ static const QString regExpProtocolStr;
+ static const QString regExpExtensionsStr;
+};
+
+#endif // QWSSERVER_H
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.cpp
new file mode 100644
index 000000000..540b909e0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.cpp
@@ -0,0 +1,792 @@
+#include "QWsSocket.h"
+
+#include <QCryptographicHash>
+#include <QtEndian>
+
+#include "QWsServer.h"
+
+int QWsSocket::maxBytesPerFrame = 1400;
+const QString QWsSocket::regExpAcceptStr(QLatin1String("Sec-WebSocket-Accept:\\s(.{28})\r\n"));
+const QString QWsSocket::regExpUpgradeStr(QLatin1String("Upgrade:\\s(.+)\r\n"));
+const QString QWsSocket::regExpConnectionStr(QLatin1String("Connection:\\s(.+)\r\n"));
+
+QWsSocket::QWsSocket( QObject * parent, QTcpSocket * socket, EWebsocketVersion ws_v ) :
+ QAbstractSocket( QAbstractSocket::UnknownSocketType, parent ),
+ tcpSocket( socket ? socket : new QTcpSocket(this) ),
+ _version( ws_v ),
+ _hostPort( -1 ),
+ closingHandshakeSent( false ),
+ closingHandshakeReceived( false ),
+ readingState( HeaderPending ),
+ isFinalFragment( false ),
+ hasMask( false ),
+ payloadLength( 0 ),
+ maskingKey( 4, 0 ),
+ serverSideSocket( false )
+{
+ tcpSocket->setParent( this );
+
+ QAbstractSocket::setSocketState( tcpSocket->state() );
+ QAbstractSocket::setPeerAddress( tcpSocket->peerAddress() );
+ QAbstractSocket::setPeerPort( tcpSocket->peerPort() );
+
+ if ( _version == WS_V0 )
+ connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(processDataV0()) );
+ else if ( _version >= WS_V4 )
+ connect( tcpSocket, SIGNAL(readyRead()), this, SLOT(processDataV4()) );
+ connect( tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(error(QAbstractSocket::SocketError)) );
+ connect( tcpSocket, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), this, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)) );
+ connect( tcpSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(processTcpStateChanged(QAbstractSocket::SocketState)) );
+ connect( tcpSocket, SIGNAL(readChannelFinished()), this, SIGNAL(readChannelFinished()) );
+ connect( tcpSocket, SIGNAL(hostFound()), this, SIGNAL(hostFound()) );
+}
+
+QWsSocket::~QWsSocket()
+{
+ QAbstractSocket::SocketState state = QAbstractSocket::state();
+ if ( state != QAbstractSocket::UnconnectedState )
+ {
+ qDebug() << "CloseAway, socket destroyed in server";
+ close( CloseGoingAway, QLatin1String("The server destroyed the socket.") );
+ tcpSocket->abort();
+ QAbstractSocket::setSocketState( QAbstractSocket::UnconnectedState );
+ QAbstractSocket::stateChanged( QAbstractSocket::UnconnectedState );
+ emit QAbstractSocket::disconnected();
+ }
+}
+
+void QWsSocket::connectToHost( const QString & hostName, quint16 port, OpenMode mode )
+{
+ QWsSocket::connectToHost( QHostAddress(hostName), port, mode );
+}
+
+void QWsSocket::connectToHost( const QHostAddress &address, quint16 port, OpenMode mode )
+{
+ handshakeResponse.clear();
+ setPeerAddress( address );
+ setPeerPort( port );
+ setOpenMode( mode );
+ tcpSocket->connectToHost( address, port, mode );
+}
+
+void QWsSocket::disconnectFromHost()
+{
+ QWsSocket::close();
+}
+
+void QWsSocket::abort( QString reason )
+{
+ QWsSocket::close( CloseAbnormalDisconnection, reason );
+ tcpSocket->abort();
+}
+
+void QWsSocket::close( ECloseStatusCode closeStatusCode, QString reason )
+{
+ if ( QAbstractSocket::state() == QAbstractSocket::UnconnectedState )
+ return;
+
+ if ( ! closingHandshakeSent )
+ {
+ switch ( _version )
+ {
+ case WS_V4:
+ case WS_V5:
+ case WS_V6:
+ case WS_V7:
+ case WS_V8:
+ case WS_V13:
+ {
+ // Compose and send close frame
+ QByteArray BA;
+
+ // Body
+ if ( closeStatusCode == NoCloseStatusCode )
+ {
+ // Header
+ BA.append( QWsSocket::composeHeader( true, OpClose, 0 ) );
+ }
+ else
+ {
+ // Header
+ QByteArray maskingKey;
+ if ( ! serverSideSocket )
+ maskingKey = QWsSocket::generateMaskingKey();
+ BA.append( QWsSocket::composeHeader( true, OpClose, reason.size() + 2, maskingKey ) );
+
+ QByteArray body;
+
+ // Close status code (optional)
+ body.append( QWsServer::serializeInt( (int)closeStatusCode, 2 ) );
+
+ // Reason (optional)
+ if ( reason.size() )
+ {
+ QByteArray reason_ba = reason.toUtf8();
+ if ( ! serverSideSocket )
+ {
+ reason_ba = QWsSocket::mask( reason_ba, maskingKey );
+ }
+ body.append( reason_ba );
+ }
+
+ BA.append( body );
+ }
+
+ // Send closing handshake
+ tcpSocket->write( BA );
+
+ break;
+ }
+ case WS_V0:
+ {
+ QByteArray closeFrame;
+ closeFrame.append( (char)0xFF );
+ closeFrame.append( (char)0x00 );
+ tcpSocket->write( closeFrame );
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ closingHandshakeSent = true;
+ }
+
+ if ( QAbstractSocket::state() != QAbstractSocket::ClosingState )
+ {
+ QAbstractSocket::setSocketState( QAbstractSocket::ClosingState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::ClosingState );
+ emit QAbstractSocket::aboutToClose();
+ }
+
+ if ( closingHandshakeSent && closingHandshakeReceived )
+ {
+ QAbstractSocket::setSocketState( QAbstractSocket::UnconnectedState );
+ emit stateChanged( QAbstractSocket::UnconnectedState );
+ emit disconnected();
+ tcpSocket->disconnectFromHost();
+ }
+}
+
+qint64 QWsSocket::write( const QString & string )
+{
+ if ( _version == WS_V0 )
+ {
+ return QWsSocket::write( string.toUtf8() );
+ }
+
+ const QList<QByteArray>& framesList = QWsSocket::composeFrames( string.toUtf8(), false, maxBytesPerFrame );
+ return writeFrames( framesList );
+}
+
+qint64 QWsSocket::write( const QByteArray & byteArray )
+{
+ if ( _version == WS_V0 )
+ {
+ QByteArray BA;
+ BA.append( (char)0x00 );
+ BA.append( byteArray );
+ BA.append( (char)0xFF );
+ return writeFrame( BA );
+ }
+
+ const QList<QByteArray>& framesList = QWsSocket::composeFrames( byteArray, true, maxBytesPerFrame );
+
+ qint64 nbBytesWritten = writeFrames( framesList );
+ emit bytesWritten( nbBytesWritten );
+
+ return nbBytesWritten;
+}
+
+void QWsSocket::processHandshake()
+{
+ //copy from QWsServer::dataReceived();
+ QTcpSocket * tcpSocket = qobject_cast<QTcpSocket*>( sender() );
+ if (tcpSocket == 0)
+ return;
+
+ bool allHeadersFetched = false;
+
+ const QLatin1String emptyLine("\r\n");
+
+ while ( tcpSocket->canReadLine() )
+ {
+ QString line = tcpSocket->readLine();
+
+ if (line == emptyLine)
+ {
+ allHeadersFetched = true;
+ break;
+ }
+
+ handshakeResponse.append(line);
+ }
+
+ if (!allHeadersFetched)
+ return;
+
+ QRegExp regExp;
+ regExp.setMinimal( true );
+
+ // check accept field
+ regExp.setPattern(regExpAcceptStr);
+ regExp.indexIn(handshakeResponse);
+ QString acceptFromServer = regExp.cap(1);
+
+ // check upgrade field
+ regExp.setPattern(regExpUpgradeStr);
+ regExp.indexIn(handshakeResponse);
+ QString upgrade = regExp.cap(1);
+
+ // check connection field
+ regExp.setPattern(regExpConnectionStr);
+ regExp.indexIn(handshakeResponse);
+ QString connection = regExp.cap(1);
+
+ // check extensions field
+ regExp.setPattern(QWsServer::regExpExtensionsStr);
+ regExp.indexIn(handshakeResponse);
+ QString extensions = regExp.cap(1);
+
+ //TODO: check extensions field
+ // If the mandatory params are not setted, we abord the connection to the Websocket server
+ if((acceptFromServer.isEmpty()) || (!upgrade.contains(QLatin1String("websocket"), Qt::CaseInsensitive)) ||
+ (!connection.contains(QLatin1String("Upgrade"), Qt::CaseInsensitive)))
+ {
+ // emit error(QAbstractSocket::ConnectionRefusedError);
+ // return;
+ }
+
+ //TODO: check HTTP code
+
+ //TODO: check protocol field
+
+ QString accept = QWsServer::computeAcceptV4(key);
+ if(accept != acceptFromServer)
+ {
+ // emit error(QAbstractSocket::ConnectionRefusedError);
+ // return;
+ }
+
+ // handshake procedure succeeded
+ QAbstractSocket::setSocketState( QAbstractSocket::ConnectedState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::ConnectedState );
+ emit QAbstractSocket::connected();
+}
+
+void QWsSocket::processDataV0()
+{
+ if( state() == QAbstractSocket::ConnectingState )
+ {
+ processHandshake();
+ return;
+ }
+
+ QByteArray BA, buffer;
+ quint8 type, b = 0x00;
+
+ BA = tcpSocket->read(1); //TODO: refactor like processDataV4
+ type = BA[0];
+
+ if ( ( type & 0x80 ) == 0x00 ) // MSB of type not set
+ {
+ if ( type != 0x00 )
+ {
+ // ABORT CONNEXION
+ tcpSocket->readAll();
+ return;
+ }
+
+ // read data
+ do
+ {
+ BA = tcpSocket->read(1);
+ b = BA[0];
+ if ( b != 0xFF )
+ buffer.append( b );
+ } while ( b != 0xFF );
+
+ currentFrame.append( buffer );
+ }
+ else // MSB of type set
+ {
+ if ( type != 0xFF )
+ {
+ // ERROR, ABORT CONNEXION
+ close();
+ return;
+ }
+
+ quint8 length = 0x00;
+
+ bool bIsNotZero = true;
+ do
+ {
+ BA = tcpSocket->read(1);
+ b = BA[0];
+ bIsNotZero = ( b != 0x00 ? true : false );
+ if ( bIsNotZero ) // b must be != 0
+ {
+ quint8 b_v = b & 0x7F;
+ length *= 128;
+ length += b_v;
+ }
+ } while ( ( ( b & 0x80 ) == 0x80 ) && bIsNotZero );
+
+ BA = tcpSocket->read(length); // discard this bytes
+ }
+
+ if ( currentFrame.size() > 0 )
+ {
+ emit frameReceived( QString::fromUtf8(currentFrame) );
+ currentFrame.clear();
+ }
+
+ if ( tcpSocket->bytesAvailable() )
+ processDataV0();
+}
+
+void QWsSocket::processDataV4()
+{
+ if( state() == QAbstractSocket::ConnectingState )
+ {
+ processHandshake();
+ }
+ else
+ while (true)
+ switch ( readingState ) {
+ case HeaderPending: {
+ if (tcpSocket->bytesAvailable() < 2)
+ return;
+
+ // END, RSV1-3, Opcode
+ char header[2];
+ tcpSocket->read(header, 2); // XXX: Handle return value
+ isFinalFragment = (header[0] & 0x80) != 0;
+ opcode = static_cast<EOpcode>(header[0] & 0x0F);
+
+ // Mask, PayloadLength
+ hasMask = (header[1] & 0x80) != 0;
+ quint8 length = (header[1] & 0x7F);
+
+ switch (length)
+ {
+ case 126:
+ readingState = PayloadLengthPending;
+ break;
+ case 127:
+ readingState = BigPayloadLenghPending;
+ break;
+ default:
+ payloadLength = length;
+ readingState = MaskPending;
+ break;
+ }
+ }; break;
+ case PayloadLengthPending: {
+ if (tcpSocket->bytesAvailable() < 2)
+ return;
+
+ uchar length[2];
+ tcpSocket->read(reinterpret_cast<char *>(length), 2); // XXX: Handle return value
+ payloadLength = qFromBigEndian<quint16>(reinterpret_cast<const uchar *>(length));
+ readingState = MaskPending;
+ }; break;
+ case BigPayloadLenghPending: {
+ if (tcpSocket->bytesAvailable() < 8)
+ return;
+
+ uchar length[8];
+ tcpSocket->read(reinterpret_cast<char *>(length), 8); // XXX: Handle return value
+ // Most significant bit must be set to 0 as per http://tools.ietf.org/html/rfc6455#section-5.2
+ // XXX: Check for that?
+ payloadLength = qFromBigEndian<quint64>(length) & ~(1LL << 63);
+ readingState = MaskPending;
+ }; break;
+ case MaskPending: {
+ if (!hasMask) {
+ readingState = PayloadBodyPending;
+ break;
+ }
+
+ if (tcpSocket->bytesAvailable() < 4)
+ return;
+
+ tcpSocket->read(maskingKey.data(), 4); // XXX: Handle return value
+
+ if ( opcode == OpClose )
+ {
+ readingState = CloseDataPending;
+ }
+ else
+ {
+ readingState = PayloadBodyPending;
+ }
+ }; /* Intentional fall-through */
+ case PayloadBodyPending: {
+ // TODO: Handle large payloads
+ if (tcpSocket->bytesAvailable() < static_cast<qint32>(payloadLength))
+ return;
+
+ if ( opcode == OpClose )
+ {
+ if ( payloadLength >= 2 && tcpSocket->bytesAvailable() >= 2 )
+ {
+ uchar bytes[2];
+ tcpSocket->read( reinterpret_cast<char *>(bytes), 2 );
+ closeStatusCode = (ECloseStatusCode)qFromBigEndian<quint16>( reinterpret_cast<const uchar *>(bytes) );
+ }
+ else
+ {
+ closeStatusCode = NoCloseStatusCode;
+ }
+ }
+
+ QByteArray ApplicationData = tcpSocket->read( payloadLength );
+ if ( hasMask )
+ ApplicationData = QWsSocket::mask( ApplicationData, maskingKey );
+ currentFrame.append( ApplicationData );
+
+ readingState = HeaderPending;
+
+ if ( !isFinalFragment )
+ break;
+
+ switch ( opcode )
+ {
+ case OpBinary:
+ emit frameReceived( currentFrame );
+ break;
+ case OpText:
+ emit frameReceived( QString::fromUtf8(currentFrame) );
+ break;
+ case OpPing:
+ write( QWsSocket::composeHeader( true, OpPong, 0 ) );
+ break;
+ case OpPong:
+ emit pong( pingTimer.elapsed() );
+ break;
+ case OpClose:
+ closingHandshakeReceived = true;
+ close( closeStatusCode );
+ break;
+ default:
+ // DO NOTHING
+ break;
+ }
+
+ currentFrame.clear();
+ }; break;
+ case CloseDataPending:
+ default:
+ break;
+ } /* while (true) switch */
+}
+
+qint64 QWsSocket::writeFrame ( const QByteArray & byteArray )
+{
+ return tcpSocket->write( byteArray );
+}
+
+qint64 QWsSocket::writeFrames ( const QList<QByteArray> & framesList )
+{
+ qint64 nbBytesWritten = 0;
+ for ( int i=0 ; i<framesList.size() ; i++ )
+ {
+ nbBytesWritten += writeFrame( framesList[i] );
+ }
+ return nbBytesWritten;
+}
+
+void QWsSocket::processTcpStateChanged( QAbstractSocket::SocketState tcpSocketState )
+{
+ QAbstractSocket::SocketState wsSocketState = QAbstractSocket::state();
+ switch ( tcpSocketState )
+ {
+ case QAbstractSocket::HostLookupState:
+ {
+ QAbstractSocket::setSocketState( QAbstractSocket::HostLookupState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::HostLookupState );
+ break;
+ }
+ case QAbstractSocket::ConnectingState:
+ {
+ QAbstractSocket::setSocketState( QAbstractSocket::ConnectingState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::ConnectingState );
+ break;
+ }
+ case QAbstractSocket::ConnectedState:
+ {
+ if ( wsSocketState == QAbstractSocket::ConnectingState )
+ {
+ key = QWsServer::generateNonce();
+ QString handshake = composeOpeningHandShake( QLatin1String("/"), QLatin1String("example.com"), QString(), QString(), key );
+ tcpSocket->write( handshake.toUtf8() );
+ }
+ break;
+ }
+ case QAbstractSocket::ClosingState:
+ {
+ if ( wsSocketState == QAbstractSocket::ConnectedState )
+ {
+ QWsSocket::close( CloseGoingAway );
+ QAbstractSocket::setSocketState( QAbstractSocket::ClosingState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::ClosingState );
+ emit QAbstractSocket::aboutToClose();
+ }
+ break;
+ }
+ case QAbstractSocket::UnconnectedState:
+ {
+ if ( wsSocketState != QAbstractSocket::UnconnectedState )
+ {
+ QAbstractSocket::setSocketError( QAbstractSocket::NetworkError );
+ emit QAbstractSocket::error( QAbstractSocket::NetworkError );
+ QAbstractSocket::setSocketState( QAbstractSocket::UnconnectedState );
+ emit QAbstractSocket::stateChanged( QAbstractSocket::UnconnectedState );
+ emit QAbstractSocket::disconnected();
+ }
+ closingHandshakeSent = false;
+ closingHandshakeReceived = false;
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+QByteArray QWsSocket::generateMaskingKey()
+{
+ QByteArray key;
+ for ( int i=0 ; i<4 ; i++ )
+ {
+ key.append( qrand() % 0x100 );
+ }
+ return key;
+}
+
+QByteArray QWsSocket::generateMaskingKeyV4( QString key, QString nonce )
+{
+ QString concat = key + nonce + QLatin1String("61AC5F19-FBBA-4540-B96F-6561F1AB40A8");
+ QByteArray hash = QCryptographicHash::hash ( concat.toUtf8(), QCryptographicHash::Sha1 );
+ return hash;
+}
+
+QByteArray QWsSocket::mask( QByteArray & data, QByteArray & maskingKey )
+{
+ QByteArray result;
+ result.reserve( data.size() );
+
+ for ( int i=0 ; i<data.size() ; i++ )
+ {
+ result[i] = ( data[i] ^ maskingKey[ i % 4 ] );
+ }
+
+ return result;
+}
+
+QList<QByteArray> QWsSocket::composeFrames( QByteArray byteArray, bool asBinary, int maxFrameBytes )
+{
+ if ( maxFrameBytes == 0 )
+ maxFrameBytes = maxBytesPerFrame;
+
+ QList<QByteArray> framesList;
+
+ QByteArray maskingKey;
+
+ int nbFrames = byteArray.size() / maxFrameBytes + 1;
+
+ for ( int i=0 ; i<nbFrames ; i++ )
+ {
+ QByteArray BA;
+
+ // end, size
+ bool end = false;
+ quint64 size = maxFrameBytes;
+ EOpcode opcode = OpContinue;
+ if ( i == nbFrames-1 ) // for multi-frames
+ {
+ end = true;
+ size = byteArray.size();
+ }
+ if ( i == 0 )
+ {
+ if ( asBinary )
+ opcode = OpBinary;
+ else
+ opcode = OpText;
+ }
+
+ // Header
+ BA.append( QWsSocket::composeHeader( end, opcode, size, maskingKey ) );
+
+ // Application Data
+ QByteArray dataForThisFrame = byteArray.left( size );
+ byteArray.remove( 0, size );
+
+ //dataForThisFrame = QWsSocket::mask( dataForThisFrame, maskingKey );
+ BA.append( dataForThisFrame );
+
+ framesList << BA;
+ }
+
+ return framesList;
+}
+
+QByteArray QWsSocket::composeHeader( bool end, EOpcode opcode, quint64 payloadLength, QByteArray maskingKey )
+{
+ QByteArray BA;
+ quint8 byte;
+
+ // end, RSV1-3, Opcode
+ byte = 0x00;
+ // end
+ if ( end )
+ byte = (byte | 0x80);
+ // Opcode
+ byte = (byte | opcode);
+ BA.append( byte );
+
+ // Mask, PayloadLength
+ byte = 0x00;
+ QByteArray BAsize;
+ // Mask
+ if ( maskingKey.size() == 4 )
+ byte = (byte | 0x80);
+ // PayloadLength
+ if ( payloadLength <= 125 )
+ {
+ byte = (byte | payloadLength);
+ }
+ // Extended payloadLength
+ else
+ {
+ // 2 bytes
+ if ( payloadLength <= 0xFFFF )
+ {
+ byte = ( byte | 126 );
+ BAsize.append( ( payloadLength >> 1*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 0*8 ) & 0xFF );
+ }
+ // 8 bytes
+ else if ( payloadLength <= 0x7FFFFFFF )
+ {
+ byte = ( byte | 127 );
+ BAsize.append( ( payloadLength >> 7*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 6*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 5*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 4*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 3*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 2*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 1*8 ) & 0xFF );
+ BAsize.append( ( payloadLength >> 0*8 ) & 0xFF );
+ }
+ }
+ BA.append( byte );
+ BA.append( BAsize );
+
+ // Masking
+ if ( maskingKey.size() == 4 )
+ BA.append( maskingKey );
+
+ return BA;
+}
+
+void QWsSocket::ping()
+{
+ pingTimer.restart();
+ QByteArray pingFrame = QWsSocket::composeHeader( true, OpPing, 0 );
+ writeFrame( pingFrame );
+}
+
+void QWsSocket::setResourceName( QString rn )
+{
+ _resourceName = rn;
+}
+
+void QWsSocket::setHost( QString h )
+{
+ _host = h;
+}
+
+void QWsSocket::setHostAddress( QString ha )
+{
+ _hostAddress = ha;
+}
+
+void QWsSocket::setHostPort( int hp )
+{
+ _hostPort = hp;
+}
+
+void QWsSocket::setOrigin( QString o )
+{
+ _origin = o;
+}
+
+void QWsSocket::setProtocol( QString p )
+{
+ _protocol = p;
+}
+
+void QWsSocket::setExtensions( QString e )
+{
+ _extensions = e;
+}
+
+EWebsocketVersion QWsSocket::version()
+{
+ return _version;
+}
+
+QString QWsSocket::resourceName()
+{
+ return _resourceName;
+}
+
+QString QWsSocket::host()
+{
+ return _host;
+}
+
+QString QWsSocket::hostAddress()
+{
+ return _hostAddress;
+}
+
+int QWsSocket::hostPort()
+{
+ return _hostPort;
+}
+
+QString QWsSocket::origin()
+{
+ return _origin;
+}
+
+QString QWsSocket::protocol()
+{
+ return _protocol;
+}
+
+QString QWsSocket::extensions()
+{
+ return _extensions;
+}
+
+QString QWsSocket::composeOpeningHandShake( QString resourceName, QString host, QString origin, QString extensions, QString key )
+{
+ QString hs;
+ hs.append(QLatin1String("GET ") + resourceName + QLatin1String(" HTTP/1.1\r\n"));
+ hs.append(QLatin1String("Host: ") + host + "\r\n");
+ hs.append(QLatin1String("Upgrade: websocket\r\n"));
+ hs.append(QLatin1String("Connection: Upgrade\r\n"));
+ hs.append(QLatin1String("Sec-WebSocket-Key: ") + key + QLatin1String("\r\n"));
+ hs.append(QLatin1String("Origin: ") + origin + QLatin1String("\r\n"));
+ hs.append(QLatin1String("Sec-WebSocket-Extensions: ") + extensions + QLatin1String("\r\n"));
+ hs.append(QLatin1String("Sec-WebSocket-Version: 13\r\n"));
+ hs.append(QLatin1String("\r\n"));
+ return hs;
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.h
new file mode 100644
index 000000000..4bc095aa1
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QWsSocket.h
@@ -0,0 +1,170 @@
+#ifndef QWSSOCKET_H
+#define QWSSOCKET_H
+
+#include <QTcpSocket>
+#include <QHostAddress>
+#include <QTime>
+
+enum EWebsocketVersion
+{
+ WS_VUnknow = -1,
+ WS_V0 = 0,
+ WS_V4 = 4,
+ WS_V5 = 5,
+ WS_V6 = 6,
+ WS_V7 = 7,
+ WS_V8 = 8,
+ WS_V13 = 13
+};
+
+class QWsSocket : public QAbstractSocket
+{
+ Q_OBJECT
+
+ friend class QWsServer;
+
+public:
+ enum EOpcode
+ {
+ OpContinue = 0x0,
+ OpText = 0x1,
+ OpBinary = 0x2,
+ OpReserved3 = 0x3,
+ OpReserved4 = 0x4,
+ OpReserved5 = 0x5,
+ OpReserved6 = 0x6,
+ OpReserved7 = 0x7,
+ OpClose = 0x8,
+ OpPing = 0x9,
+ OpPong = 0xA,
+ OpReservedB = 0xB,
+ OpReservedV = 0xC,
+ OpReservedD = 0xD,
+ OpReservedE = 0xE,
+ OpReservedF = 0xF
+ };
+ enum ECloseStatusCode
+ {
+ NoCloseStatusCode = 0,
+ CloseNormal = 1000,
+ CloseGoingAway = 1001,
+ CloseProtocolError = 1002,
+ CloseDataTypeNotSupported = 1003,
+ CloseReserved1004 = 1004,
+ CloseMissingStatusCode = 1005,
+ CloseAbnormalDisconnection = 1006,
+ CloseWrongDataType = 1007,
+ ClosePolicyViolated = 1008,
+ CloseTooMuchData = 1009,
+ CloseMissingExtension = 1010,
+ CloseBadOperation = 1011,
+ CloseTLSHandshakeFailed = 1015
+ };
+
+public:
+ // ctor
+ QWsSocket( QObject * parent = 0, QTcpSocket * socket = 0, EWebsocketVersion ws_v = WS_V13 );
+ // dtor
+ virtual ~QWsSocket();
+
+ // Public methods
+ EWebsocketVersion version();
+ QString resourceName();
+ QString host();
+ QString hostAddress();
+ int hostPort();
+ QString origin();
+ QString protocol();
+ QString extensions();
+
+ void setResourceName( QString rn );
+ void setHost( QString h );
+ void setHostAddress( QString ha );
+ void setHostPort( int hp );
+ void setOrigin( QString o );
+ void setProtocol( QString p );
+ void setExtensions( QString e );
+
+ qint64 write( const QString & string ); // write data as text
+ qint64 write( const QByteArray & byteArray ); // write data as binary
+
+public slots:
+ void connectToHost( const QString & hostName, quint16 port, OpenMode mode = ReadWrite );
+ void connectToHost( const QHostAddress & address, quint16 port, OpenMode mode = ReadWrite );
+ void disconnectFromHost();
+ void abort( QString reason = QString() );
+ void ping();
+
+signals:
+ void frameReceived(QString frame);
+ void frameReceived(QByteArray frame);
+ void pong(quint64 elapsedTime);
+
+protected:
+ qint64 writeFrames ( const QList<QByteArray> & framesList );
+ qint64 writeFrame ( const QByteArray & byteArray );
+
+protected slots:
+ virtual void close( ECloseStatusCode closeStatusCode = NoCloseStatusCode, QString reason = QString() );
+ void processDataV0();
+ void processDataV4();
+ void processHandshake();
+ void processTcpStateChanged( QAbstractSocket::SocketState socketState );
+
+private:
+ enum EReadingState
+ {
+ HeaderPending,
+ PayloadLengthPending,
+ BigPayloadLenghPending,
+ MaskPending,
+ PayloadBodyPending,
+ CloseDataPending
+ };
+
+ // private vars
+ QTcpSocket * tcpSocket;
+ QByteArray currentFrame;
+ QTime pingTimer;
+
+ EWebsocketVersion _version;
+ QString _resourceName;
+ QString _host;
+ QString _hostAddress;
+ int _hostPort;
+ QString _origin;
+ QString _protocol;
+ QString _extensions;
+ bool serverSideSocket;
+
+ bool closingHandshakeSent;
+ bool closingHandshakeReceived;
+
+ EReadingState readingState;
+ EOpcode opcode;
+ bool isFinalFragment;
+ bool hasMask;
+ quint64 payloadLength;
+ QByteArray maskingKey;
+ ECloseStatusCode closeStatusCode;
+
+ static const QString regExpAcceptStr;
+ static const QString regExpUpgradeStr;
+ static const QString regExpConnectionStr;
+ QString handshakeResponse;
+ QString key;
+
+public:
+ // Static functions
+ static QByteArray generateMaskingKey();
+ static QByteArray generateMaskingKeyV4( QString key, QString nonce );
+ static QByteArray mask( QByteArray & data, QByteArray & maskingKey );
+ static QList<QByteArray> composeFrames( QByteArray byteArray, bool asBinary = false, int maxFrameBytes = 0 );
+ static QByteArray composeHeader( bool end, EOpcode opcode, quint64 payloadLength, QByteArray maskingKey = QByteArray() );
+ static QString composeOpeningHandShake( QString resourceName, QString host, QString origin, QString extensions, QString key );
+
+ // static vars
+ static int maxBytesPerFrame;
+};
+
+#endif // QWSSOCKET_H
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.pro b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.pro
new file mode 100644
index 000000000..f52bda256
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.pro
@@ -0,0 +1,21 @@
+#-------------------------------------------------
+#
+# Project created by QtCreator 2012-03-05T10:38:43
+#
+#-------------------------------------------------
+
+QT += network
+
+QT -= gui
+
+TARGET = QtWebsocket
+TEMPLATE = lib
+CONFIG += staticlib
+
+SOURCES += \
+ QWsServer.cpp \
+ QWsSocket.cpp
+
+HEADERS += \
+ QWsServer.h \
+ QWsSocket.h
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.vcproj b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.vcproj
new file mode 100644
index 000000000..306dcada0
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/QtWebsocket/QtWebsocket.vcproj
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="QtWebsocket"
+ ProjectGUID="{7E3A920C-4257-41A1-B9B9-BFA138C1C8A2}"
+ Keyword="Qt4VSv1.0"
+ TargetFrameworkVersion="0"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="&quot;.\GeneratedFiles&quot;;&quot;.&quot;;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;"
+ PreprocessorDefinitions=",UNICODE,WIN32,QT_LARGEFILE_SUPPORT;QT_DLL;QT_NO_DEBUG,NDEBUG;QT_CORE_LIB;QT_NETWORK_LIB;QTWEBSOCKET_LIB"
+ RuntimeLibrary="2"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(ProjectDir)$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="4"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;.\GeneratedFiles&quot;;&quot;.&quot;;&quot;$(QTDIR)\include&quot;;&quot;.\GeneratedFiles\$(ConfigurationName)&quot;;&quot;$(QTDIR)\include\QtCore&quot;;&quot;$(QTDIR)\include\QtNetwork&quot;"
+ PreprocessorDefinitions=",UNICODE,WIN32,QT_LARGEFILE_SUPPORT;QT_DLL;QT_CORE_LIB;QT_NETWORK_LIB;QTWEBSOCKET_LIB"
+ RuntimeLibrary="3"
+ TreatWChar_tAsBuiltInType="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="$(OutDir)\$(ProjectName).lib"
+ AdditionalLibraryDirectories="$(QTDIR)\lib"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;cxx;c;def"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\QWsServer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\QWsSocket.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath=".\QWsServer.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing QWsServer.h..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_NETWORK_LIB -DQTWEBSOCKET_LIB &quot;-I.\GeneratedFiles&quot; &quot;-I.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing QWsServer.h..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_NETWORK_LIB -DQTWEBSOCKET_LIB &quot;-I.\GeneratedFiles&quot; &quot;-I.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\QWsSocket.h"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing QWsSocket.h..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_NETWORK_LIB -DQTWEBSOCKET_LIB &quot;-I.\GeneratedFiles&quot; &quot;-I.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Moc&apos;ing QWsSocket.h..."
+ CommandLine="&quot;$(QTDIR)\bin\moc.exe&quot; &quot;$(InputPath)&quot; -o &quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot; -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_NETWORK_LIB -DQTWEBSOCKET_LIB &quot;-I.\GeneratedFiles&quot; &quot;-I.&quot; &quot;-I$(QTDIR)\include&quot; &quot;-I.\GeneratedFiles\$(ConfigurationName)\.&quot; &quot;-I$(QTDIR)\include\QtCore&quot; &quot;-I$(QTDIR)\include\QtNetwork&quot;&#x0D;&#x0A;"
+ AdditionalDependencies="&quot;$(QTDIR)\bin\moc.exe&quot;;$(InputPath)"
+ Outputs="&quot;.\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp&quot;"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Form Files"
+ Filter="ui"
+ UniqueIdentifier="{99349809-55BA-4b9d-BF79-8FDBB0286EB3}"
+ >
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="qrc;*"
+ UniqueIdentifier="{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}"
+ ParseFiles="false"
+ >
+ </Filter>
+ <Filter
+ Name="Generated Files"
+ Filter="moc;h;cpp"
+ UniqueIdentifier="{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}"
+ SourceControlFiles="false"
+ >
+ <Filter
+ Name="Release"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_QWsServer.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Release\moc_QWsSocket.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Debug"
+ Filter="cpp;moc"
+ SourceControlFiles="false"
+ >
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_QWsServer.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\GeneratedFiles\Debug\moc_QWsSocket.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ </Filter>
+ </Files>
+ <Globals>
+ <Global
+ Name="lreleaseOptions"
+ Value=""
+ />
+ <Global
+ Name="lupdateOnBuild"
+ Value="0"
+ />
+ <Global
+ Name="lupdateOptions"
+ Value=""
+ />
+ <Global
+ Name="MocDir"
+ Value=".\GeneratedFiles\$(ConfigurationName)"
+ />
+ <Global
+ Name="MocOptions"
+ Value=""
+ />
+ <Global
+ Name="QtVersion Win32"
+ Value="4.8.2"
+ />
+ <Global
+ Name="RccDir"
+ Value=".\GeneratedFiles"
+ />
+ <Global
+ Name="UicDir"
+ Value=".\GeneratedFiles"
+ />
+ </Globals>
+</VisualStudioProject>
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.cpp
new file mode 100644
index 000000000..a89d1efcb
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.cpp
@@ -0,0 +1,31 @@
+#include "fordsdlcore_plugin.h"
+#include "smartdevicelink.h"
+#include <QDebug>
+#include <qqml.h>
+#include "sdlalert.h"
+#include <QQmlEngine>
+#include <QQmlContext>
+
+QObject* sdlSingleton(QQmlEngine * engine, QJSEngine * js) {
+ Q_UNUSED(engine)
+ Q_UNUSED(js)
+
+ engine->rootContext()->setContextProperty("MediaApps", SmartDeviceLink::getInstance().getMediaApps());
+
+ return (QObject *) &SmartDeviceLink::getInstance();
+}
+
+QObject* mediaAppsSingleton(QQmlEngine * engine, QJSEngine * js) {
+ Q_UNUSED(engine)
+ Q_UNUSED(js)
+
+ return (QObject *) SmartDeviceLink::getInstance().getMediaApps();
+}
+
+void FordSdlCorePlugin::registerTypes(const char *uri)
+{
+ qmlRegisterSingletonType<SdlAppsListModel>(uri, 1, 0, "MediaApps", mediaAppsSingleton);
+ qmlRegisterSingletonType<SmartDeviceLink>(uri, 1, 0, "AppLink", sdlSingleton);
+}
+
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.h
new file mode 100644
index 000000000..655dcb517
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/fordsdlcore_plugin.h
@@ -0,0 +1,16 @@
+#ifndef FORDSDLCORE_PLUGIN_H
+#define FORDSDLCORE_PLUGIN_H
+
+#include <QQmlExtensionPlugin>
+
+class FordSdlCorePlugin : public QQmlExtensionPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
+
+public:
+ void registerTypes(const char *uri);
+};
+
+#endif // FORDSDLCORE_PLUGIN_H
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/qmldir b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/qmldir
new file mode 100644
index 000000000..da1a7b7f9
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/qmldir
@@ -0,0 +1,3 @@
+module com.ford.sdlcore
+plugin FordSdlCore
+
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.cpp
new file mode 100644
index 000000000..f625c16b4
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.cpp
@@ -0,0 +1,6 @@
+#include "sdlalert.h"
+
+SdlAlert::SdlAlert(QObject *parent) :
+ QQuickItem()
+{
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.h
new file mode 100644
index 000000000..cb46236db
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlalert.h
@@ -0,0 +1,18 @@
+#ifndef SDLALERT_H
+#define SDLALERT_H
+
+#include <QQuickItem>
+
+class SdlAlert : public QQuickItem
+{
+ Q_OBJECT
+public:
+ explicit SdlAlert(QObject *parent = 0);
+
+signals:
+
+public slots:
+
+};
+
+#endif // SDLALERT_H
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.cpp
new file mode 100644
index 000000000..104b31abe
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.cpp
@@ -0,0 +1,6 @@
+#include "sdlappslistmodel.h"
+
+SdlAppsListModel::SdlAppsListModel(QObject *parent) :
+ QAbstractListModel(parent)
+{
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.h
new file mode 100644
index 000000000..9b213e666
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/sdlappslistmodel.h
@@ -0,0 +1,47 @@
+#ifndef SDLAPPSLISTMODEL_H
+#define SDLAPPSLISTMODEL_H
+
+#include <QAbstractListModel>
+#include <QStringList>
+
+class SdlAppsListModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ explicit SdlAppsListModel(QObject *parent = 0);
+
+ int rowCount(const QModelIndex &parent) const { return m_data.size(); }
+
+ QVariant data(const QModelIndex &index, int role) const {
+ return m_data.values().at(index.row());
+ }
+
+ virtual QHash<int, QByteArray> roleNames() const {
+ QHash<int, QByteArray> roles;
+ roles['t'] = "text";
+ return roles;
+ }
+
+ void append(int id, QString string) {
+ beginResetModel();
+ m_data.clear();
+ m_data[id] = string;
+ endResetModel();
+ }
+
+ void clear() {
+ beginResetModel();
+ m_data.clear();
+ endResetModel();
+ }
+
+signals:
+
+public slots:
+
+private:
+ QHash<int, QString> m_data;
+
+};
+
+#endif // SDLAPPSLISTMODEL_H
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.cpp b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.cpp
new file mode 100644
index 000000000..57cb8ac50
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.cpp
@@ -0,0 +1,263 @@
+#include "smartdevicelink.h"
+#include <QDebug>
+#include "QtWebsocket/QWsSocket.h"
+#include <QJsonDocument>
+#include <QJsonObject>
+#include <unistd.h>
+
+SmartDeviceLink::SmartDeviceLink(QQuickItem *parent):
+ QObject(parent)
+{
+ connect(&m_ws_basic, SIGNAL(connected()), this, SLOT(basic_connected()));
+ connect(&m_ws_basic, SIGNAL(frameReceived(QString)), this, SLOT(basic_receive(QString)));
+ connect(&m_ws_basic, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(&m_ws_buttons, SIGNAL(connected()), this, SLOT(buttons_connected()));
+ connect(&m_ws_buttons, SIGNAL(frameReceived(QString)), this, SLOT(buttons_receive(QString)));
+ connect(&m_ws_buttons, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(&m_ws_tts, SIGNAL(connected()), this, SLOT(tts_connected()));
+ connect(&m_ws_tts, SIGNAL(frameReceived(QString)), this, SLOT(tts_receive(QString)));
+ connect(&m_ws_tts, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(&m_ws_vehicle, SIGNAL(connected()), this, SLOT(vehicle_connected()));
+ connect(&m_ws_vehicle, SIGNAL(frameReceived(QString)), this, SLOT(vehicle_receive(QString)));
+ connect(&m_ws_vehicle, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(&m_ws_ui, SIGNAL(connected()), this, SLOT(ui_connected()));
+ connect(&m_ws_ui, SIGNAL(frameReceived(QString)), this, SLOT(ui_receive(QString)));
+ connect(&m_ws_ui, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(&m_ws_vr, SIGNAL(connected()), this, SLOT(vr_connected()));
+ connect(&m_ws_vr, SIGNAL(frameReceived(QString)), this, SLOT(vr_receive(QString)));
+ connect(&m_ws_vr, SIGNAL(disconnected()), this, SLOT(disconnected()));
+
+ connect(this, SIGNAL(newAppAvailable(int, QString)), this, SLOT(registerApp(int,QString)));
+
+ m_ws_buttons.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+ m_ws_tts.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+ m_ws_vr.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+ m_ws_basic.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+ m_ws_vehicle.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+ m_ws_ui.connectToHost( QLatin1String("127.0.0.1"), 8087 );
+}
+
+SmartDeviceLink::~SmartDeviceLink()
+{
+ qDebug() << "SmartDeviceLink destroyed";
+}
+
+void SmartDeviceLink::basic_connected() {
+ basic_send("{\"jsonrpc\":\"2.0\",\"id\":600,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"BasicCommunicationClient\"}}");
+}
+
+void SmartDeviceLink::buttons_connected() {
+ buttons_send("{\"jsonrpc\":\"2.0\",\"id\":200,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"Buttons\"}}");
+}
+
+void SmartDeviceLink::tts_connected() {
+ tts_send("{\"jsonrpc\":\"2.0\",\"id\":300,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"TTS\"}}");
+}
+
+void SmartDeviceLink::vehicle_connected() {
+ vehicle_send("{\"jsonrpc\":\"2.0\",\"id\":700,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"VehicleInfo\"}}");
+}
+
+void SmartDeviceLink::ui_connected() {
+ ui_send("{\"jsonrpc\":\"2.0\",\"id\":400,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"UI\"}}");
+}
+
+void SmartDeviceLink::vr_connected() {
+ vr_send("{\"jsonrpc\":\"2.0\",\"id\":500,\"method\":\"MB.registerComponent\",\"params\":{\"componentName\":\"VR\"}}");
+}
+
+void SmartDeviceLink::basic_send(QString message) {
+ qDebug() << "Sending (basic):" << message;
+ m_ws_basic.write(message.append('\n'));
+}
+
+void SmartDeviceLink::buttons_send(QString message) {
+ qDebug() << "Sending (buttons):" << message;
+ m_ws_buttons.write(message.append('\n'));
+}
+
+void SmartDeviceLink::tts_send(QString message) {
+ qDebug() << "Sending (tts):" << message;
+ m_ws_tts.write(message.append('\n'));
+}
+
+void SmartDeviceLink::vehicle_send(QString message) {
+ qDebug() << "Sending (vehicle):" << message;
+ m_ws_vehicle.write(message.append('\n'));
+}
+
+void SmartDeviceLink::ui_send(QString message) {
+ qDebug() << "Sending (ui):" << message;
+ m_ws_ui.write(message.append('\n'));
+}
+
+void SmartDeviceLink::vr_send(QString message) {
+ qDebug() << "Sending (vr):" << message;
+ m_ws_vr.write(message.append('\n'));
+}
+
+void SmartDeviceLink::basic_receive(QString message) {
+ qDebug() << "Receiving(basic):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ int result = root.value("result").toDouble();
+ QString method = root.value("method").toString();
+
+ if (id == 600) {
+ char *reg, *unreg, *update;
+
+ asprintf(&reg, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"method\":\"MB.subscribeTo\",\"params\":{\"propertyName\":\"BasicCommunication.OnAppRegistered\"}}", result+1);
+ basic_send(reg);
+ free(reg);
+
+ asprintf(&unreg, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"method\":\"MB.subscribeTo\",\"params\":{\"propertyName\":\"BasicCommunication.OnAppUnregistered\"}}", result+2);
+ basic_send(unreg);
+ free(unreg);
+
+ asprintf(&update, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"method\":\"MB.subscribeTo\",\"params\":{\"propertyName\":\"BasicCommunication.OnDeviceListUpdated\"}} ", result+3);
+ basic_send(update);
+ free(update);
+ }
+ else if (method.compare("BasicCommunication.OnAppRegistered") == 0) {
+ QJsonObject params = root.value("params").toObject();
+ QJsonObject application = params.value("application").toObject();
+ QString appName = application.value("appName").toString();
+ int appId = application.value("appId").toDouble();
+
+ char * update;
+ asprintf(&update, "{\"jsonrpc\":\"2.0\",\"id\":3000,\"method\":\"BasicCommunication.ActivateApp\",\"params\":{\"appName\":\"%s\",\"appId\":%i}}", appName.toLocal8Bit().data(), appId);
+ basic_send(update);
+ free(update);
+ emit newAppAvailable(appId, appName);
+ }
+ else if (method.compare("BasicCommunication.OnAppUnregistered") == 0) {
+ m_media_apps.clear();
+ }
+}
+
+void SmartDeviceLink::buttons_receive(QString message) {
+ qDebug() << "Receiving(buttons):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ QString method = root.value("method").toString();
+
+ if (method.compare("Buttons.GetCapabilities") == 0) {
+ buttons_send("{\"jsonrpc\":\"2.0\",\"id\":19,\"result\":{\"capabilities\":[{\"name\":\"PRESET_0\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_1\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_2\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_3\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_4\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_5\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_6\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_7\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_8\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"PRESET_9\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"OK\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"SEEKLEFT\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"SEEKRIGHT\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"TUNEUP\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true},{\"name\":\"TUNEDOWN\",\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true}],\"presetBankCapabilities\":{\"onScreenPresetsAvailable\":true},\"method\":\"Buttons.GetCapabilitiesResponse\",\"resultCode\":\"SUCCESS\"}}");
+ }
+}
+
+void SmartDeviceLink::tts_receive(QString message) {
+ qDebug() << "Receiving(tts):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ QString method = root.value("method").toString();
+
+ if (method.compare("TTS.GetCapabilities") == 0) {
+ tts_send("{\"jsonrpc\":\"2.0\",\"id\":18,\"result\":{\"capabilities\":[\"TEXT\"],\"resultCode\":\"SUCCESS\",\"method\":\"TTS.GetCapabilitiesResponse\"}}");
+ }
+ else if (method.compare("TTS.GetLanguage") == 0) {
+ tts_send("{\"jsonrpc\":\"2.0\",\"id\":26,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"TTS.GetLanguageResponse\",\"language\":\"EN-US\"}}");
+ }
+ else if (method.compare("TTS.GetSupportedLanguages") == 0) {
+ tts_send("{\"jsonrpc\":\"2.0\",\"id\":22,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"TTS.GetSupportedLanguagesResponse\",\"languages\":[\"EN-US\",\"ES-MX\",\"FR-CA\",\"DE-EU\",\"ES-EU\",\"EN-EU\",\"RU-RU\",\"TR-TR\",\"PL-EU\",\"FR-EU\",\"IT-EU\",\"SV-EU\",\"PT-EU\",\"NL-EU\",\"EN-AU\",\"ZH-CN\",\"ZH-TW\",\"JA-JP\",\"AR\",\"KO-KR\"]}}");
+ }
+
+}
+
+void SmartDeviceLink::vehicle_receive(QString message) {
+ qDebug() << "Receiving(vehicle):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ QString method = root.value("method").toString();
+
+ if (method.compare("VehicleInfo.GetVehicleType") == 0) {
+ vehicle_send("{\"jsonrpc\":\"2.0\",\"id\":20,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"VehicleInfo.GetVehicleTypeResponse\",\"vehicleType\":{\"make\":\"Ford\",\"model\":\"Fiesta\",\"modelYear\":\"2013\",\"trim\":\"SE\"}}}");
+ }
+}
+
+void SmartDeviceLink::ui_receive(QString message) {
+ qDebug() << "Receiving(ui):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ int result = root.value("result").toDouble();
+ QString method = root.value("method").toString();
+
+ if (id == 400) {
+ char *onchoise;
+ asprintf(&onchoise, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"method\":\"MB.subscribeTo\",\"params\":{\"propertyName\":\"VR.OnChoise\"}}", result + 1);
+ ui_send(onchoise);
+ free(onchoise);
+
+ ui_send("{\"jsonrpc\":\"2.0\",\"method\":\"UI.OnReady\"}");
+ }
+ else if (method.compare("UI.GetCapabilities") == 0) {
+ ui_send("{\"jsonrpc\":\"2.0\",\"id\":16,\"result\":{\"displayCapabilities\":{\"displayType\":\"GEN2_8_DMA\",\"textFields\":[{\"name\":\"mainField1\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"mainField2\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"statusBar\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"mediaClock\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"mediaTrack\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"alertText1\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1},{\"name\":\"alertText2\",\"characterSet\":\"TYPE2SET\",\"width\":1,\"rows\":1}],\"mediaClockFormats\":[\"CLOCK1\",\"CLOCK2\",\"CLOCKTEXT1\",\"CLOCKTEXT2\",\"CLOCKTEXT3\"]},\"hmiZoneCapabilities\":[\"FRONT\",\"BACK\"],\"softButtonCapabilities\":[{\"shortPressAvailable\":true,\"longPressAvailable\":true,\"upDownAvailable\":true,\"imageSupported\":true}],\"method\":\"UI.GetCapabilitiesResponse\",\"resultCode\":\"SUCCESS\"}}");
+ }
+ else if (method.compare("UI.GetSupportedLanguages") == 0) {
+ ui_send("{\"jsonrpc\":\"2.0\",\"id\":21,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"UI.GetSupportedLanguagesResponse\",\"languages\":[\"EN-US\",\"ES-MX\",\"FR-CA\",\"DE-EU\",\"ES-EU\",\"EN-EU\",\"RU-RU\",\"TR-TR\",\"PL-EU\",\"FR-EU\",\"IT-EU\",\"SV-EU\",\"PT-EU\",\"NL-EU\",\"EN-AU\",\"ZH-CN\",\"ZH-TW\",\"JA-JP\",\"AR\",\"KO-KR\"]}}");
+ }
+ else if (method.compare("UI.GetLanguage") == 0) {
+ ui_send("{\"jsonrpc\":\"2.0\",\"id\":24,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"UI.GetLanguageResponse\",\"hmiDisplayLanguage\":\"EN-US\"}}");
+ }
+ else if (method.compare("UI.Show") == 0) {
+ QJsonObject params = root.value("params").toObject();
+ setShow1(params.value("mainField1").toString());
+ setShow2(params.value("mainField2").toString());
+ char* response;
+ asprintf(&response, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"UI.ShowResponse\"}}", id);
+ ui_send(response);
+ free(response);
+ }
+ else if (method.compare("UI.Alert") == 0) {
+ QJsonObject params = root.value("params").toObject();
+ QString message(params.value("AlertText1").toString());
+ message.append("\n").append(params.value("AlertText2").toString());
+ char * response;
+ asprintf(&response, "{\"jsonrpc\":\"2.0\",\"id\":%i,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"UI.AlertResponse\"}}", id);
+ ui_send(response);
+ free(response);
+ emit alert(message);
+ }
+
+}
+
+void SmartDeviceLink::vr_receive(QString message) {
+ qDebug() << "Receiving(vr):" << message;
+ QJsonObject root = QJsonDocument::fromJson(message.toLocal8Bit()).object();
+ int id = root.value("id").toDouble();
+ QString method = root.value("method").toString();
+
+ if (method.compare("VR.GetCapabilities") == 0) {
+ vr_send("{\"jsonrpc\":\"2.0\",\"id\":17,\"result\":{\"capabilities\":[\"TEXT\"],\"method\":\"VR.GetCapabilitiesResponse\",\"resultCode\":\"SUCCESS\"}}");
+ }
+ else if (method.compare("VR.GetSupportedLanguages") == 0) {
+ vr_send("{\"jsonrpc\":\"2.0\",\"id\":23,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"VR.GetSupportedLanguagesResponse\",\"languages\":[\"EN-US\",\"ES-MX\",\"FR-CA\",\"DE-EU\",\"ES-EU\",\"EN-EU\",\"RU-RU\",\"TR-TR\",\"PL-EU\",\"FR-EU\",\"IT-EU\",\"SV-EU\",\"PT-EU\",\"NL-EU\",\"EN-AU\",\"ZH-CN\",\"ZH-TW\",\"JA-JP\",\"AR\",\"KO-KR\"]}}");
+ }
+ else if (method.compare("VR.GetLanguage") == 0) {
+ vr_send("{\"jsonrpc\":\"2.0\",\"id\":25,\"result\":{\"resultCode\":\"SUCCESS\",\"method\":\"VR.GetLanguageResponse\",\"language\":\"EN-US\"}}");
+ }
+}
+
+void SmartDeviceLink::registerApp(int appId, QString appName) {
+ qDebug() << "New app registered:" << appName;
+ m_media_apps.append(appId, appName);
+}
+
+void SmartDeviceLink::setShow1(QString show) {
+ m_show1 = show;
+ emit show1Changed(show);
+}
+
+void SmartDeviceLink::setShow2(QString show) {
+ m_show2 = show;
+ emit show2Changed(show);
+}
+
+void SmartDeviceLink::disconnected() {
+ qDebug() << "Websocket disconnected";
+}
diff --git a/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.h b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.h
new file mode 100644
index 000000000..f2e7f1b2b
--- /dev/null
+++ b/SDL_Core/src/components/qt_hmi/References/Work/fordsdlcore/smartdevicelink.h
@@ -0,0 +1,75 @@
+#ifndef SMARTDEVICELINK_H
+#define SMARTDEVICELINK_H
+
+#include <QQuickItem>
+#include <QStringListModel>
+#include "QtWebsocket/QWsSocket.h"
+#include "sdlappslistmodel.h"
+
+class SmartDeviceLink : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString show1 READ getShow1 NOTIFY show1Changed)
+ Q_PROPERTY(QString show2 READ getShow2 NOTIFY show2Changed)
+
+public:
+ SmartDeviceLink(QQuickItem *parent = 0);
+ ~SmartDeviceLink();
+
+ static SmartDeviceLink& getInstance() {
+ static SmartDeviceLink instance;
+ return instance;
+ }
+
+ SdlAppsListModel* getMediaApps() { return &m_media_apps; }
+ QString getShow1() { return m_show1; }
+ QString getShow2() { return m_show2; }
+
+private:
+ QWsSocket m_ws_basic;
+ QWsSocket m_ws_tts;
+ QWsSocket m_ws_buttons;
+ QWsSocket m_ws_vehicle;
+ QWsSocket m_ws_ui;
+ QWsSocket m_ws_vr;
+
+ SdlAppsListModel m_media_apps;
+
+ QString m_show1;
+ QString m_show2;
+
+ void basic_send(QString message);
+ void tts_send(QString message);
+ void buttons_send(QString message);
+ void vehicle_send(QString message);
+ void ui_send(QString message);
+ void vr_send(QString message);
+ void setShow1(QString);
+ void setShow2(QString);
+
+public slots:
+ void basic_connected();
+ void tts_connected();
+ void buttons_connected();
+ void vehicle_connected();
+ void ui_connected();
+ void vr_connected();
+
+ void basic_receive(QString);
+ void tts_receive(QString);
+ void buttons_receive(QString);
+ void vehicle_receive(QString);
+ void ui_receive(QString);
+ void vr_receive(QString);
+ void registerApp(int, QString);
+
+ void disconnected();
+
+signals:
+ void show1Changed(QString);
+ void show2Changed(QString);
+ void newAppAvailable(int, QString);
+ void alert(QString message);
+};
+
+#endif // SMARTDEVICELINK_H